Jump to content

  • Log In with Google      Sign In   
  • Create Account


Particle trails


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Byron   Members   -  Reputation: 119

Like
0Likes
Like

Posted 09 September 2008 - 04:44 AM

I need to produce some particle trails in OpenGL ES - do you have any suggestions on a good technique? I thought about just recording the positions of the particle as it moves and render smaller alpha'ed versions but that would introduce errors as they move faster.
ByronBoxes

Sponsor:

#2 MARS_999   Members   -  Reputation: 1264

Like
0Likes
Like

Posted 09 September 2008 - 12:50 PM

Fade the alpha channel based on the time elapsed since the creation of that particle...

#3 zedz   Members   -  Reputation: 291

Like
1Likes
Like

Posted 09 September 2008 - 12:51 PM

draw a stretched quad orientated in the particle's moving direction, fade out the colors at the quads tail

p0,p1 are 2 positions, the pos + the direction its moved from

VEC3 q = cameras_position - p0;
VEC3 w = p1 - p0;
VEC3 n = return_VECTORS_normal( CROSSPRODUCT( q,w ) ) * width;

add+subtract n to the p0+p1 verts to get the 4 corners of the quad




#4 Byron   Members   -  Reputation: 119

Like
0Likes
Like

Posted 09 September 2008 - 10:24 PM

I thought about doing that but in my mind I have a vision of a longer trail which could be composes of the length of the particles travels but it would look angular.... I wanted something smoother.

#5 OrangyTang   Members   -  Reputation: 1294

Like
0Likes
Like

Posted 09 September 2008 - 11:27 PM

If you want highest quality then you could store the previous N positions and string a quad strip along them with vertex colours to fade out the particle texture. That'd get you nice variable length trails which curve smoothly but it'd be a bit more expensive in terms of storage and poly count.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS