Dota 2 items with blender
Dota 2 items with blender
So you got your model, you uploaded it to the Workshop…now what? Ideally, you should make some advertising material to get the word out, and get dem upvotes. If you got 3DS max or Maya, it is pretty straightforward. If you got Blender, however…
For many of us who do not have the budgets or commitment for 3D modeling software, Blender offers a great entry into the world of 3D for little to no risk. It is extremely fast, stable, and its interface has come lightyears (. ) from where it used to be, even surpassing some of the bigger names in certain areas. However, doing certain things is still very painful. One of those things at times: complex rendering. Fortunately, the good folks at the blender foundation had the foresight to see this coming, and made most of blender scriptable and repeatable.
On the flip side, Dota 2 models have a lot that go into them. They can be made of many parts, have different textures for each part, and have multiple separate textures defining effects. This is where the Cycles Dota2 Shader Approximation Node enters the scene.
…Blender
Blender is a free (as in beer and freedom) 3D production suite. It can be downloaded here:
http://www. blender. org
…Cycles
Cycles is an “unbiased” render, and officially the core renderer, of Blender 2.5+ (current version is 2.68 at time of writing). Unbiased means that the renderer is actually simulating light, by tracing lines between surfaces and light sources (referred to as ray-tracing). This is good and bad. It is good because you get ultra-realistic, detailed and complicated renders. It is bad because Dota2 natively is neither.
…GIMP
The GIMP 2 is a free (in both ways) image editor suite. It will be used for certain aspects of the texture. It can be downloaded here:
http://www. gimp. org/
The first order of business is to download the node. It can be downloaded here:
http://www. blendswap. com/blends/view/69403#comment-42945
You will have to login to download, but the account is free.
The next order of business is to open your model. If you don’t have one, use one of the characters from the workshop page here: http://www. dota2.com/workshop/requirements
. You will need to import the models with the blender smd importer from here:
Once the models are ready, we need to add the material node to blender’s repertoire.
Go to File at the top left, then click Append.
Find the blend file you downloaded, and click it. You will be presented with a folder view. Choose “NodeTree”, then “DOTA2-Shader-Appro”. Click Link/Append from Library.
To make sure that it was included correctly, go to the Nodes window, make sure that material is selected (the globe in the set of icons that includes a red checker and photos), and click add. Hovering your mouse above “Group” should reveal a node called DOTA2-Shader-Approx.
The node is now ready to be added to a material.
The first thing you need to do is make sure the model you are applying the shader to is selected. Then, open up the node browser and turn on materials mode (the globe next to the checkerboard). Actually click on the button referenced to on the picture above. This should show up:
This node does a lot of things to get models to look more valve-y. While a true Dota 2 shader is not yet possible with Cycles, we can fake it pretty well with this node and some tricks.
Using weaver as an example, he normally looks like this, with a straight diffuse-normal setup.
Notice the lack of shadow detail on the ridges.
But the node I’m providing does a lot of stuff, including the glowing eyes, brighter lighting, gloss color mixing, and more interesting shadows.
It’s just a matter of providing the correct information in the form of textures. Before you do anything, click add->output->material output on the nodes window, and hook up the shader approximator node up to it. Then click add->input->Texture Coordinates. You will need this in a moment.
From here on out, it is a fairly rote process. Click add->Texture->image Texture for each texture that is required. Then click the folder and find the needed image. Hook up this node to the input described. There is one special case that needs to be handled however, but we will get to that in a moment.
- connect input marked “Normal map” (yellow) to the image texture using the normal map (suffix _normal).
- connect input marked “Texture” to the image texture node using the color map (suffix _color)
- connect input marked “Mask2” to the node that has the image texture with mask 2 (suffix _masks1)
- connect input marked “mask1” to the node that has the image texture with mask1 (suffix _masks2).
- connect ALL image texture nodes’ vector input to the output marked UV on the Texture coordinate node
- The camera ViewAngl input currently does nothing.
For light maps, this is where GIMP enters the picture.
For weaver, it is only his glowing eyes, so I open up “weaver_masks1.tga” on GIMP. Go to “color->componants->Decompose”. On the pop up window, ensure the color mode is “RGBA”.
Ensure that only the alpha layer is visible, then press Ctrl+e to export the image as whatever you like. Add the image Texture like you did the others, and hook it up to the illum-Mask input. Remember the UV input for the texture. It should look similar to this when done:
At this point, repeat for all parts and items for the hero, and you are done with the material part.
Lighting makes a scene, so I will not give specific steps here. Here are some things to keep in mind.
As mentioned before, Valve uses something called Half-Lambert as a shader. This means models are lit brighter than their real world counterparts.
Since Blender does not give access to this physical ruleset, we have to fake it a little. I went about lighting weaver with a few planes with emit shaders on them for ambience, then I put some point lights fairly close to him. Point-lights are useful in this regard, as they do not render as a physical object, and can be put wherever needed. Just don’t get them too close, or your model will appear glossy.
The gloss on his right antennae is what I’m warning against. Otherwise good
A light box as shown here will increase render complexity and render time. You may want to consider compositing in backgrounds to save time.
If you plan on doing animations, parent the point lights to the armature.
The light source coming from the light mask should not go above 20 units. Remember, the way this renderer works, the model is actually emitting light. Going too high will add to the complexity of the scene and increase render time, not to mention look bad.
Before you start taking stock in your renders, go to the scene pane on the right and set units to “meters”.
Now, press space bar and type “add cube”. The cube that is spit out is 1x1x1 meters. Your character should not exceed the dimensions of a 2x2x2 version of this cube. Scale up or down as needed. The renderer does care.
While Progressive rendering does work alright, turning it off and tweaking the aspects of the render process may increase the quality/decrease render time. These settings worked for me and weaver here, but YMMV . Tweak as needed.
As with anything cycles, more samples means better quality, but be aware of the point of diminishing returns.

