Skip to main content
GameDev.net gamedev.net
🔒 Locked

Creating a motion trail effect

Started by janta May 24, 2006 at 4:06 PM 3 replies 2.7k views
Original Post
janta
janta
Hello again. I hesitated wheteher I would post this here on in the DirectX forum, but since my question is not purely DX specific, I'll go for this one (though I,ll have to use directx to achieve what I want) I've implemented a basic "motion trail" effect. When my character moves fast enough, that trail appears behin him and increase the feeling of speed. However, my effect is pretty simple and deals mainly with transparency and color. I've done ths using DX's fixed pipline, no shader there (but I could use them) Now, although I have the feeling that I did not make me very clear regarding what I'm looking for, I hope some people here can point out some resource/tutorial for creating such an effect. If you know of anything please just let me know, I would greatly appreciate :) Janta :)
Daniel Talagrand
Daniel Talagrand
You can achieve a "motion trail" effect using a triangle strip and alpha blending. A simple way would be to have a fixed number of triangles for the "trail", and spacing the newer vertices proportional to the speed of the object at that instant. With this fixed number of triangles you can set the newest one to be of a fixed desired transparency and make the oldest one fully transparent. By interpolating this alpha value among all triangles in between, you obtain a nice smooth progressive blend trail. This is how I've done it in the past and the resulting effect looks decent enough (it looks particularly neat as a sword/wand trail). However, I'm not too sure how you would create a volumetric trail effect.

For accelerated speed effects, motion blur might also be a good idea.
janta
janta
Yeah thanks, indeed this is exactly what I've done now (are you sure we're not working at the same place hehe ? ^^)
So I was just wondering how to achieve something even better :)
Thanks however !
janta
janta
Yeah thats interesting !
I wonder if I can apply that to an skinned moving character (to a part of it only in fact)
I've saved a local copy of this docummant and I'll take a close look at it soon.
Thanks a lot :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.