Import SMD mesh and skeleton

Introduction

  • Decompile mdl to get the smd animations.
  • Push the smd ref and animation into %GAME_PROJECT_SRC%/modelsrc/ directory.
  • Convert the texture from VTF to TGA and push the files in %GAME_PROJECT_SRC%/materialsrc/ directory
  • Open maya and set the current maya project on dota 2 workspace.




Import Reference Model

To import an SMD file, mesa will only read the file to build the scene. So the file can be anywhere you want on your hard drive Importing a heavy smd reference file could take few minutes for Maya to built the scene by the script way.

You can follow the process from the output window (trace).

Click on the import SMD icon, and from the file dialog.


Do not forget to convert the VTF in a TGA format file and also put the file into the right place in /materialsrc/.

When reading the smd file maya script SMDMakeHL2Shader.mel will fail to find the TGA, because the script do not read into the QC file to determine the path set on the $cdmaterials command.

// Error: file: G:/Steam/steamapps/SourceMods/ModName_source/mesa/smd/smdMakeShader.mel line 55: Invalid object or value: find file texture:

You will have to load the TGA file(s) manually from the phongE shader(s) on the model.

You can’t save your scene at that moment, cause the scene contains an UnknowDag Object that make the saving impossible in maya ASCII format, any way you can save in maya Binary format.

So if you are done and just would like to import a none animated model, you must to delete the transform1 and the unknowdag1 node directly from the Outliner ( select and delete key on keyboard).


If you wish to import some animations on your reference model, you must to save the maya scene into maya binary format, cause maya AScii format can’t to save the data contained into this unknowdag object keep that node into your scene.




The tutorial is finish and you could continue the reading : if you read the Dota 2 assets creation guide, click here to return to the summary of the Guide. You should want to learn now how to import smd files into maya using MESA, click here (incoming) . so let go to the new step, importing animation sequences




Import Animation Sequences

When importing Animation :


You should get this Error :
// Error: file: G:/Steam/steamapps/SourceMods/JL_Source/mesa/smd/smdRead.mel line 510: No object matches name: unknownDag.comps[0] //

Open the outliner and look for the Tranform1 node, open the hierarchy by clicking on the small +, and you will see a unknowdag1 node.


this will will prevent you to save your scene., this unknowdag node must be rename from unknowDag1, to unknowDag ( without the number at the end ).

Try to import a smd animation again and the error should have disappeared.




Import Multiples Sequences

This is the global process :





The tutorial is finish and you could continue the reading : if you read the Dota 2 assets creation guide, click here to return to the summary of the Guide. You should want to now learn how to set up your items/weapons into maya , before to export it, click here (incoming) .