<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> CITY 7: TORONTO CONFLICT V2
Models
Level Design

SOURCE MODELS
how to import props

   


You need a plug-in to export SMD from 3ds max created by wunderboy found here
You can all so view VTF textures in Max with a plugin found here

There are 5 prop types:
- Static (basic prop)
- Physics (breakable props once health points deplete)
- Rag doll (can hold animations, load as a dynamic prop and can be an NPC)
- Dynamic (play animations, toggle visibility and to parent to another entity)
- NPC (Non Player Character, largest model to import)

There are other useful props entities such as:
- prop_scalable (new entity in The Orange Box)
- prop_dynamic_override (used to parent or toggle visibility of a static or physics model)
- prop_physics_override (make a static model a physics prop with a override)
- prop_door_rotating (Door props have more details like handles, use this entity make a door function out of a prop)

Use my bat file importer to quickly compile within command line access
It's very usefull for targeting the game folders, download it here
You are required to put the folder into your c:\ or you'll need to edit the bat file

Our team uses a blank mod called "Asset test mod". Our Artists compile our materials and models to this mod to wait for approve before transfering the files to our main build.
You are required to put the mod into C:\Program Files\Steam\steamapps\sourcemods
Download the Asset test mod here

Texture for models use the ”VertexLitGeneric" shader instead of "LightmappedGeneric"
Valve sorts these differences by placing model textures in materials\models\...
If you use a model texure on bsp surface it will flicker black
Use a template vmt for models here

      Sean
   

IMPORT STATIC, PHYSIC AND BREAKABLE MODEL
type 1 import

   

Import example from start to finish
Stream video tutorial part 1 – Learn how to import a teapot from 3ds Max
Stream video tutorial part 2 – Learn how to compiled a teapot to a static model

Stream video tutorial part 3 – Learn how to create a physics model and fix the compile

By default you can import 25 collision pieces, if you need more add $fullcollisions to the qc file
Each collision piece must be a convex mesh and have it's own smooth group

3ds Max is limited to 32 smoothing groups per object; make sure to clear all smooth groups before assigning numbers to each collision piece

Static model:
Static_model.qc – QC file with commands and explanations
Stream video tutorial part 1 – Learn how to import a batch of static models from 3ds Max
Stream video tutorial part 2 – Learn how to compiled a static model
Static_prop_Fire_hydrant.zip – used in video tutorial

Physics model:
Physics_model.qc – QC file with commands and explanations
Stream video tutorial – Learn how to compiled a physics model with multiple skins
Physic_prop_Oxford_chair.zip – used in video tutorial *to come in a month*

Physics breakable model:
Physics_breakable_model.qc – QC file with commands and explanations
Stream video tutorial – Learn how to complie a breakable model and propdata (exploding prop)
Breakable_prop_Cannon_bomb.zip – used in video tutorial

Physics models require propdata to compile
Select the model's propdata from the hl2\scripts\propdata.txt

QC command for mutiple skins (make sure to insert it after the models header)

$texturegroup skinfamilies
{
{ "skin1.vmt" }
{ "skin2.vmt" }
{ "skin3.vmt" }
}

      Sean
   

IMPORT RAGDOLL, ANIMATED MODEL OR MULTI-PLAYER CHARACTER
type 2 import

   

Rag doll and Dynamic animated model:
Ragdoll_model.qc – QC file with commands and explanations
Dynamic_animated_model.qc – QC file with commands and explanations
Stream video tutorial - Learn how to complie a rag doll/animation model
Ragdoll_Animated_prop_Sand_bag.zip – used in video tutorial

Type 2 imports physics command changes from $collisionmodel to $collisionjoints

When a model is used as an dynamic prop, use bone followers to update the collision pieces
$keyvalues { bone_followers { "bone" "bone1" "bone" "bone2" "bone" "bone3" } }

Different bones can have different surface properties with the following command
$jointsurfaceprop "bone1" "metal"

      Sean
   

MULTI-PLAYER CHARACTERS, WEAPONS AND NPCs
type 3 import

   

Multi-Player character:
Multi_player_character.qc – QC file with commands and explanations
Stream video tutorial – Learn how to complie a multi-player character
Multi_player_character.zip – used in video tutorial

*to come*

      Sean
   

IMPORTING TO SMD
important notes and items to check if you’re having importing problems

   


SMD Main/Reference model file
Important steps:
- Merge and collapse the modifier stack
- Make sure the object and pivot point is on 0, 0, 0 and that the X, Y, Z pivot faces correctly
- Name the object consistently through out the collision, LOD and reference model;
- Put the model’s base texture into a material (diffuse bitmap slot) and apply to the model
- Export the model as a “reference” model

Notes:
- Every object you export creates a master bone with the objects name on it
- A model's mesh will not export without a bitmap texture assigned to it
- The exporter saves the filename of the material in SMD (not the directory path)
- To correct a SMD material name, open the SMD in Notepad and use “replace word” to change a material name attached to each face

If you using bones on a dynamic or rag doll model:
- Edit the envelopes influences rather then the vertexes ids
- LOD models will bend more properly

LOD (Level of detail) model
Remove ploygons from the Main/Reference model

Notes:
- Remove polygons that would not seen or blend in at a distance
- Use the preserve UV map in the EditPloy modifier and the MultiRes modifier
(for natural objects only)
- Make sure the texture mapping remains the same
-You should never have separate unwrap texture sheets for LODs

Lofts are great for LOD game assets!
They feature dynamic unwraps that stay consistent with any number of segments.
Use them when you can.

SMD Collision model file
Important steps:
- Create a basic set of primitive objects to fill the volume of the reference model
- Merge all primitives into one mesh
- Make sure the object and pivot point is on 0, 0, 0 and that X, Y, Z pivot faces correctly
- Put the model’s skin bitmap in to a material and apply to the model
- Select all the faces and clear all the smooth groups
- Select the elements (primitive) within the sub-objects
- Assign each primitive a different smoothing channel
- Export the model as a “reference” model

Notes:
- Use no more then 20 pieces
- These primitives must be completely closed

If you’re using bones on a dynamic or rag doll model:
- Each bone should weighted to a sub-object primitive piece
- Each sub-object primitive piece must bend as whole
- Make sure each bone has an influence of 0 or 1 and nothing in-between (absolute weights)

SMD Animation Files
Important steps:
- Key frame all movement before exporting (only bone animation key frames are exported)
- Export the model as an “animation” model(The mesh will not be exported, because it already exist in the reference SMD and it weighted to exact bone hierarchy)

*All models need idle animations*

Notes:
- For Idle poses make sure you save with one frame on the time line (to save on file size)
- You can use the reference model for an idle animation
- Bone properties and joint constraints will not be exported

To author the joint constraints use the Model Viewer.
The save feature Model Viewer, allows you to paste (crtl-v) the joint constraints into text files) Joint constraints are most used for rag doll settings, every NPC should have it.

      Sean