Search
Username:
Password:

Register or Reset Password

SUBMISSIONS
Counter Strike
   New Maps
   New Tutorials
   New Skins
   New GUI's
   New Sounds
   New Threads
Other
   Media
   Gamers
   Clans
   Studios
 
 
Search Tutorials:           Advanced
 
 
 
Compiling a Prop_static Model
Difficulty: Intermediate
Category: CS:S > ModelingAuthor(s): SGT_kick_ur_ass


Welcome to another on of my tutorials. In this tutorial, I will teach you how to compile a custom model to be used in your maps as a prop_static. Sorry for the lack of pictures, as I don't really think there is a need for them seeing as how it's a pretty simple process and there aren't really any screenshots to see.

Note: I am only showing you how to compile the actual model. You need to make the model, UVmap and the collision files yourself.

Required Files:

  • The Exported textured Model (.smd)

  • The collision Model (.smd)

  • The Texture file



In this tutorial, I will be compiling a simple 64x64 box that I whipped up in a few seconds. Now lets get started!

First thing's first, you need to set up your materials and create a vmt for them. So for my box, I created 1 texture, and 1 vmt. Open up Notepad, and key in the following, changing the directory, to the one your textures are in:

"VertexlitGeneric"
{
"$basetexture" "models/custom/tutorial/crate"
}


The VertexlitGeneric tells us that the texture belongs to a model, and the $basetexture tells us the path of said texture. Now save the vmt by going to File>Save As and give it the same name as your vtf file, with the .vmt extension, so in this case, it will be crate.vmt


Now let's get started on the actual model itself.


In order to compile a model, you need the required files above, and you need to create a QC file using notepad. There are various lines of code that you need to type into the qc, in order for your model to compile. Below are all the lines that we will be using, and a little description on each one of them.

$modelname "custom/tutorial/compiletut.mdl
This line is what tells Studiomdl what we want the model to be called, and where we want it to be placed when it is compiled. In this case, the model will be called compiletut.mdl and it will be placed in the models/custom/tutorial directory.

$scale 1.0
This line states the size of the model. You can resize it as much as you want just by editing this line, it saves a lot of time because you don't have to go resize the model in the modeling program. It can be left at the default scale for now.

$staticprop
This small line is what tells the compiler that we are trying to compile a prop_static, and that it doesn't expect any animations in the model. Basically, without this line, it will compile the model as prop_physics.

$body "Body" compiletut.smd
In this line, you state what the name of the reference model is called. So in this case, it is compiletut.smd. Some models might have it as compiletut_ref.smd but it doesn't really matter what it's called.

$surfaceprop "metal"
This line tells the compiler what kind of material the prop is supposed to be. In this case, it is set to metal, so when I go to test it out ingame, it will sound like I'm shooting a metal crate. You can change it to various other materials. For a full list of Material Properties, check out the Valve Wiki.

$cdmaterials "models/custom/tutorial"
This line tells the compiler where the vmt for the texture you created can be found. In this case, my textures are in the materials/models/custom/tutorial folder.

$collisionmodel "compiletut_phys.smd" {
$concave
}

This line is where you state the name of the collision model for your prop. The collision model is that invisible area where the player can't shoot or pass through. Once again, the collision model can be called whatever you desire, I just called mine compiletut_phys to prevent confusion.

$sequence idle "compiletut.smd" fps 15 ACT_IDLE 1
This is the last line in the QC, it is a frame of an animation. If it had no frames, there will be no model, so this creates a frame using the smd you provided as the frame.

If everything is typed into the QC, it should look something like this:

$modelname "custom/tutorial/compiletut.mdl"
$scale 1.0
$staticprop
$body "Body" compiletut.smd
$surfaceprop "metal"
$cdmaterials "models/custom/tutorial"
$collisionmodel "compiletut_phys.smd" {
$concave
}
$sequence idle "compiletut.smd" fps 15 ACT_IDLE 1


Now, save the QC by going to File>Save As. Give it a name with the extension as .qc, and in the "Save as Type:" Change it from Text Documents (*.txt) to All Files

Once you're done saving, move all your files, (except for materials) to the SourceSDK>bin>ep1>bin folder. I like to put things in that folder, because it is where the compiler is located, and it will be easier for the compiler to find the required files.

Now comes the compiling part. Select the QC file you created earlier, and Drag n Drop it onto StudioMDL. Once done so, a command prompt window should come up for a few seconds and then disappear. Once it disappears, it either means that your model has been compiled, or you something is wrong with it and it failed to compile. To confirm if it has been compiled or not, head over to the directory you stated before in the $modelname line of the QC. Mine was models/custom/tutorial.

If it worked, go ahead and try it ingame or in Model Viewer. This is what my final product looks like:

image1.JPG



Q/A


Q. When I compile my model, no errors showed up but when I go to view it in Model Viewer, the textures are pink and black squares.
A. Your model must be exported with the texture applied to it. It doesn't really matter what the texture is, but it has to have the same name as the vtf you created. If the problem still persists, make sure the paths in the VMT's are correct.

Q. When I try the model ingame, it shows up and the textures work, but the collision model doesn't work. I can walk right through the model.
A. You need to export the collision model with the texture applied to it. As stated above, it doesn't mater what texture it is, just as long as the name is the same as the vtf.


Thank you for reading my tutorial, if you have any questions, please do not hesitate to PM me or leave a comment.


Half Life Storm
Half Life Storm Studio

-SGT_kick_ur_ass
Added: 12 months agoTags: compiling, prop, model, static, sgt_kick_ur_as
Compiling a Prop_static Model
Added by...
Brought to you by...
Images

Studio Profile
 
This tutorial was brought to you by Studio Half Life Storm. Join a Studio.
Half Life Storm
The Mappers Corner!
Membership: On Request
Primary Skills: Compiling, Mapping, Modelling, Motion Graphics, Texturing, UV Mapping
Official Website!

Welcome to our page! We are a Studio that does customization for any source engine game or Mod, we can do many things that are related to this website, so if you want something done, just request it.

Want To Join?

In order to be accepted, you must be a dedicated and experienced mapper, with a minimum of 2 Expert classed Maps that are your creations.
Inception: 2 years ago
Tutorial Stats
Statistics on tutorial releases by Half Life Storm
Submissions: 61
Total Views: 274,385 (2nd)
Total Feedback: 1,039 posts
Average Rating: 9.4/10 (60th)
Unrated Tutorials: 10
Total Favs: 282 (2nd)
First Submission: 3 years ago
Latest Submission: 2 days ago
Favorite Category: CS:S > Mapping (38 releases)
The members of Half Life Storm.
Statistics
This tut's scores and traffic.
Rating: 10.0/10
Skill Band: Expert (9.0 to 10)
Assessments: 6
Views: 3,786
Favorites: 6
Feedback: 12
New Tutorials: Modeling
More tuts in this category.
How to import HL2 SMDS into 3DSMax 9
Difficulty: Beginner
How to make your own weapon
Difficulty: Beginner
Creating a weapon skin (everything)
Difficulty: Intermediate
Seperate mag from gun for rendering
Difficulty: Intermediate
Share It!
Get HTML Code
Get BBCode
Tell a Friend
Assessment
The community's verdict.
10/10
Detail
10
Usefulness
10
Readability
10
Stamps
This tutorial in a nutshell...
Detailed & Informative
Assess Tutorial
Tutorials are community moderated.
You cannot assess yet!
Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure.

To vote on this submission register or login.
Stamp Tutorial
How would you describe this tutorial in a few words?
You cannot stamp yet!
Stamps let you apply characteristics to submissions to help others understand them.

To stamp this submission register or login.
Messages
Provide constructive feedback. What is "constructive"?
Fibbs .
Bungalow | Y2M
Posted 8 hours ago
I can't find a skybox sized model in the default files and I can't really make my own. Could I just copy all the files, rename them and change the paths, then change the scale to 1/16th(can't remember the decimal)?
Bov .
Hate life and so do you | Y2M
Posted 5 months ago
SWEEEEEEEEEEEEEEET! I got it working now! I made the folders wrong so the path was wrong but its working now. I LOVE YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *KISS* *HUG*
Bov .
Hate life and so do you | Y2M
Posted 5 months ago
Great Stuff 10/10
morten8035 .
| Y2M
Posted 6 months ago
Pros: Thanks :D
Cons: None
Improvements: None
Notes: None
Assessment: [+] Approved - 10
- :Þ
.
Emo is the new Gay | Y2M
Posted 10 months ago
Cons: Change the name to "prop_static compiling for dummies."
Assessment: [+] Approved - 10
:.
Supah Mawdaratah! | Y2M
Posted 11 months ago
Looks good Sgt. It's very detailed!

10
Assessment: [+] Approved - 10
Bov .
Hate life and so do you | Y2M
Posted 11 months ago
How can i make a UV map?
Assessment: [+] Approved - 10
ClanFever .
Banned | Y2M
Posted 12 months ago
Looks good, may use it when I actually start making my own models.
Assessment: [+] Approved - 10
- Banned
WaterWar .
Finding a needle in a stack of needles | Y2M
Posted 12 months ago
Awesome tut!! REally good! What I needed! thanks =)
Assessment: [+] Approved - 10
Rokusho .
Subject Omega Lead Dev | Y2M
Posted 12 months ago
YES!!!

This is exactly what I need, I have never been able to compile my static prop models, until now.

A well written, informative and descriptive tutorial. Time to start compiling around a dozen models that I have never been able to!
Assessment: [+] Approved - 10
Add Message
You must login or register to access this!