PDA

View Full Version : particle engine, and viewing distance



Mick Derevnin
06-04-2011, 04:21 AM
Hi everyone,

I've got a simple question that i would like some advice on. I recently made a very simple fire effect using a very simple particle engine i made up.

What i noticed is, the fire only looks decent at a specific distance that i designed it for. When i go closer, the particles start to look extremely spread out, and when i go further, it converges to a white flame shaped ball (due to the blending). This is all expected with my implementation, so my question becomes, what way do people go about correcting this?

Do they calculate how far the camera is from every particle effect, and adjust the number of particles, scale the particles down, adjust the colour of each particle with some equation they determine to give a decent result? Or is there some other preferred method that i haven't quite thought about?

The effect i want to achieve is, if i have a fire in my world at (0,0,0), and i move my camera towards, further from or around the effect, i would like it to look realistically smaller/bigger, etc.

Any input appreciated.

dorbie
06-05-2011, 06:05 AM
The particles are usually modeled as 3D polygons (2D oriented towards the viewer) They therefore scale with distance and so the appearance does not vary that much with distance.

Mick Derevnin
06-06-2011, 02:51 AM
Ah thanks Dorbie.

That's right, I've been using point sprites, which i forgot to mention.

Considering what you said, it's now very obvious! Thanks again.