The problem being: a box emitter (maybe others, haven't looked), emits only in a limited number of locations.
I had something like a 40x40x1 box and particles were emitting in 5x5 different points. So for my rain effect the rain was coming down in 25 separate streams
In CParticleBoxEmitter this code selects position:
Code: Select all
p.pos.X = Box.MinEdge.X + fmodf((f32)os::Randomizer::rand(), extent.X);
p.pos.Y = Box.MinEdge.Y + fmodf((f32)os::Randomizer::rand(), extent.Y);
p.pos.Z = Box.MinEdge.Z + fmodf((f32)os::Randomizer::rand(), extent.Z);
But perhaps this sort of thing might work:
pos.X = MinEdge.X + extent.X * ((f32)(rand()%10000)) * 0.0001;
etc...
??
(I am temporarily getting around this problem by repositioning the particle system at a random offset every frame. So then the "streams" are never in the same position)
And while I'm at it, a feature request (sorry): axis aligned particles! (is that the correct term?!)As for rain, you can't have long droplets, as they turn to face the camera. And look quite silly from above... Perhaps the link here by bitplane is what I'm looking for, but would be nice to have it included in irrlicht. (and the gdlib.net link doesn't work for me at the moment)