PDA

View Full Version : Randomly populate a volume with particles


nathaniel2
03-02-2011, 07:15 PM
I am trying to create a random field of particles within a polygon (so I can run a 3d voronoi script).

First I tried to "fill" the volume with particles, but the spacing was too uniform. I then created an emitter and 2 vortex's which was an improvement but the density is not uniform enough. Is there a function to randomly generate an evenly distributed field of particles?

ZeitG
03-03-2011, 08:45 AM
nParticles -> emit from object -> emitter type - surface, speed - any negative value, normal speed - 1.
May be not the best, but working solution.

mandark1011
03-03-2011, 04:47 PM
how about emitting two Npartciles into your volume then deleting one afterwards.

HowardM
03-03-2011, 04:49 PM
confused.. you say its too uniform...
but then youre asking how to emit something uniform...
which is it?

Aikiman
03-03-2011, 08:44 PM
I am trying to create a random field of particles within a polygon (so I can run a 3d voronoi script).

First I tried to "fill" the volume with particles, but the spacing was too uniform. I then created an emitter and 2 vortex's which was an improvement but the density is not uniform enough. Is there a function to randomly generate an evenly distributed field of particles?

I always do this when Maya has trouble doing simple things - try SOuP. Th scatter node will distribute points inside a volume randomly, you can even use texture projections to group particles in specific areas. From here you just attach the outPosition>WorldPosition or deformedPosition of the particle.

Or if you dont want to use SOuP you could use the "fill object" and write some code that grabs worldPosition and adds sphrand(.2) to offset its position.

nathaniel2
03-04-2011, 06:27 PM
Thanks so much, all great tips!

CGTalk Moderation
03-04-2011, 06:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.