   Velocity-alligned particles - how to ?
  Hi !I have a working particle system. It renders all the particles as billboard using quads (I manually compute the four vertexes).Now I'd like to have some quads to be stretched along the velocity vector.Question is: how to ? :)One can't use the billboard technique, because it's not true anymore that the quad is facing the camera. In fact, suppose the velocity vector is pointing the camera: you should see a point. However, it's still true that the bitmap (which will be rectangular-shaped), regardless of the orientation, has to always face the camera... I know, I'm not that good in explaining this :(Any help ?thanks!   
  How should your particles look like? If they are just images, than I can't see how you can stretch it in an arbitrary 3D direction. If they are simple 3D objects like spheres you can probably render them procedurally in a shader and continue to use your billboarding technique.   ;  Maybe it would be costly, but you could convert the positions and velocity vectors to screen coordinates. Then draw as a stretched/rotated QUAD with the screen fit orthogonal projection.I hope that's enough for an idea.   ;  You'll get one vector from the vel for the 4 points of the quad, "invent" the 2nd.struct particle{    float3 pos;    float3 vel;} part;float3 guessed_axis = normalize(-part.pos); // Something pointing somewhere.left = crossprod(part.vel, guessed_axis);// Then, your aligned particle becomesfloat3 particlepos[4] ={    part.pos + part.vel + left,    part.pos - part.vel + left,    part.pos + part.vel - left,    part.pos - part.vel - left};Or something like that.You will want to normalise the vectors at some points to control the size of the particle.It will collapse when your velocity has the same direction as the guessed axis.-Morten-   ;  THANKS I don't get completely your ideas, but maybe it can help seeing what I'm talking about.Take a look ad this tutorial:http://www.gamedev.net/reference/art/features/howtoPartFx/and focus on "Step 3: Create the Flying Sparks Emitter".Those particles are not quads, because are stretched along the velocity. But what will happen if you watch a particle toward its velocity direction ???   ;  I implemented a particle system with a motionblur/stretch effect in the velocity direction recently. The idea was to make fast moving particles appear less like dots and more like a fluent line.My idea was to project the velocity vector to a plane parallel to the viewplane, much like the generation of the vertices for the particle. This velocity can be used as an added offset and rotation for the particle's vertices.I used the velocity as a normal component and computed the stretching factor in the shader, but I am not sure this was the most efficient way to go about it.   ;Quote:Original post by NiGoeaBut what will happen if you watch a particle toward its velocity direction ???You can mix both, the "standard billboard" and the "axis aligned billboard". Just cut the standard billboard in two pieces along the axis perpendicular to the motion vector ("left" in MortonB's code) ans put each piece at one end of the axis aligned billboard.   