Square Particle Effects

This topic is 4167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, I'm using a particle engine based off nehe's. Well, the problem is, when I pass my particles random directions and momentums and spawn them from a central point(like a firecracker), they turn out to be squarish. Why is this? I seem to have a dim understanding of why it would be, but since it's only a dim one I have no idea how to go about trying to fix it. Can anyone help? Thanks, Levi [Edited by - levjs on May 21, 2007 8:38:32 PM]

Share on other sites
Are you initialising the directions with something along the lines of:

Velocity.x = RandomInRange(-1, 1)
Velocity.y = RandomInRange(-1, 1)
Velocity.z = RandomInRange(-1, 1)
Normalise(Velocity)

..?

If so, you're creating a uniform distribution in a cubic domain then squashing it into a sphere, causing bunching from the corners. To create a radially-uniform distribution you'll need to work a little harder. Have a look at this thread. Some more details can be found here.

Share on other sites
I assume you're not normalizing the velocity if you get a square distribution, and doing so would fix the problem. V *= speed/|V| for all particles moving out in a perfect sphere or V*=random*speed/|V| for particles moving out at random speeds with a generally spherical distribution. If you want you're particles to be evenly spaced over this sphere then that's a whole different problem ( already well covered by TheAdmiral).

Share on other sites
Even distribution doesn't bother me. I just need a fairly spherical shape. Thanks alot, I'll try what you are suggesting. I am not currently at my own computer, so I will try it and get back to you. Thanks alot!
Levi

Share on other sites
It works!!! Thanks so much. Haha, such a simple solution, I would have never thought of it. : )

1. 1
Rutin
26
2. 2
3. 3
4. 4
5. 5

• 9
• 13
• 19
• 14
• 9
• Forum Statistics

• Total Topics
632940
• Total Posts
3009329
• Who's Online (See full list)

There are no registered users currently online

×