3
\$\begingroup\$

I am trying to achieve something I've seen numerous times, but I don't know where to start from. I've come across numerous old effects, which I can't recreate. The said effects are the glow animations seen here: world of warcraft armor sets or for instance here Diablo glowing wings. In my desperation I even tried to contact blizzard, but with no success.

My common logic tells me these effects are not implemented with particles as that would be too expensive, especially on the hardware WoW ran on. On top of that, these looks strangely static, in a way even 2-D. I suspect something to do with images. I'm only a hobbyist graphics programmer(on top of that, not a good one) and I can't wrap my head around it. I would really appreciate any help.

\$\endgroup\$
  • 3
    \$\begingroup\$ The diablo 3 one looks like an animated 2d texture with a glow filter. The WoW ones are illuminance maps, additive blending textures and yes particles. Particles don't require much GPU power, no reason why you think that it couldn't be particles. \$\endgroup\$ – PeterT Sep 18 '13 at 22:45
  • \$\begingroup\$ Some bloom, too. \$\endgroup\$ – Sean Middleditch Sep 19 '13 at 2:22
  • \$\begingroup\$ @SeanMiddleditch if you look closely the WoW models don't have any bloom whatsoever. The Diablo 3 wings seem to (but it may be additive particles as well) but the WoW models only have a few particles (2 billboards on the shoulders of the first set) that make it seem like they do. Otherwise it's the falloff of the self-illumination maps that creates the appearance of bloom. \$\endgroup\$ – PeterT Sep 19 '13 at 2:29
9
\$\begingroup\$

Since you dismiss the particles I assume that you mean the self-illumination map.

The basic is that you start with a texture that has the glow in it.

texture

But of course the shader has no way of knowing that the glowing part should not be made darker by the shader. So you need to mask off the glowing bits like this:

glow map

So now in the shader you factor in the glow mask and porportionally exclude everying in the mask from the shading, your result should look something like this (left side with glow mask, right without):

render side by side

It basically boils down to

gl_FragColor = (1 - maskcol.r) * shaded_col + maskcol.r * raw_col; 

which looks like this if you need some visual help:

enter image description here

You can make this pulsate by introducing an additional factor which you can pass to the shader.

illumfac = scalefac * maskcol.r;
gl_FragColor = (1 - illumfac) * shaded_col + illumfac * raw_col; 

If you want something more irregular than just a uniform pulsating you can put a scrolling texture as your scaling factor for the self-illumination map.

But like I said this is only part of what the videos you posted show, but you didn't specify what exactly you wanted and like I said additive blending and particles can also be seen in parts of the examples.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.