Talk:Compiling a model

From Valve Developer Community
Revision as of 15:31, 10 February 2008 by Blackcow (talk | contribs)
Jump to navigation Jump to search
What happens if you want to make a model for your own mod? This article says nothing about making models for your own models in your own mod except for models in cstrike or hl2mp etc.

--Mflux 22:23, 13 Jul 2006 (PDT)

If you want to follow the 'file structure etiquette' (see Source SDK Files and Directory Structure.) you would use C:\Program Files\Valve\Steam\SteamApps\SourceMods\mod_game_directory\modelsrc ... if there isn't a modelsrc folder there already, just create one. So what you should have is:
SteamApps\SourceMods\mod_game_directory\modelsrc\your.SMD
           "           "               "        \your.QC
SteamApps\SourceMods\mod_game_directory\materialsrc\models\your.TGA
           "           "               "          "       \your.VMT
SteamApps\username\sourcesdk\bin\ep1\bin\Studiomdl
           "           "            "   \Vtex
SteamApps\username\sourcesdk\bin\orangebox\bin\Studiomdl
           "           "               "      \Vtex
However, to me it seems more convenient to use a single desktop folder for 'temporary' files (TGA, SMD, QC) and Shortcuts to the compilers (Studiomdl & Vtex, or Studiocompiler) instead of spreading them all over. e.g.
Desktop\Source1Modelling\your.SMD
   "      "       "     \your.QC
   "      "       "     \your.TGA
   "      "       "     \your.VMT
   "      "       "     \Shortcut_to_ep1_Studiomdl
   "      "       "     \Shortcut_to_ep1_Vtex
The important thing is that the final, compiled MDL, VMT and VTFs go in the correct game_directory folders, which the compilers will do automatically if your SDK Tools -> Current Game is set to whichever game you're compiling for. Beeswax 07:34, 11 Nov 2007 (PST)

What are important -

  • Put .smd files and .qc files in a same directory.
  • To write .mdl into your mod directory, set Current Game to your mod, or use -game option pointing to your game directory.
Note you have made your Mod using Mod Wizard, you'll get your mod source directory with modelsrc and a .bat invoking studiomdl for your mod. I usually use this studiomdl.bat(which has -game option) to compile my mod models. I export .smd files from XSI, write the .qc in the same directory, then drag .qc into the .bat file - then I can get my .mdl. (If there is no error present!) --n-neko 01:43, 1 Dec 2006 (PST)

EXCEPTION_ACCESS_VIOLATION I suspect that message has nothing to do with shadowlod. It' doesn't matter how I write the shadowlod line and it's brackets, or if I delete it entirely, the message does not go away. Camaron 07:24, 10 Jun 2007 (PDT)

I also have this problem. I'm not sure if it's related to the recent SDK update for me or not. I was never using shadowlod to begin with.--TheDistur 12:20, 10 Nov 2007 (PST)

For EXCEPTION_ACCESS_VIOLATION, try compiling with the hlmv.exe running --Steve Henderson 07:01, 24 Dec 2007 (PST)

Are you sure studiomdl.exe is supposed to be in the sourcesdk\bin directory. That .exe isn't in that folder for me, I had my friend check, same thing. Whats going on? --BlackCow

In the latest version (actually, in both beta or non-beta versions) of the Source SDK, there are two sets of tools (one of which is studiomdl.exe): one for Episode 1 engine games, and another for "Orange Box" (the most recent) engine games.
For each of those sets of tools, you can find studiomdl.exe at: ...\sourcesdk\bin\engine\bin\studiomdl.exe, engine is either ep1 (for episode 1 engine-compatible tools) or with orangebox (for "Orange Box" engine-compatible tools). --Etset 04:02, 28 Jan 2008 (PST)
Well I found the tools but when I go to compile I get this error,
"The procedure entry point ?LockForRead@CThreadSpinRWLock@@QAEXXZ could not be located in the dynamic link libary tier0.dll"
A lot of people are getting this problem I hear, no solutions that seem to work. People just tell me to wait for the next update --Blackcow 22:02, 3 Feb 2008 (PST)
First thing would be to check if you're using the latest version of the SDK (and if you're using the beta version of SDK or not). If you're using the beta version you should remove all '-nop4' run parameters you might have added in your shortcuts.
I searched google and found this forum thread (@ interlopers], check if it relates to your problem. --Etset 11:47, 4 Feb 2008 (PST)
Huzzah! I got it to compile.
My solution,
1) Right click Source SDK, in steam, and delete local content.
2) Install the Source SDK.
3) Run the SDK, Select HL2 as your current game.
4) Double click, "Refresh SDK content"
5) Open the Model Viewer.
6) Finally compile your model.
Some of these steps may be redundant but its exactly what I did to get it to compile. --Blackcow 14:31, 10 Feb 2008 (PST)


I'm having some trouble with this. No matter what I do, I get an error, and studiomdl closes instantly. I don't have time to explain my problems right now, but here's the files. I would greatly appreciate help. .QC: Brick2x4 .SMD: Brick2x4 Someone fix this for me, for I barely have time to make the model. --Sig 16:02, 4 Feb 2008 (PST)