This tutorial may or may not become obsolete through future updates to the Dota 2 Workshop Tools Alpha/Source 2 Model Editor.
Static Model vs. Animated Model (Supported model formats)
You will need a model preferably in .OBJ or .FBX format. .SMD and .DMX formats are also supported, but require some knowledge to export and subsequently import into Source 2. Most modeling programs support .OBJ format exporting so .OBJ is recommended (though, for static props only; otherwise use .FBX if your model has animations).
Importing the model/re-assigning the model's textures:
- Open Vconsole (this is important for debugging the texture-loading issue).
- Import your .OBJ/.FBX. Make sure you have the model somewhere in dota_ugc/content/dota_addons/<addon name>/models/<model name> (ie. dota_addons/mygamemode/models/potofgold.obj) before you import it. Texture should be in a similar folder structure, but replace \models\ with \materials\.
- Look through Vconsole and find the name of the texture that the model is looking for (and subsequently can't load). From here, you'll need to create a .vmat in the material editor, of the same name as the missing texture. More on that below.
Creating a VMAT for your model:
- Go to the material editor and create a new file.
- "Save as" as the texture name that's required by the model (under dota_ugc/content/dota_addons/<addon name>/materials/<model name>).
- In the "Variables" tab (in the middle of the material editor, under the "Color" tab) browse to the model's source (.tga or .psd) texture (should also be under dota_ugc/content/dota_addons/<addon name>/materials/<model name>, as pointed out earlier). Your texture should appear in the preview viewport, on the model. If not, hit ctrl+s to save, and it should appear.
- Now, your model should have the texture appear on it! If not, you'll need to add a Material Group onto the .vmat and add the texture from there. More on that below.
Creating a Material Group for your model/material:
- In your model editor window, go to the "Model" tab at the top, and then select "Add Material Group".
- Go to the Outliner on the left and expand the "Material Group List".
- There should be 2 materials there, default and materialGroup_1. Do not touch default, leave it as it is. Select materialGroup_1 instead.
- On the opposite side of the model editor window, there should be a "Materials (1 items)" tab. If not, click the blue "+" on the very right.
- From here, expand the tab and browse for your .VMAT file that you made earlier from the source texture, if it's not already there.
- If it IS already there, you might need to take the .vmat and put it in your root addon folder (move it up to dota_ugc/content/dota_addons/<addon name>, instead of dota_ugc/content/dota_addons/<addon name>/materials/<model name>)