I’m thinking it would be cool to have some “light trails” coming from the glowing parts of the vehicles in my game. Any recommendations on how to achieve this affect?
Right now I’m thinking of using a simple piece of geometry with an alpha fade texture.
There are many ways you can implement motion trails. Alpha-ed geometry can be done as you suggested. Games like Soul Caliber used this to great effect.
For Panda, since dynamic geometry is a bit difficult, you might want to use an Actor/Character for this and use expose joint.
The other way is to use a 2d filter which is probably more of what you want with head/rear lights of a car. Basically it’s a motion blur where the buffer used for the motion blur only has the lights rendered.
Hope that helps.
looking at the meshdrawer class might also be an idea.
Best way to do this effect if you want physical trails in space is with custom vertex shaders. Now, thats only best in my opinion, and only in terms of performance, it would be a pain to implement. meshdrawer may be what you want.
Another whole approach is to do it with post processing (trails in screen space, not something else). If you were willing to have another buffer, you could do some neat things. Suppose you render your scene, and use that as a texture to render to a texture buffer that uses the rendered frame and itself as inputs to a shader. New image would be old version*.95+max(float3(0,0,0),latest render^3-.5) or something like that, and render that over the scene. Would produce sweet really long motion blur for bright things. A bit of filtering could cause bloom and over bright effects that might be interesting. Not too easy to setup though.
I would like to have certain characters in my game have motion trails (but not all).
I looked at the MT tutorial that comes with Panda (and yes, I don’t understand it all yet), but it seems to use buffers to affect the whole scene.
If I want to just have 1 character with motion trails and others without, would alpha fade be the way to go?
EDIT: I mistook this with the blur common filter. Sorry about that.
If you guys plan on using a motion blur technique. You can selectively have things blured and unblurred by showing and hiding them from the blur buffer.