Spennet
Spennet

Reputation: 15

Simple 3D smoke algorithm for particle emitter in OpenGL

I need to create a simple particle emitter to achieve somekind of a smoke-like effect. I need help with the algorithm that should do something like this:

*Create X amount of particles in a frame with lifetime L

*Define the velocity for each individual particle in a frame

Is there some nice mathemtical algorithm available for this?

Upvotes: 1

Views: 1933

Answers (2)

Volodymyr B.
Volodymyr B.

Reputation: 3441

I found this complicated example - fluidsim.
And another one on simple C without OpenGL, you can find algorithm inside, check it

Upvotes: 0

Ylisar
Ylisar

Reputation: 4291

Most I've seen simply has an emission velocity at emitter level, then when you emit the particle you pick a velocity vector which slightly deviates from the emitter both in direction & length. More advanced solutions makes it volumetric by simulating it as fluids instead. Googling volumetric smoke will likely turn up a ton of tips on this.

Upvotes: 1

Related Questions