Jump to content

  • Log In with Google      Sign In   
  • Create Account

Need Help making a good particle engine


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 henrykl   Members   -  Reputation: 117

Like
0Likes
Like

Posted 13 November 2012 - 10:30 AM

I have been trying to make a particle engine for a while now. i think i understand the base mechanics behind it but i can't seem to put it together.
my end goal would be to a particle engine based in drx9 that uses shaders. So if anyone could point me in the direction of a simple particle engine tutorial or on here i would greatly appreciate it.

another question if doing particle with shaders the only thing that would get update c++ side would be the position right???

Sponsor:

#2 dAND3h   Members   -  Reputation: 214

Like
2Likes
Like

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.

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

Edited by dAND3h, 13 November 2012 - 12:51 PM.


#3 henrykl   Members   -  Reputation: 117

Like
0Likes
Like

Posted 13 November 2012 - 01:55 PM

Thanks for the tips. And yea i have been looking for tutorials but all they do is confuse me

#4 Yrjö P.   Crossbones+   -  Reputation: 1412

Like
0Likes
Like

Posted 13 November 2012 - 06:18 PM

IMO, figure out particle systems (or any graphics tech you have trouble understanding) by messing with them in regular old code.
Shaders make coding harder, and their only purpose is to speed things up. Before you have a decent idea of what you want to do, that is not useful.

#5 3DModelerMan   Members   -  Reputation: 1071

Like
0Likes
Like

Posted 13 November 2012 - 07:22 PM

SPARK is a good engine if you want something you can just drop in. Just google "SPARK particle engine" and you should find it.




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