how to make a ribbon effect?

Started by
2 comments, last by swiftcoder 14 years, 2 months ago
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]
Advertisement
anyone? :) (bump)
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?
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.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement