New Member
- Joined
- Nov 4, 2003
- Messages
- 850
- Best answers
- 0
I know eventually someone will come to these forums, and will start to ask questions about hl2 models and all that fun stuff, so I decided to make a tut.
This tut will teach you how to compile a prop to be used in maps. Making player models will probably be the same, except you have to include the sequences in the .qc.
Requirements
_ _ _ _ _
-3ds max any version above 4 would be nice
-3ds max smd exporter
-Bones pro 3, or character studio( I recommend getting bones pro 3 since the exporter doesnt support character studio when it has more then one joint per verticy as oppose to bones pro 3)
-a model that's ready to be compiled
-photoshop
-the sdk
Anyhow first things first, make your model and make a skel, and assign the model to the skel.
The skin must be in .tga format, at the moment make sure the material is 24 bit because I don't think hl2 supports 32 bit materials.
Once you're done with that, make a new folder in your root(hl2 directory)/cstrike_sample_content/models/*yourmodelsname
make another in the cstrike_sample_content/materialsrc/models/*yourmodelsname
Just so it's easier for me to type, from now on
x will be cstrike_sample_content, and n will be yourmodelsname
ex: x/models/*n which means to make a new folder called "whatever your models name is" If I put an asterik, that means create that folder
anyhow, save your .tga file to x/materialsrc/models/n folder
now go to your bin and create a shortcut for vtex.exe
Right click on shortcut to vtex.exe and add -mkdir -shader VertexLitGeneric to the target
move your shortcut to x/materialsrc/models/n folder and drag the .tga onto vtex.exe and it should output your vmt and vtf file into x/materials/models/n
Open up your vmt file with notepad or wordpad, whichever you want to use, and add the lines "models" 1 somewhere in it. That will tell you that it is used for a model.
Now back to your model in 3ds max, if 3ds max isn't opened, open it, and go to your saved model.
Assuming you've already finished assigning it to a skel, the next step is exporting
A model needs to have at least 3 smd files.
a referance smd
an idle animation
and a physic referance smd.
As you may have guessed, export your model and give it a name. Save it as a referance smd. A prompt should come up and ask you to save as an animation or a ref. Make sure you check ref. By the way, save it in your x/models/n folder
Then export again, this time add "_idle" without the quotes to the end of the name to the same folder, this time, make sure it's an animation.
now export again, this time add "_phys" to the end of the name, save it to the same folder, and make sure it's a referance.
For a detailed explaination of what's needed to make a physic ref. This link will explain how it's done. If you do it the way I do it, I'm pretty sure you'll get an error, and you'll end up with people thinking, "wth? why can't I walk through this open space"
http://www.hl2world.com/wiki/index.php/Creating_Physics_Models
Last but not least because there's something you have to do after you've compiled.
Make a .qc and save it to x
This link will explain what you need to do to make a .qc.
http://www.hl2world.com/wiki/index.php/Model_Compiling
also this link will explain how to compiled, I like this one better because it's explained very well.
http://www.hl2world.com/wiki/index.php/Importing_Custom_Models
Once you've compiled the model, go to your x/models/n folder, and copy the n folder to your mods models folder ie: cstrike/models/
You also need to copy the x/materials/models/n folder( only the n folder) to your mods materials/models/ folder ie: cstrike/materials/models/
And now you've compiled an hl2 model. No ragdoll physics though, it's a static prop.
So if you're multi-talented, load up a map and add those static_props to your map.
Once I get studiomdl.exe to stop crashing on me when I make a ragdoll model, I'll write a tut on how to do it, otherwise follow this tut here:
http://www.hl2world.com/wiki/index.php/Creating_Ragdoll_Models
This tut will teach you how to compile a prop to be used in maps. Making player models will probably be the same, except you have to include the sequences in the .qc.
Requirements
_ _ _ _ _
-3ds max any version above 4 would be nice
-3ds max smd exporter
-Bones pro 3, or character studio( I recommend getting bones pro 3 since the exporter doesnt support character studio when it has more then one joint per verticy as oppose to bones pro 3)
-a model that's ready to be compiled
-photoshop
-the sdk
Anyhow first things first, make your model and make a skel, and assign the model to the skel.
The skin must be in .tga format, at the moment make sure the material is 24 bit because I don't think hl2 supports 32 bit materials.
Once you're done with that, make a new folder in your root(hl2 directory)/cstrike_sample_content/models/*yourmodelsname
make another in the cstrike_sample_content/materialsrc/models/*yourmodelsname
Just so it's easier for me to type, from now on
x will be cstrike_sample_content, and n will be yourmodelsname
ex: x/models/*n which means to make a new folder called "whatever your models name is" If I put an asterik, that means create that folder
anyhow, save your .tga file to x/materialsrc/models/n folder
now go to your bin and create a shortcut for vtex.exe
Right click on shortcut to vtex.exe and add -mkdir -shader VertexLitGeneric to the target
move your shortcut to x/materialsrc/models/n folder and drag the .tga onto vtex.exe and it should output your vmt and vtf file into x/materials/models/n
Open up your vmt file with notepad or wordpad, whichever you want to use, and add the lines "models" 1 somewhere in it. That will tell you that it is used for a model.
Now back to your model in 3ds max, if 3ds max isn't opened, open it, and go to your saved model.
Assuming you've already finished assigning it to a skel, the next step is exporting
A model needs to have at least 3 smd files.
a referance smd
an idle animation
and a physic referance smd.
As you may have guessed, export your model and give it a name. Save it as a referance smd. A prompt should come up and ask you to save as an animation or a ref. Make sure you check ref. By the way, save it in your x/models/n folder
Then export again, this time add "_idle" without the quotes to the end of the name to the same folder, this time, make sure it's an animation.
now export again, this time add "_phys" to the end of the name, save it to the same folder, and make sure it's a referance.
For a detailed explaination of what's needed to make a physic ref. This link will explain how it's done. If you do it the way I do it, I'm pretty sure you'll get an error, and you'll end up with people thinking, "wth? why can't I walk through this open space"
http://www.hl2world.com/wiki/index.php/Creating_Physics_Models
Last but not least because there's something you have to do after you've compiled.
Make a .qc and save it to x
This link will explain what you need to do to make a .qc.
http://www.hl2world.com/wiki/index.php/Model_Compiling
also this link will explain how to compiled, I like this one better because it's explained very well.
http://www.hl2world.com/wiki/index.php/Importing_Custom_Models
Once you've compiled the model, go to your x/models/n folder, and copy the n folder to your mods models folder ie: cstrike/models/
You also need to copy the x/materials/models/n folder( only the n folder) to your mods materials/models/ folder ie: cstrike/materials/models/
And now you've compiled an hl2 model. No ragdoll physics though, it's a static prop.
So if you're multi-talented, load up a map and add those static_props to your map.
Once I get studiomdl.exe to stop crashing on me when I make a ragdoll model, I'll write a tut on how to do it, otherwise follow this tut here:
http://www.hl2world.com/wiki/index.php/Creating_Ragdoll_Models