I am trying to add some visual effects to some entities, meshes, or whatever you want to call them as they are looking pretty dull in my game right now.

What I want to achieve is this: http://youtu.be/zox8935PLw0?t=36s (the "texture" gets disintegrated and then goes back to normal, covering the whole mesh.)

Also I would like to know what is the best way to add effects like the one in the video to my game (for example, thunder effects, shattering, etc.) I know that I can do some things with shaders, but I haven't learned them too well and I am still in a beginner level.

I am using Ogre3D, and GLSL for shaders.


Note: this is a screen-shot of my game, I want to apply the effect in the video to my main character):

enter image description here


2 Answers 2


Seeing the video I think the approach used is just to move the triangles of the mesh independently, instead of treating the whole mesh as a rigid body. Follow these passes:

1) To achieve that spinning tornado movement just rotate all triangles around the up vector of the mesh. In addition, move each triangle in the direction of its normal to achieve this "explosion" movement. This pass doesn't need to be in a shader.

2) To disintegrate the triangles, just go subtracting a delta to their alpha channel while the animation goes. Your delta should be an interpolation between (1.0, 0.0) based on the length of the animation. This way you will have a smooth disintegration. This pass can be done in a pixel shader with an uniform delta.

3) To let the texture fly with the triangles, just don't change the UV coordinates. You can do this in the same pixel shader of pass 2.

4) To reintegrate the mesh, just do the passes 1) through 3) with operations reversed.

Now about the best way to add effects to a game. Usually you can do this with shaders and/or particles. Shaders are better suited for effects that takes the mesh into consideration (e.g. outline, cartoon and environment mapping effects) or full screen effects and filters (for example blur, night-vision googles, noise and old film effects). Particles usually model effects that are best viewed as a group of independent bodies (usually tiny particles): magical auras, fire, smoke, etc.

  • \$\begingroup\$ That's mostly the exact thing that Andrew Nollan did on Nitronic Rush for the car materialization effect. It's "just" a vertex shader manipulation of the mesh. Note that without a geometry shader you'd need a version of the model with independent vertices for each triangle (Nitronic was DX9 - no geometry shaders - and it would swap in an identical-looking optimized mesh after the car materialized). \$\endgroup\$ Commented Nov 8, 2013 at 6:39

A great way to easily make good looking effects is to use particles. Take a look at the particle scripts that come with the Ogre SDk (Located at OgreSDK_vc10_v1-8-1\media\particle), may be different depending on your version of Ogre.

Particle scripts are saved a a .particle file and are loaded and parsed in a similar way to materials.

There is a wiki page on particles that helped me a lot by just looking through all the pages under manual.


You must log in to answer this question.

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