Let’s go , now that Mesa is installed we will export the Sample scenes.
1. Open Maya !
2. Open the Source SDK from Steam tools and set the right game you want to export for.
Note :
If you want to export to Dota 2, and TF2 you will have to edit your GameConfig.txt .
Example path : c:/steam/steamapps/your-steam-account/sourcesdk/bin/source2009/bin/gameconfig.txt
Open it and copy the default configuration and edit the path to Dota2, or TF2.
With Portal 2, you must download the Portal 2 authoring tools, from Steam Library > Tools.
with L4D and L4D2, you must download the respective Authoring tools from Steam library > Tools.
3. Set the current Project on ModName_source ( or read the tutorial )
4. Open the maya scene in “/ModName_source/scenes/props/cube.mb“
5.Take a look on the Shelves to locate the MESA Shelf.
6. Click on the First Icons “ SMD Options “, and display the Paths Tab
The smd option attributes for the export are stored into the maya scene, so you probably have the same path than my personal path.
7. click on Default
SMD / QC path : this is the location where the SMD and the QC script will be exported.
Note :
The default name will be identical to the name of the scene., you can change the name, but it’s better to have the right scene name than your final MDL.
This is also important to not change the directory or the export will fail to export.
Materials Path : The materialsrc path is always the materialsrc directory, if when you click on Default button and the path is not the “/mod_source/materialsrc/“, you probably get some trouble to export the textures.
The information at the bottom are just here as informative title , and to tell you what environment variables are set in your maya.env .
It could be helpful if you work on several mod projects.
8. now switch to the Export Tab.
The scene is properly set up to export :
- Reference model
- Physics model
- Lod Range model
- Textures TGA to VTF
- Material files VMT
- Animation sample ( Animation tab)
9. Click on OK settings .
10. Important : Save the Maya Scene.
Note :
Do not forget to launch the source sdk and to set the current Game, on your Mod Project. or the compiler will fail to export the assets.
11. Click again to open the Smd option panel
12. Click on Full Compile .
You can see the progress bar , and you get some feedback from the script editor and the trace window.
source smdOptionWindow; smdOptionWindow; CubePhys G:/Steam/steamapps/SourceMods/ModName_source/ modelsrc/props/ modelsrc/props/CubeLod64Shape OK TO WRITE base texture map vtf creation normal map vtf creation CubeLod128Shape OK TO WRITE base texture map vtf creation normal map vtf creation CubeLod256Shape OK TO WRITE base texture map vtf creation normal map vtf creation CubePhysShape OK TO WRITE base texture map vtf creation normal map vtf creation CubeShape OK TO WRITE 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_LOD_64.smd SMD MODEL cube_LOD_128.smd SMD MODEL cube_LOD_256.smd SMD MODEL cube_idle.smd SMD MODEL cube_anim_test.smd SMD MODEL cube_phy.smd WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!! WARNING: Error with convex elements of cube_phy.smd, building single convex!!!! Model has 1 convex sub-parts Collision model completed. --------------------- writing g:\steam\steamapps\SourceMods\modname\models/props/cube.mdl: bones 964 bytes (1) animations 236 bytes (2 anims) (4 frames) [0:00] sequences 436 bytes (2 seq) ik/pose 164 bytes eyeballs 0 bytes (0 eyeballs) flexes 0 bytes (0 flexes) textures 72 bytes keyvalues 56 bytes bone transforms 0 bytes Collision model volume 22.09 in^3 collision 0 bytes total 2132 --------------------- writing g:\steam\steamapps\SourceMods\modname\models/props/cube.vvd: vertices 1152 bytes (24 vertices) tangents 384 bytes (24 vertices) total 1600 bytes --------------------- Generating optimized mesh "g:\steam\steamapps\SourceMods\modname\models/props/cube.sw.vtx": body parts: 8 bytes models: 56 bytes model LODs: 48 bytes meshes: 36 bytes strip groups: 100 bytes strips: 108 bytes verts: 864 bytes indices: 288 bytes bone changes: 32 bytes everything: 1528 bytes --------------------- Generating optimized mesh "g:\steam\steamapps\SourceMods\modname\models/props/cube.dx80.vtx": body parts: 8 bytes models: 56 bytes model LODs: 48 bytes meshes: 36 bytes strip groups: 100 bytes strips: 108 bytes verts: 864 bytes indices: 288 bytes bone changes: 64 bytes everything: 1560 bytes --------------------- Generating optimized mesh "g:\steam\steamapps\SourceMods\modname\models/props/cube.dx90.vtx": body parts: 8 bytes models: 56 bytes model LODs: 48 bytes meshes: 36 bytes strip groups: 100 bytes strips: 108 bytes verts: 864 bytes indices: 288 bytes bone changes: 64 bytes everything: 1560 bytes Completed "cube.qc"
13. Open the HL Model Viewer
Voila