Category Archives: Guide

Introduction to Dota 2 particle systems

Particles Splash

Introduction

This guide will show you the way to test and put your particles in Dota 2. It is actually fairly simple but requires a lot of tinkering to get a fine result. I’d also like to point out that adding particle effect to your item does not make it epic, mythical or any other quality boost, neither it allows for lazy design. It’s also harder for Valve to implement items with custom effects, so think twice if you need one.

Continue reading

Vertex-Based Particle Import

So we’ve got a new particle system to play, let’s see what it does!
Particles that we allowed to change right now include special weapons effect, like Bounty Hunter Jinada glow, Anti-Mage glowing weapon that replaced vibrating lightning and Phatom Assasins golden glow. Let’s review what Valve told us!

For items which have effects on them by default, such as edge glows, item authors will be required to submit a .dmx or .fbx mesh which defines where these particles should go on their item. This will use base effect authored for the item and place the particles accordingly.

To do this, create a new mesh, much like creating an LOD. However, this mesh will represent particle positions, one per vertex. Triangles, faces, and general connectivity do not matter on this mesh. The best way to create a mesh for this is to treat it as a single polygon. Keep in mind that particles will be created from all vertices in the mesh, so do not attempt to create valid convex or closed triangles in the traditional sense if this creates vertices in undesired locations.

While it is possible to use the vertices from the original mesh, generally speaking the density will not end up being appropriate for the effect. In addition, UV’s, hard edges, etc. can create duplicate vertices in some cases which is generally undesirable.

There is a hard limit to the particle count allowed for each item.

While each piece of modeling software will vary, here is an example of how to quickly create effects for an item in Maya :

First, start with your finished geometry. Select this mesh and Modify->Make Live. This will allow us to use the base mesh to draw vertices for our new mesh, while constraining them to the topology of the original.

Next switch to the Mesh->Create Polygon Tool. This will allow you to draw the new FX mesh locked to the live geo. The entire mesh will be a single polygon. Draw points where you wish to see particles, such as along a blade edge. The density of these points will usually be higher than that of the normal mesh, it may require a bit of trial and error to get the proper density for the desired look.

Once you’ve added all the points, you can export just the effects mesh. Name your mesh the same as the item with a _fx postfix, similar to an LOD.

Loading the effect into the item submission tool will show you a preview.

WHAT THE FUCK AM I DOING?!

001
While this seems confusing at first, let’s take a look at the particle effects already ingame:
002
As you can see, in reality, particle “line” is actually a bunch of dots. Every “dot” is actually a vertex in this “particle mesh”, so let’s try creating one ourselves!
So following Valves advice, let’s get our weapon model, decide where we want our particles (on the edge) and we will use the “blade” edges for our particle mesh. Just select them, detach and skin the same way you skinned your weapon.
003
Export it, and load it up in the importer!
004
It works! Kind of.
005
As you can see, the effect is overwhelming, you can actually see the space between the particle dots, and there’s two rows of them! This happened because we grabbed the blade faces, but since it’s vertex-based particle effect, the vertices is all that matters! Because we grabbed the edge without any change, it repeats the wire and prodece the effect we don’t want. So let’s fix that! Getting back to our “particle mesh”, first, let’s add some more vertices on the edge! You can do this however you want, i just used Cut tool.
006
After adding some more vertices, let’s see how it looks ingame!
007
Great, now it’s smooth, seamless and looks almost great! It’s still overwhelmingand we still need to remove the second row that we left there. Let’s get into max and just delete them, right? Select them
008
Press delete, and bam!
009
Everything is gone D:
While our particle system is vertex based, it still needs some geometry too back it up (even if you managed to leave isolated vertices, it’ll give you error on import).
So what we want to do, is that we want to grab all the vertices we don’t need, weld them together so we can keep our vertices in one ugly polygon. Don’t worry if it looks bad, it’s only vertices that we care about.
010
Let’s test it ingame now:
0111
Nice! We got rid of the second row and particle effect looks fine and dandy now! Remember that you can break it up all you want, skin them to any bone you like, get creative!
011
As a side note, if you’re creating the particle mesh from your geometry mesh, make sure to reset uv mapping, you can just drop planar UV map on it. This needs to be done in order to avoid vertex doubling on the uv shell edges.

You can check out finished submission here

Zbrush Rendering

Tried something new and rendered it in zbrush, it gives bunch of nice masks and you can bake the lighting and materials and on and on.

Might as well share the wisdom.
First of all, you import the hero model you decompiled/got in the archive.
001Then you import/merge your items and they should stick if you skinned em.
002
Then you import the animation file that you can decompile, or you can pose the guy yourself.
003
After that, you offset the uv maps for every item. One to the left, one to the right, one to the top and so on.
004
Then you attach everything together, select the UV map and fit it into the default size and export it without the bones.

005
Now we need to combine the textures for every item on one sheet and save it separately.
006
Load up the Zbrush and import our hero.
007
Now assign the texture to him (you may want to flip it vertically)
008
After that you may want to subdivide him a couple of times without smoothing and then a couple of times with smoothing On.
009
Now you can either fix something right in Zbrush, create polypaint from texture to add some adjustment or start rendering right away.
010
Zbrush gives you bunch of settings and works very smooth, i’ll definitely try it some more. There’s also bunch of tutorials about it.

Masks

With the testmap issues fixed and bunch of new heroes added to the importer tool I feel like it’s time to talk about texture files and masks . The requirements page tells us that:

  • The “_color” texture can be 24 or 32 bit.
  • Alpha channel of 32 bit “_color” texture can be used as opacity for your item if alpha is allowed for this hero.
  • The “_normal” texture should be 24-bit and use the 3dsmax format(red channel is left; green is up; blue is top). If you aren’t creating a custom normal map, use a flat normal color (128,128,255).
  • “_mask1” is a 32-bit texture and every channel is used.
    Red is the detail map mask.
    Green is the diffuse and fresnel warp mask.
    Blue is the metalness mask which controls where the Color and Fresnel are suppressed. Works best in combination with mask 2 blue channel “tint specular by base color” which brings the color back through specular.
    Alpha is the self-illumination mask, where the color is drawn from Color texture. Even if you are not using this, fill it with black and pixel of non-black in the corner of the material. This is done in order for texture compiler to keep this channel. If it is entirely black or white, it will be thrown out and the shader will think it’s pure white and your item will be full bright.
  • “_mask2” is 32-bit and again every channel is used.
    Red is specular intensity.
    Green is rimlight intensity.
    Blue is “tint specular by base color”, white color in this channel will color specular highlights by diffuse color from _color texture, black will keep specular highlights of whatever color light affecting the surface is.
    Alpha is the scale factor of specular exponent from hero shader(vmt). For example, if the specular exponent is set to 16, then values for this channel of 0…255 will control exponent values from 0 to 16. Even if you are not using this, fill it with white and pixel of non-black in the corner of the texture. This is done in order for texture compiler to keep this channel. If it is entirely black or white, it will be thrown out resulting in a different texture format when compiled.

And Valve even rolled a nice guide about the shader masks. You can find it here. Let’s take another look at them.

Continue reading

Promo images

I’ve been asked for this one too many times. Today we’re going to learn how to create those hard and luring promo images for our items.

There are lots of ways to create promo images, but we’ll be trying only a couple of them today, i hope some of you will find this usefull.

Continue reading