Talk:Compiling a model: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 27: Line 27:


: I also intend to deck out the QC commands category with the table layout found in the top-level cats. This evening's and tomorrow's job, incidentally, is getting animation export and compile written up. :-) --[[user:TomEdwards|TomEdwards]] 10:42, 25 Apr 2008 (PDT)
: I also intend to deck out the QC commands category with the table layout found in the top-level cats. This evening's and tomorrow's job, incidentally, is getting animation export and compile written up. :-) --[[user:TomEdwards|TomEdwards]] 10:42, 25 Apr 2008 (PDT)
=== HLMV-generated QC blocks ===
This is not something I've ever used, but it seems like a pretty handy, and frequently recommended "QC Wizard" ;-) I guess any introduction to "Compiling a model" should mention this, and other GUIStudioMDL packages. --[[User:Beeswax|Beeswax]] 09:40, 6 May 2008 (PDT)


=== StudioMDL error messages ===
=== StudioMDL error messages ===

Revision as of 09:40, 6 May 2008

Article Structure

Compiling a model is a huge subject, too much to do justice to in a single article. May I suggest splitting up this article into a series of tutorials; something like:

  • Compiling a model
    • section 1 : Welcome to StudioMDL ... (and mention 3rd-party interfaces to StudioMDL: StudioCompiler, GUIStudioMDL).
    • section 2 : Workspace filestructure (note : this should correspond with Model Creation Overview Workflow & Workspace ... ?)
    • section 3 : Intro to QC syntax : where to use "quotes", {curly brackets}, linebreaks, filepaths, etc, etc. (plus mention recommended text editors.)
    • section 4 : Examples : list of links to annotated example QCs (preferably from Valve GCF) chosen to illustrate/template common cases, or specific features eg:
      • "QC example: simple static_prop"
      • "QC example: simple physics_prop"
      • "QC example: exploding physics_prop"
      • "QC example: viewmodel" (animated)
      • "QC example: skybox model"
      • "QC example: ragdoll model"
      • etc.
    • section 5 : Troubleshooting : where to find the StudioMDL compile log plus link(s?) to article/category: StudioMDL error messages (what they mean and what to do about them)

(updated --Beeswax 05:38, 26 Apr 2008 (PDT))

Separate articles for compiling more complex models is my intention, but that doesn't mean that the fundamentals explained in this one should be moved away. --TomEdwards 10:13, 25 Apr 2008 (PDT)
How about just using some annotated examples of common types of QC that can be used as templates. The nice thing is to document a new or "advanced" feature, just create a new example QC to illustrate it, and add it to the link-list on this page. IMO alot of people get bogged down trying to write comprehensive tutorials, when a well chosen (and helpfully annotated) example is easier all round. The more I think about it, the more I like the idea. --Beeswax 19:32, 25 Apr 2008 (PDT)
That, too, is my intention. --TomEdwards 00:14, 26 Apr 2008 (PDT)
"Intro to QC syntax" should IMO be handled with a combination of a generic "Intro to VDF" article and the individual QC command articles. --TomEdwards 10:13, 25 Apr 2008 (PDT)
I was thinking of a brief "Intro to QC Syntax" as a way to help prevent silly compile errors from the outset ;-) It would probably make sense to include a brief QC example - such as the current example - with handy tips on filepath issues (eg $cd). It might be worth considering building the "Intro to VDF" as templates, so they can be easily reused locally ? --Beeswax 19:32, 25 Apr 2008 (PDT)
Maybe that would be good for the category page? --TomEdwards 00:14, 26 Apr 2008 (PDT)
Hmm good point, but the category:QC Commands is a reference list of StudioMDL parameters, whereas this article is more of a "getting started" guide - now I'm hesitating to use the word "tutorial" ! :-) I think "Intro to QC Syntax" should not be very far from (a) "StudioMDL error messages" page/category, (b) QC Tutorial Examples, (c) QC Filepaths explanation. If "Compiling a model" is a basic orientation guide, containing general info which applies to all specific (eg phys-prop, static-prop) tutorials, I think it would be the best place to have "QC Filepaths" and "QC Syntax" info. --Beeswax 05:38, 26 Apr 2008 (PDT)
I also intend to deck out the QC commands category with the table layout found in the top-level cats. This evening's and tomorrow's job, incidentally, is getting animation export and compile written up. :-) --TomEdwards 10:42, 25 Apr 2008 (PDT)

HLMV-generated QC blocks

This is not something I've ever used, but it seems like a pretty handy, and frequently recommended "QC Wizard" ;-) I guess any introduction to "Compiling a model" should mention this, and other GUIStudioMDL packages. --Beeswax 09:40, 6 May 2008 (PDT)

StudioMDL error messages

In order to make error message info easily available to the site search engine (so you just copy whatever error message you got into the search box and click go) we could either:

  • break out each error message to its own article - although it must be said that some "fixes" will benefit from a common context, or
  • create a #REDIRECT article for each error message, which points to the relevant article such as this one. --Beeswax 07:12, 25 Apr 2008 (PDT)

File Paths

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)

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 just want to confrim that:
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.
DOES WORK!!! Make sure you have "-engine ep1 -nop4" in your launch options ---7-t-h- 18:05, 27 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)

EXCEPTION_ACCESS_VIOLATION

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)