I have been wondering now for quite some time, how certain animated texture effects are done, specifically involving light effects.

Some good examples of what I mean are the green bridges in Darkspore, who have a pulsating light effect (pic), the light bridges in Portal or some spell effects from Oblivion (pic).

Are those effects purely done with shaders? And if so, how would you go about doing them? If I for example wished to create an effect, which would send little lightning bolts from a character models feet to the top as illustration that he got electrocuted, how would that work?

To my person: Although I am proficient in programming, I am mostly a beginner, when it comes to shaders. I understand most of the math behind it, but have almost no practical experience with them.

I hope you can clear things up for me a bit!

Thanks you for reading and in advance for any help! Christoph


1 Answer 1


These are most commonly done, as far as I know, with a combination of animated texture maps (along with an alpha channel, obviously) — for instance, in the Darkspore example the animated texture would be laid onto a series of essentially rectangles representing the bridge, or in Oblivion as a second texture on the player mesdh — supplemented in some cases by a simple glow shader. There's really no need for a potentially-complicated shader effect when a texture will do the job equally well (and more efficiently).

  • \$\begingroup\$ Thank you, that really cleared it up a lot. So generally I would now have to create such an animated texture. Are those realized by a series of bitmaps which are applied one after another or how do I have to envision it? \$\endgroup\$
    – Chris
    May 22, 2012 at 11:16
  • \$\begingroup\$ @Christoph There are a couple of different methods for doing it; one is to have the sort of series of bitmaps you mention, representing the different stages of an effect; this might be used for something more complicated like a shield impact effect. Another is to animate the coordinates of the texture; once upon a time this would have been done in code by passing in new UV coordinates for the vertices of the mesh every frame, but now it's more likely to be done in a shader... (cont) \$\endgroup\$ May 22, 2012 at 15:24
  • \$\begingroup\$ ...either in a vertex shader that changes the UVs passed into the pipeline (note that you have to be careful with wrap modes for this) or in a pixel shader that computes the UVs based on e.g. the initial (interpolated) UV of the pixel plus a cyclic offset in the U coordinate. \$\endgroup\$ May 22, 2012 at 15:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .