Compiling models for L4D2

Modelling, Textures, Animating and other general engine asset topics.

Compiling models for L4D2

Postby super_gun on Mon Nov 08, 2010 3:59 pm

Ok guys, I asked this question over at l4dmods.com but that forum is practically dead and really has no support. I'm trying to compile a static mesh I have made inside of Maya. I have exported my .smd and made my .qc file so now when I go to run studiomdl.exe it comes up with the error "unable to find gameinfo.txt" I know this has to do with not specifying which game i'm making it for but I don't know how specify it for Left 4 Dead. A little background, I have Left 4 Dead 2 installed, but not Half-Life 2 or any other source games. Any advice is much appreciated.
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby trcc on Mon Nov 08, 2010 11:23 pm

locate the gameinfo.txt of l4d2 and it should work...
trcc
Pheropod
Pheropod
 
Joined: Fri Aug 14, 2009 6:54 pm
Location: Montréal, Canada

Re: Compiling models for L4D2

Postby super_gun on Tue Nov 09, 2010 1:04 am

Sorry, I don't know what you mean. I know where the file is located but how do I make studiomdl.exe recognize it?
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby ankhsethamon on Tue Nov 09, 2010 5:51 am

When you use studiomdl.exe you have to add the -game parameter, indicating the location of the gameinfo.txt of L4D2, like this:

studiomdl.exe -game "C:\Program Files (x86)\Steam\steamapps\common\left 4 dead 2\left4dead2"


If you're compiling for L4D1, just use the proper path. I don't have it installed right now but I think its almost the same, just ...\common\left 4 dead\left4dead

That should work.

(I suggest to create a shortcut of the program and adding the parameter to the destiny, so you don't have to write it everytime)
Image
User avatar
ankhsethamon
Been Here A While
Been Here A While
 
Joined: Sat Aug 09, 2008 8:28 pm
Location: Mexico

Re: Compiling models for L4D2

Postby super_gun on Tue Nov 09, 2010 3:58 pm

Thank you for the quick reply! Whenever I try this, Windows tells me "A file cannot contain any of the following characters" I am right clicking on the studiomdl.exe and than adding that line right after "studiomdl.exe" Any ideas? Thanks!
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby Groxkiller585 on Tue Nov 09, 2010 9:14 pm

I had this issue, Are you running Vista? Vista doesn't allow :;\,/? these symbols in a name. I couldn't find a workaround, so i got GUIstudiomdl. It works, is easy to set up, and puts things where they should belong.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Compiling models for L4D2

Postby super_gun on Tue Nov 09, 2010 9:38 pm

Thanks for reply. No, I am running XP. I'll do a google search for GUIstudiomdl
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby super_gun on Tue Nov 09, 2010 10:24 pm

Now using GUIstudiomdl. I'm getting an error when compiling my model,

ERROR: Illegal Static prop with no vertices specified
ERROR: Aborted Processing on 'C:/Documents and Settings/Joel/Desktop/Compile/bridge_model.mdl'

Anyone ever have this problem or know of a solution? Thanks guys for all the support, you have been great.
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby ankhsethamon on Wed Nov 10, 2010 1:04 am

I know you're using GUIstudiomdl, but I want to clear this;

super_gun wrote:Whenever I try this, Windows tells me "A file cannot contain any of the following characters" I am right clicking on the studiomdl.exe and than adding that line right after "studiomdl.exe" Any ideas? Thanks!


Seems you're trying to edit the program name. That drops the error you mention. That's wrong.

You have to create a windows file shorcut, and then, right click on it, properties, and then add the -game parameter in the Target texbox.

super_gun wrote:Now using GUIstudiomdl. I'm getting an error when compiling my model,

ERROR: Illegal Static prop with no vertices specified
ERROR: Aborted Processing on 'C:/Documents and Settings/Joel/Desktop/Compile/bridge_model.mdl'


About these errors, try posting your qc file content so we can look for the problem. :)
Image
User avatar
ankhsethamon
Been Here A While
Been Here A While
 
Joined: Sat Aug 09, 2008 8:28 pm
Location: Mexico

Re: Compiling models for L4D2

Postby super_gun on Wed Nov 10, 2010 1:49 am

Seems you're trying to edit the program name. That drops the error you mention. That's wrong.

You have to create a windows file shorcut, and then, right click on it, properties, and then add the -game parameter in the Target texbox.


Yes, I am an idiot! :) No problem with this now though.

As for my qc file, i'm using the one that Maya creates with the export. It seems to be alright.

Code: Select all
$modelname "C:/Documents and Settings/Joel/Desktop/Compile/bridge_model.mdl"

$scale 1
$surfaceprop "default"
$keyvalues { "prop_data" { "base" "Wooden.Large" } }
$body "Body" "bridge_model"
$sequence idle "bridge_model_idle" loop fps 1
$sequence idle "bridge_model_idle" loop fps 30
$collisionmodel "bridge_model_phy.smd"
{
$mass 1
$concave
}


I've also edited my QC file to look exactly like the one at http://developer.valvesoftware.com/wiki ... els_Basics but to no avail.

I tried exporting a simple cube to see whether the problem lie with my static mesh or with another issue. I was able to get past the "Illegal Static prop with no vertices specified" but than I came across an entirely new problem. I want to be as specific as possible in my process so here are the steps I took.

1) Create a simple box
2) Assign a material (box.tga)
3) Save as "box.mb" in a folder on my desktop called "Compile"
4) File > Export SMD (if you want to know these settings, just ask)
5) I'm not exactly sure how Left 4 Dead wants the collision model to be exported but for a simple box, I just took the created box.smd file and copied and renamed box_phy.smd
Code: Select all
$modelname "C:/Documents and Settings/Joel/Desktop/Compile/Box/box.mdl"

$scale 1
$surfaceprop "default"
$keyvalues { "prop_data" { "base" "Wooden.Large" } }
$body "Body" "box"
$sequence idle "box_idle" loop fps 1
$collisionmodel "box_phy.smd"
{
$mass 1
$concave
}

6) Opened up GUIstudiomdl, loaded my QC file, and hit compile
Now I get this error;
writing C:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\models/C:/Documents and Settings/Joel/Desktop/Compile/Box/box.mdl:
Error opening C:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\models/C:/Documents and Settings/Joel/Desktop/Compile/Box/box.mdl! (Check for write enable)


Ok, so this just didn't look right to me. I redid every single step (starting from scratch) except saved everything into Left 4 Dead 2\left4dead2\models\box and I now get this error
ERROR: Model Name "C:/Program Files/Steam/steamapps/common/left 4 dead 2/left4dead2/models/Box/box.mdl" Too Big, 83 Characters, Max 63 Characters
which I just laugh at because it's so absurd that valve would make this that difficult.

Anyways, sorry for the long post but hopefully I put up enough information to get this resolved. Thanks.
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby ankhsethamon on Wed Nov 10, 2010 2:49 pm

Well. Lets check the location of files.

All your source files should be in the sdk_content directory, and the compiled files in the left4dead2 directory.

So, place your source textures (tga files) in
Code: Select all
C:\Program Files\Steam\steamapps\common\left 4 dead 2\sdk_content\materialsrc\models\my_models\

Place your source model files (qc and smd files) in
Code: Select all
C:\Program Files\Steam\steamapps\common\left 4 dead 2\sdk_content\modelsrc\my_models\

Place your compiled texture files (vtf and vmt files) in
Code: Select all
C:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\materials\models\my_models\

And your compiled model files would be created in
Code: Select all
C:\Program Files\Steam\steamapps\common\left 4 dead 2\left4dead2\models\my_models\


And try a qc file like this one:

Code: Select all
$modelname "my_models\bridge_model.mdl"
$cdmaterials "models\my_models"

$surfaceprop   default
$scale 1

$body body    "bridge_model.smd"
$sequence   idle   "bridge_model_idle.smd" loop fps 30
$collisionmodel          "bridge_model_phy.smd"
{
$mass 1
$concave
}
$keyvalues { "prop_data" { "base" "Wooden.Large" } }



You would probably get into new errors due to the $concave parameter.
Image
User avatar
ankhsethamon
Been Here A While
Been Here A While
 
Joined: Sat Aug 09, 2008 8:28 pm
Location: Mexico

Re: Compiling models for L4D2

Postby super_gun on Wed Nov 10, 2010 4:12 pm

I created another box and followed all of your (AWESOME!) guidelines. It works. Source just like everything to be in the right place apparently. Thanks so much for your time!

I hope when I try to compile my bridge model, I don't get that "Illegal Static prop with no vertices specified" error.
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby super_gun on Wed Nov 10, 2010 4:42 pm

The models aren't appearing in Hammer. I can import them in, but all I see is the move tool in the models place. It doesn't look like there were any errors when compiling either. I also compiled the map to see if maybe they would show up ingame, but no dice. :(

My guess is that there is a problem when exporting the smds from Maya.
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri

Re: Compiling models for L4D2

Postby srredfire on Wed Nov 10, 2010 6:41 pm

Super gun, I use Maya as well, and yeah it can be a pain in the ass. I haven't exported a model to Source for awhile now, but did you do all the steps with the Relationship Editor? I remember that being a key step I had to do.
srredfire
Veteran
Veteran
 
Joined: Sat Jul 22, 2006 10:44 pm

Re: Compiling models for L4D2

Postby super_gun on Wed Nov 10, 2010 8:34 pm

Hm, I am not sure what you mean. Do you mean setting up my layers?
super_gun
Member
Member
 
Joined: Thu Feb 23, 2006 12:55 am
Location: St. Louis, Missouri
Next

Return to Art Creation

Who is online

Users browsing this forum: No registered users