Sign in to follow this  

High Quality Light Trails

This topic is 831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering if anyone knows how I can get fluid trails like in Infamous First Light. I've found some references online on light trails: http://www.gamedev.net/topic/603950-light-trails/, but can simply spawning a few particles each frame create a good fluid particle effect like in Infamous?

 

http://www.youtube.com/watch?v=FpS-oadeewo&t=0m54s

 

 

 

Does anyone know any other methods to get High Quality fluid light trails?

Edited by Epaenetus

Share this post


Link to post
Share on other sites

Like suggested in the thread you linked:

 

I would do a trail from a sword (to have an example) by adding the edge vertices of the blade to a buffer that keeps growing until it's full, and then push out the oldest set of vertices, and render tris between those sets.. That way you'd have a solid trail instead of one made up of point sprites :)

Share this post


Link to post
Share on other sites

Thanks for the links. I took a look at the GDC talk for the visual effects and the particle system.  They mentioned that the light trails were constructed by creating ribbons from adjacent particles; however, they never really went into the actual algorithm for generating these ribbons.

Share this post


Link to post
Share on other sites

@vinterberg So in that case would you render the buffer as a triangle strip?

 

To keep the strip billboarded would I need to reconstruct the strip every frame?

 

If that's the case then I would make a dynamic vertex buffer to hold the ribbon data and update it for each ribbon, but would this be usable in a real time application? I'm trying to create the ribbon effect for my game which is using a custom built engine.

Edited by Epaenetus

Share this post


Link to post
Share on other sites

I think I would probably just re-create each frame, or maybe limit it to each x milliseconds.

And I would just use an index buffer, if both buffers aren't that large it's not a big deal smile.png

 

Maybe if you keep a copy of the vertex buffer and update that, by moving the data down so that you push out the oldest set of vertices and make room for the new set at the end. Then you upload the updated buffer to the GPU vertex buffer. The index buffer could probably be created once at trail Init(), since indices won't change you can just fill it with indices once for the complete trail, and the parameters given to Draw() indicates how many of those to render (until trail is filled you won't be rendering all triangles).

Edited by vinterberg

Share this post


Link to post
Share on other sites

This topic is 831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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