Converting Existing Assets

From Valve Developer Community
< SFM
Revision as of 10:58, 5 April 2013 by Joed (talk | contribs) (Created page with "While sounds don't need to be recompiled, and can be copied to your ugc directory, models require some edits first. For your models, you'll need to make some simple edits to your...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

While sounds don't need to be recompiled, and can be copied to your ugc directory, models require some edits first. For your models, you'll need to make some simple edits to your .vmt's and your .qc's and copy a couple directories around. Here's the process in two steps: materials and models.


Materials


The best practice is to copy your .tga's in your content directory, and recompile them:

copy content/usermod/materialsrc/models/PATH/* to content/usermod/materialsrc/models/ugc/STEAMID/PATH
compile content/usermod/materialsrc/models/ugc/STEAMID/PATH/*.tga with vtex.exe
copy game/usermod/materials/models/PATH/*.vmt to game/usermod/materials/models/ugc/STEAMID/PATH
edit game/usermod/materials/models/ugc/STEAMID/PATH/*.vmt as described below


But if you're in a hurry, you can probably just copy the entire directory containing your .vtf's and .vmt's, and skip copying and compiling your .tga's:

copy game/usermod/materials/models/PATH/* to game/usermod/materials/models/ugc/STEAMID/PATH
edit game/usermod/materials/models/ugc/STEAMID/PATH/*.vmt as described below


The only edit you'll need for .vmt's is to insert "ugc/STEAMID" into your path like so:

change "$VAR" "models/PATH/TEXTURE" to "$VAR" "models/ugc/STEAMID/PATH/TEXTURE


Models


For models, there's only one choice, and that is to recompile them. While the texture format hasn't changed between different games and sdk's, the model format has. So to convert your models, you'll need to copy the directory containing your .qc's, .smd's, etc:

copy content/usermod/models/PATH to content/usermod/models/ugc/STEAMID/PATH


And for most models, you'll only need to make these changes to your .qc's:

change $modelname path/filename.mdl to $modelname ugc/STEAMID/path/filename.mdl
change $cdmaterials models/path to $cdmaterials models/ugc/STEAMID/path