How to create dota 2 assets ? (Steam Workshop)
Installing the tool to export to Dota

To export your model into Dota you will need to export it in .DMX with the addon "Blender Source Tool": http://steamreview.org/BlenderSourceTools/ (don't unzip it)

To install the add-on go in File > User Preferences... in the Add-ons tab click "Install Add-on from File..." and select the .zip. Type "Source" in the search bar and make sure it is enabled.



Importing and editing a game character from Dota

You need to import a character, your model won't compile if it's not attached to the armature of it. You can find the heroes of the game here:
http://www.dota2.com/workshop/requirements

Import the SMD files with the add-on if there is only an FBX, they often have a bug with the scale of the bones, if this happens read my post bellow on how to fix it.

To import your SMD files you can use shift and left click to highlight the files and import them all at once. Each SMD have the armature but it will be imported once.

The model will be laid down horizontally and be very big in the viewport, you can orient it correctly and apply the rotation but you will need to keep the same scale when exporting. You can scale the bones to 0.01 to model your assets.

In this example I am adding the head of Suzanne on top of the head of the heroe Alchemist.

To attach it to the armature, select the model you have made first then the armature, then press Ctrl+p and select "With Empty Groups".

To bind the model to a bone you need to go in the property menu, in the Data tab with a triangle as an icon, in the Vertex Group menu. You will see every bones listed, to order them alphabetically click on the black arrow pointing downward then click "Sort by Name".



In edit mode select the vertices you want to bind to a bone, I select the entire Suzanne head, stay in edit mode and in the menu I select the head bone and click Assign with a Weight of 1 (1 = fully connected).



Now to test it I select the head bone in Pose mode and move it, the model now moves with it, if not check if it is connected to the correct Vertex Group.

Exporting your model

In the property menu go in the Scene tab, it's the third tab from the left. Scroll down to Source Engine Export. Set the path where to export it. For the format make sure it is DMX. Change the DMX Version to the highest numbers: Binary 9 and Model 22.

Note: you can't name your DMX, you must name your asset in the "n" menu. The file will take the name of the active selection.



You can also create a basic normal map to test your model, by creating an image filled with the color RG: 0.502 B: 1.

Compiling and testing in game

To test your asset in Dota 2, right click on the Dota 2 game on Steam and go in Properties. Click on the DLC tab and check Dota 2 Workshop Tools DLC, steam will automatically download it.

When you will launch Dota, a pop-up window will ask you if you want to launch the game or the workshop tool (if it doesn't appear it means the download isn't finished), select the second.



Click on Create New Item, then Hero Item..., select your hero and slot that your asset will replace, then click Select.

Name your asset you can't use uppercase and spaces.

Import the normal map. For the color map (diffuse map) you can use a basic color texture to test your model and silhouette.

For now set the Specular Intensity Mask with RGB at 0.1 because on some heroes the asset is too shiny and a Rim Intensity Mask at RGB 0.2.



If you get an error during the compilation here are the things to check:


Your asset must be attached to the armature even if there is no bone weight.
Your asset must have UVs.
Your asset must have a material (Cycles or Blender Render).
If the asset isn't visible make sure you have reseted the scale of the armature with Alt+s.
The color or normal map are missing.
The texture resolution and polycount are too high, but this is just to publish your asset, it will compile without the correct values you can check the values in the hero download page.
You haven't export in Binary 9 and Model 22 version.




You can play the different animations, by default it's on idle and the Preview in game will launch the game.
Do a test in the Dota map, remember that most details are seen from the top view, remove unnecessary details.

Textures

For the textures use a suffix, for example alchemist_head_color.tga. Use the TGA format and the texture resolution of the hero requirement page.
Here are all the suffixes in the same order than the Workshop settings:


_color.tga (I explain how to create this texture here: How to generate a fake hand painted texture (Blizzard like), Borderlands effect or Pixel Art effect)





_transparency.tga
_normal.tga (base RG: 0.502 B: 1)





_detailMask.tga
_fresnelWarp.tga
_metalnessMask.tga (RGB: 0 = non metallic, RGB: 0.6 = metallic)


0:



0.6:




_selfIllumMask.tga
_specularMask.tga (RGB: 0.22)





_rimMask.tga (RGB: 0.2 = non metallic, RGB: 0.6 = metallic)


0.2:



0.6:




_tintByBaseMask.tga
_specularExponent.tga


Valve has made a post with advice on texturing: https://support.steampowered.com/kb/9334-YDXV-8590/dota-2-workshop-character-art-guide
More informations about the different maps: https://support.steampowered.com/kb/3081-QUXN-6209/dota-2-workshop-item-shader-masks

Fixing the bones (if an FBX is used)

When the SMD files aren't available the only option is the FBX. In this format the bones aren't oriented and scaled correctly, but we can export a .DMX from Source Filmmaker.
In Blender import the .FBX an delete the armature, the character will lay down, orient it correctly, you can apply the rotation. If you change his scale don't apply it.

To download Source Filmmaker go in your Library of games and change the Games menu at the top to Software, you will see Source Filmmaker, do not launch it from there because you won't have access to the Dota assets.



Launch the Dota Workshop tools and click at the bottom on "Launch Custom Game Tools".



A window will open called Asset Browser, click on the Source Filmmaker icon at the top it will launch it.



Create a new session, name it whatever you want.

Open the Animation Set Editor tab at the top left and click on the "+" icon then click on "Create Animation Set For New Character".



Then choose your heroe, it will appear in the viewport.

Now do a right click on the heroe name followed by a 1, it is the first line and select Export > Animation. This will export your model in his default pose with his armature, you can name the file heroename_rig_fix for example.



Import the asset it's a .dmx. Go in Pose Mode, it's important that you use this mode and not the Object Mode. So in Pose Mode select every bones with "a" then press Alt + g and Alt + s, the armature will be horizontal and on the side.

In Object Mode orient the rigging to match the heroe then apply the rotation.

Select every meshes of the heroe and in the modifier tab assign the armature, if the mesh doesn't move it means the armature is oriented corectly. In Pose Mode the character should move with the rigging.



Create a courrier


Default courrier model: http://media.steampowered.com/apps/dota2/workshop/courier.zip
More informations: https://support.steampowered.com/kb_article.php?ref=8986-WRAZ-1046


Courrier requirement:


Two courriers one on the ground and the other flying each with a LoD1 and eventually a LoD0. You can use the suffix _model for the one on the ground and _wind for the other
LoD0 (optional, used for the portrait): 3500 triangles
LoD1 (in game): 3000 triangles
Texture resolution: 512x512
Animations: Spawn (ground only), Idle, Run, Die
Special bones: attach_hitloc (where the attacks land), left eye, right eye


Create a ward


Default ward model: http://media.steampowered.com/apps/dota2/workshop/ward.zip
More informations: https://support.steampowered.com/kb_article.php?ref=8799-WLXN-3860


The observer ward and the sentry ward share the same mesh and UVs, the only difference is there texture. What differentiate them the most is the color of the eyeball, this is why it must be big and visible from above.

Ward requirements:


LoD0 (optional, used for the portrait): 2000 triangles
LoD1 (in game): 1500 triangles
Texture resolution: 256x256
Animations: idle, idle_alt, run, spawn, turns, wings_die, wings_idle, wings_run, wings_run_alt


Particle effects

More informations: How to create dota 2 assets ? (Steam Workshop)

The following heroes require effects for their weapon(s): Abaddon, Anti-Mage, Bounty Hunter, Doom, Ember Spirit, Juggernaut, Kunkka, Phantom Assassin, and Skywrath Mage.

You must create a contour of you mesh with an higher vertex count than your weapon for an higher precision.
Export the DMX separately, use the same name than the weapon and add the suffix "_fx".