|09-12-2009, 09:33 AM||#1|
Exporting Static Models from 3ds Max to the Source Engine
Hello, folks. Just wanted to swing by the boards and offer this little shred of justice to the community. We're currently students working exhaustively on a MOD project and helped to develop a pipeline for exportation that is being implemented in our Game Arts curriculum. But, since we had all the material already typed out and these boards are usually teeming with questions about exportation, I thought I'd repay all the kindness shown us and post this up here for everyone to take advantage of, add to, comment on, etc.
Obviously its not centered up correctly and eventually I might take the time to clean up, but for now you get the point.
Hope this helps out and enjoy the read.
Exportation from 3ds Max to Source
Understanding the Bold (Key):
Naming Conventions: These must be followed stringently in order to have everything reference correctly.
Important: This is a necessary step in the process and cannot be avoided.
Note: This is an aside comment that relates to each point in the list, though they are not pivotal steps.
1. Download the necessary plug-ins.
a. SMD Exporter for 3ds Max
ii. Important: Place in Program Files/Autodesk/3ds Max/Plug Ins
ii. Note: Keep a shortcut on your desktop for easy access.
c. GUI Studio
ii. Note: Stand alone program, keep on desktop.
2. Make a folder for your model.
a. Note: Place on the desktop for easy access.
3. Model must be completely UV mapped.
a. Note: If this isn’t completed you could run into compilation errors.
4. You are allowed multiple materials for your model.
a. Important: Only have a texture referenced in the diffuse channel.
b. Important: Textures NEED to be square.
c. Note: No bump map, no specular map, etc (You add these later, Step 10g below).
IMPORTANT: Every model you export, even static props, NEEDS to follow Steps 5, 6, 7, and 8!
5. Export as a SMD in 3ds Max using SMD Exporter.
a. Important: Export as Reference SMD.
b. Note: Do not check anything.
i. Note: We have yet to venture into model exportation that requires editing which boxes we check, so we’re still learning how each option functions.
6. Export as a SMD again for the Idle Sequence.
a. Naming Convention: yourmodelnamehere_idle
b. Important: Check Export Sequence SMD.
c. Note: For a static prop range is 0-1.
7. Create and Export your model’s Physics Box.
a. Naming Conventions: yourmodelnamehere_phys
b. Important: Must be textured.
c. Important: Export as Reference SMD.
d. Note: Do not check anything.
i. Note: All of the export functions can be found in the README file which comes with the plug-in.
e. Note: Preferably near the same size.
f. Note: Preferably not a complicated model.
g. Note: Make sure your polygons are all in the same smoothing group. If you don't you will get the following error: WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
a. Note: Consult a programmer if you're wondering why this error has nothing to do with smoothing groups.
8. Reference the Physics Idle for your model.
a. Use the Reference SMD again as it already contains a single frame of animation data. Can save some time/filecount in some cases..
9. Find the Photoshop file that 3ds Max references as a model texture.
10. Take the texture and drag/drop onto VTFEdit.
a. Naming Conventions: Name the same as the bitmap texture you applied to the diffuse channel.
b. Important: Click Save.
c. Important: Click on Tools.
d. Important: Create VMT file.
e. Note: Do this for each texture if you have multiples.
f. Note: Shouldn’t need to edit any of the settings.
g. Note: Integrate any bump maps, normal maps, etc. during this phase.
11. Right click on yourmodelnamehere.smd, click on open with Notepad++.
a. Important: Use the Word Replace tool to replace all of the yourmodelnamehere.tga with yourmodelnamehere.vtf.
i. Note: You might want to set it so that all of your SMD extensions open with Notepad++ only for ease later.
b. Important: You NEED to do this for Physics SMD.
c. Note: You do NOT need to do this for animation SMDs.
12. Create a .QC file that links your model with the Source Engine.
a. $modelname describes where the engine finds the compiled model.
b. $body describes the geometry.
c. $cdmaterials is the directory for the materials it needs.
d. Defines your model as a static prop.
e. $sequence defines the idle sequence and any additional animation sequences.
f. Note: Or use our .QC file as an example, replacing “hydra” with “yourmodelnamehere”.
13. Go to Program Files/Steam/Steamapps/Yourmod.
a. Important: Create a materials folder if you do not have one.
i. Create a custom models folder if you do not have one.
1. Create a folder with the same name of the model you wish to create.
a. Drag/drop yourmodelnamehere.vmt and yourmodelnamehere.vtf here.
b. Important: Create a models folder if you do not have one.
i. Create a custom models folder if you do not have one.
1. Create a folder with the same name of your model you wish to create.
14. IMPORTANT: If you do NOT do these steps correctly it will crash and respond with an appropriate error.
15. Drag/drop your .QC on GUI Studio.
a. Important: Select Orange Box.
b. Important: Select yourmodnamehere from the dropdown menu.
c. Important: Compile.
d. Check output for errors.
i. Note: It doesn’t like two vertices being at the same exact same spot.
ii. Note: All vertices at the same coordinate need to be welded together.
iii. Note: Might yell at you if you’re over the polygon limit.
1. Haven’t run into this problem yet.
16. Boot up Steam or restart if you already have it open.
a. Goto Tools.
i. Source SDK.
1. Model viewer.
a. Load yourmodelnamehere.mdl.
b. If done correctly, it will be in your custom models folder.
Changing your material does not require recompiling.
SMDs and .QCs do not need to be in your Source mod folder as they are the uncompiled versions.
10k polygon practical limit.
Your model will NOT compile without the folders from Step 13 being created correctly.
9/9/09 - Version created, edited, and documented by:
Owen Snyder, Will Teixeira, David Deschenes, and Jacob Babineau
9/13/09 - Edited thanks to Wunderboy!
9/14/09 - Edited link to GUI Studio, thanks to Combat-Enforcer
Last edited by Vaenyc: 01-15-2010 at 04:35 PM. Reason: Updating
|09-13-2009, 12:43 PM||#2|
Join Date: Oct 2007