Quick question

So I have my three .smd’s, and .qc file, and I’m ready to compile my first model,
Could anyone explain to me how to compile them into a .mdl? I didn’t find anything about that at Valve Dev Community.


Just drag the *.qc file on top of the studiomdl.exe icon located in your sourcesdk/bin/orangebox/bin/ folder and release it to feed it through. You can also use studiomdl.exe from the dos shell (cmd) with the syntax studiomdl.exe c:\path o\your\qc\file.qc

Thanks for the answer, I think that the files compiled (a cmd window opened, for a few seconds, displayed a lot of text and closed).
I can’t find the .mdl anywhere though, where does studiomdl.exe output the file to?

The *.qc file has a line that tells studiomdl.exe where to dump the model once it’s been compiled, it looks like this:

$modelname "props_lab\beaker.mdl"

It’s relative to whichever game you currently have selected in the SDK launcher. If you add a configuration for Garry’s Mod, the models will be compiled directly to your Garry’s Mod models folder. studiomdl.exe doesn’t have the ability to create folders, so all folders have to be prepared ahead of time, otherwise the compile will fail.

No file will be output if any errors occur during the compilation. You can check for error messages by running studiomdl.exe manually from the dos shell or, if you’re feeling adventurous, you can create a special shortcut to the program that won’t close once it finishes compiling (thus giving you a chance to read the compile log). You can do this by creating a shortcut to cmd.exe and, via the ‘properties’ window, changing its ‘Target’ value to look like this:

C:\WINDOWS\system32\cmd.exe /K "C:\Program Files\Steam\steamapps\*YOURUSERNAME*\sourcesdk\bin\orangebox\bin\studiomdl.exe"

When a *.qc is dragged onto the new shortcut it will be fed through and compiled and the /K switch will tell the window to stay open when it finishes (helpful!). The only caveat is that the folder containing the *.qc and the path to it can not contain any spaces, so it’s best to have a centralised folder for all of your modelling projects, IE: ‘C:\models\mymodel’

Bumping this thread because it is very relevant to my question. I’ve tried to look for studiomdl.exe, but in my %name% folder there are two folders: source sdk base, and source sdk base 2007. In neither of their \bin folders are any folders called “orangebox”, each file in it is a .dll. Can someone help me find it?

[editline]24th June 2011[/editline]

It’s my first model, and I would be very happy to see it. :slight_smile: