Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualdAND3h

Posted 13 November 2012 - 12:51 PM

You need to think about how you will lay out your engine. A basic structure can be:

Particle Engine---has many-->Particle Emitters---has many--->particles. You will want to create a method by which you send chunks of the number of particles to the graphics card at once, to save draw calls.

For the actual particles, you need to think about what attributes you would like for the emitter. Max particles speed, colour, and of course texture. etc.

If you want to make an efficient GPU based particle system, you will do world calculations inside the shader. This includes scaling,translation and rotations. For instance, you can create a simple particle trajectory with a start time and velocity.

position = (currentTime - startTime)*constantVelocity

Where startTime is passed into the vertex shader from the application.

You can also manage to pass just the centre position of the starting particle into the shader, and transform each vertex of the quad using that position and the UV coordinates.

As for tutorials, I have yet to see a satisfactory one. Most seem to fly past important topics without discussing them.

#1dAND3h

Posted 13 November 2012 - 12:50 PM

You need to think about how you will lay out your engine. A basic structure can be:

Particle Engine---has many-->Particle Emitters---has many--->particles. You will want to create a method by which you send chunks of the number of particles to the graphics card at once, to save draw calls.

For the actual particles, you need to think about what attributes you would like for the emitter. Max particles speed, colour, and of course texture. etc.

If you want to make an efficient GPU based particle system, you will do world calculations inside the shader. This includes scaling,translation and rotations. For instance, you can create a simple particle trajectory with a start time and velocity.

position = (currentTime - startTime)*constantVelocity

Where startTime is passed into the vertex shader from the application.

You can also manage to pass just the centre position of the starting particle into the shader, and transform each vertex of the quad using that position and the UV coordinates.

PARTNERS