Sign in to follow this  
ehmdjii

how to make a ribbon effect?

Recommended Posts

hello, i am trying to implement the effect of an object, which, when moving around, leaves a glowing trail behind. i was wondering how this effect is usually done. are the polygons of the trail procedurally created? do you usually use quad strips? or triangle stripts? what about the texture coordinates? and how does the texture itself look like? ideally the trail fades out at the end. what about the blendmode to use to make it glow? thanks for any hints on this! [Edited by - ehmdjii on February 20, 2010 2:08:41 PM]

Share this post


Link to post
Share on other sites
Years back i had heard this was done via the accumulation buffer but i'm not sure if this is still relevant info :P

you might try searching for motion blur techniques to give you an idea on how to proceed?

Share this post


Link to post
Share on other sites
Quote:
Original post by ehmdjii
i am trying to implement the effect of an object, which, when moving around, leaves a glowing trail behind.
I implemented a ribbon-trail effect a while back, for Ashima IV:


Quote:
i was wondering how this effect is usually done. are the polygons of the trail procedurally created? do you usually use quad strips? or triangle stripts?
Basically, I regenerate a quad strip programmatically on the CPU each frame, from a queue of recent positions, and use a vertex shader to make each quad face the camera.
Quote:
what about the texture coordinates? and how does the texture itself look like?
I passed in texture coordinates only for the x dimension (i.e. across the trail), and used a 1-dimensional texture (expanded for clarity):

Quote:
ideally the trail fades out at the end.
I passed the normalised length along the trail with each vertex, and used that to modulate both the colour and width, causing the trail to fade out in the distance.
Quote:
what about the blendmode to use to make it glow?
I used additive blending. Other blend modes are possible, but additive blending avoids having to sort the quad sections by distance, and avoids issues where a trail loops around on itself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this