[Sidefx-houdini-list] accumulating particles
sgustafso at gmail.com
Mon Feb 25 13:40:32 EST 2008
The way I've done this in the past has been by hacking it with a file in/out
hack. Here's generally how it worked:
First, you have a switch sop to swap out your initial terrain object, and a
file object. On the first simulation frame, the switch should return your
terrain geometry (or whatever you want to accumulate particles on top of).
I'll get to the other part in a moment.
Have two sources inside pops. On one, put static particles at every point on
the terrain, and group all of the particles (terrainGrp), and the other
source is all of your snow and whatever else, which collides with the
terrain. When the particles of the second source collide with the terrain,
group them. Merge the particle streams, and create an attribute identifying
the number of surrounding particles (using proximity pop). So, you have a
particle at each point on the terrain possessing an attribute representing
the number of particles on top of the terrain within a certain radius.
Back in SOPs, use whatever method you want to transform the terrain geo
relative to the number of particles collided at each
point. A point sop using the original terrain and the isolated
terrainGrp of the particle system is a good choice.
Now here's where you tie it all together: Output the result of the network
at this stage to some file. Then use a file SOP to read the result of that
file in as the second input to the aforementioned switch SOP.
So, first frame, you load your initial terrain, and transform it according
to the outcome of the simulation over the course of that frame. Every frame
afterwards, you're using the terrain as a result of the transformation
from the previous frame.
That's very cheap to do, because you only have to calculate particle
collisions with what could probably be a very simple poly surface. Any time
you get into something like the interact pop, things get very expensive and
Now, if you need to specifically be able to store all
of the layered particles themselves, and not just a transforming
surface, continue with the file in/out hack: On the first frame,
output every particle that collided with your terrain to a file,
say, particles.geo. Every frame after the first frame, read in the previous
file, merge it with the particles that collided on the new frame
step, and output to the
particles.geo file again.
That way, you get the best of both worlds: Super cheap layering, with all of
the particles to fill the layered volume.
This has always been very fast and efficient when I've done it in the past.
Hope my explanation made sense.
On 2/19/08, Jed Schwartz <jed at jedschwartz.com> wrote:
> I'm suffering from a Particle brain freeze-- I need to accumulate
> particles on top of particles- (like accumulating snow) Stick on
> contact puts particles in place on the ground plane-- how do I get
> the following particles to stick to the existing "stuck" particles-?
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list