Export the assets

Configure the components to export

Now in that Stage we will see the most important panels to export a functional prop model.

Open the SMD Options Panel by click on the icon from the shelf.

The Export panel Icon.

We will only Export the SMD Reference and the SMD physic model.

Check all the options as on the screen below.

Export tab of the mesa option panel.

Description :

  • Freeze and Reset Transforms : can be usefull is you forget to freeze , but never use this with animated models or the skin cluster will be deleted.

  • Combine and Smooth the physics models : Combine will combine all the polysurface from the physics layer into one object group ( don’t forget the shape node)

  • Export 1 frame Idle Smd : will create an animation sequence with one frame, use this for prop models and donot duplicate the name sequence when you set new animations on the animation tab.

  • Export Animation SMDs : will export all the animation defined on the Animation tab.

  • Export Texture (Vtex) : will export the VMT (materials) and VTF ( textures map) , the texture map must be a TGA format file.

  • Create a QC script : Will write the QC script on the disk. If you modifying the QC manually into a text editor you can uncheck that option.

  • Compile MDL : will compile the QC scriptwhen the full compile button is activated, don’t forget to have steam opens.




Paths setup

Path Tab after clicking on Default button.

Now just display the Paths Tab, click on GENERATE PATHS button and the paths are updated , if the fields are empty the model will not being exported.

SMD /QC path : The default path is the same path than the scene location, but it will pointed on the /modelsrc/ folder.

you can change the name of the smd, it will affected the name of the final MDL file. The folder /props/ must to exist into %GAME_PROJECT%/models/ or you will get an error ( check for write enable ) you must to save your scene when the path is changed, or the export will fail.

Materials / Textures Path : the path of the /materialsrc/ directory where the TGA files are stored.

This path must always be %GAME_PROJECT_SRC%/materialsrc/ when you click on Generate Paths.
If the path does not ended by /materialsrc/, you probably have to Set the Maya Project workspace on the right project workspace ( %MESADIR% /projects/SourceFilmMaker/ for that tutorial).

MESA Environment Variables section**

The section show the current paths set as environment variables on your system.

If you edit the environment variables , you must to restart Maya.

If the %GAME_PROJECT% and %VPROJECT% are not identical , it can be caused by the Authoring tools launcher that is running in background and overide the %VPROJECT% variable path.

The console Output log

  • You must to save your scene again CTRL+S
  • Click on the Full Compile button
  • Open the Script Editor to see the Report.

The log :

g:/steam/steamapps/sourcemods/modname
G:/Steam/steamapps/SourceMods/ModName_source/
modelsrc/props/
modelsrc/props/

----------------------------------------------
Writing SMD file
----------------------------------------------
exporting to G:/Steam/steamapps/SourceMods/ModName_source/modelsrc/props/cube_idle.smd
Extracting animation data frames 0 to 1

----------------------------------------------
Writing SMD file
----------------------------------------------
exporting to G:/Steam/steamapps/SourceMods/ModName_source/modelsrc/props/cube_phy.smd
pCubeShape2
getting triangles from pCubeShape2

----------------------------------------------
Writing .VMT files
----------------------------------------------
writing :phongE1SG
exporting shader phongE1
exported g:/steam/steamapps/sourcemods/modname/materials/models/props/cube.vmt
OK TO WRITE
vtf export for G:/Steam/steamapps/SourceMods/ModName_source/materialsrc/models/props/cube.txt
base texture map vtf creation
normal map vtf creation

----------------------------------------------
Writing SMD file
----------------------------------------------
exporting to G:/Steam/steamapps/SourceMods/ModName_source/modelsrc/props/cube.smd
pCubeShape1
getting triangles from pCubeShape1

----------------------------------------------
Writing .VMT files
----------------------------------------------
writing :phongE1SG
exporting shader phongE1
exported g:/steam/steamapps/sourcemods/modname/materials/models/props/cube.vmt
OK TO WRITE
vtf export for G:/Steam/steamapps/SourceMods/ModName_source/materialsrc/models/props/cube.txt
base texture map vtf creation
normal map vtf creation

qdir: "g:\steam\steamapps\sourcemods\modname_source\modelsrc\props\"
gamedir: "g:\steam\steamapps\SourceMods\modname\"
g_path: "G:/Steam/steamapps/SourceMods/ModName_source/modelsrc/props/cube.qc"
Building binary model files...
Working on "cube.qc"
SMD MODEL cube.smd
SMD MODEL cube_idle.smd
SMD MODEL cube_phy.smd
Model has 1 convex sub-parts
Collision model completed.
---------------------
writing g:\steam\steamapps\SourceMods\modname\models/props/cube.mdl:
bones 964 bytes (1)
animations 112 bytes (1 anims) (1 frames) [0:01]
sequences 220 bytes (1 seq)
ik/pose 164 bytes
eyeballs 0 bytes (0 eyeballs)
flexes 0 bytes (0 flexes)
textures 72 bytes
keyvalues 0 bytes
bone transforms 0 bytes
Collision model volume 64000.00 in^3
collision 0 bytes
total 1704
---------------------
writing g:\steam\steamapps\SourceMods\modname\models/props/cube.vvd:
vertices 4608 bytes (96 vertices)
tangents 1536 bytes (96 vertices)
total 6208 bytes
---------------------
Generating optimized mesh "g:\steam\steamapps\SourceMods\modname\models/props/cube.sw.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 25 bytes
strips: 27 bytes
verts: 864 bytes
indices: 264 bytes
bone changes: 16 bytes
everything: 1269 bytes
---------------------
Generating optimized mesh "g:\steam\steamapps\SourceMods\modname\models/props/cube.dx80.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 25 bytes
strips: 27 bytes
verts: 864 bytes
indices: 264 bytes
bone changes: 16 bytes
everything: 1269 bytes
---------------------
Generating optimized mesh "g:\steam\steamapps\SourceMods\modname\models/props/cube.dx90.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 25 bytes
strips: 27 bytes
verts: 864 bytes
indices: 264 bytes
bone changes: 16 bytes
everything: 1269 bytes

Completed "cube.qc"