Pyro, Voxels & Particles, Time based effects.

   15388   6   2
User Avatar
Member
3 posts
Joined: Oct. 2009
Offline
Is there a way to get access to the sub-particles in the pyro voxel based fluid simulator?

Basically we need to do time-based effects on the fluid. One idea is that after a particle in the fluid has been alive for a certain time it is destroyed and another is that we might want to freeze the particles after a certain time, creating a hardening effect.

Any ideas?
User Avatar
Member
257 posts
Joined: Nov. 2007
Offline
not sure about the sub particles, but freezing time (and potentially speeding up again) could be done with this:
http://forums.odforce.net/index.php?/topic/9424-timeblend-timewarp-volume-bgeo-sequences/page__fromsearch__1 [forums.odforce.net]
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
User Avatar
Member
1145 posts
Joined: July 2005
Offline
There are no particles in voxel fluids, the voxels are simply recording vector and scalar values as they pass through.
You could take data out to sop space and generate particles there and influence the particles, however I don't think that's what you are after.

In the dops space you could add turbulence and the like to the voxel fluid but that's not going to be particularly directable.

Likely you will need to establish what you want on the source geometry before you bring it into dops.
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
3 posts
Joined: Oct. 2009
Offline
There are no particles in voxel fluids, the voxels are simply recording vector and scalar values as they pass through.

Forgive me because I'm new to Houdini and don't quite understand it's inner workings, but I believe a common way voxel based fluid fields work is by containing hidden particles. Yes, the scalar values mark how dense each voxel is but I thought that this was achieved by putting dummy particles into the fluid and moving this along and then sampling them later in each voxel for density.

If not then that's rough. Does anybody have a link to a technical description (programmer's description) of how the Houdini voxel fluids are implemented?

One thing we want to do (or consider doing) is causing the fluid in the voxel cloud to disappear based on how long it's been alive. Any suggestions?

Another thing we were considering is spawning a simulated object (like a leaf or a flower) when a particular part of the fluid has been alive long enough. Any suggestions?
User Avatar
Staff
6153 posts
Joined: July 2005
Offline
There are several ways in which particles could be said to be inside a voxel based fluid sim.

The first is when the voxel grid is being used for the projection step and an explicit cloud of particles is maintained frame to frame. These particles thus track density, fuel, temperature, and velocity. The voxel grids can even be considered just temporary structures. This is the FLIP/PIC method. This type of solver can be created in Houdini, but none of the default fluid/smoke/pyro solvers use this approach. An example of FLIP/PIC is in the sandobject/solver which isn't on the shelf tools.

The next case is when the semi-lagrangian advection technique is used to advect the voxel fluid. In this case a virtual particle is created for each voxel, traced back in time, and then sampled to update the voxel value. This is the advection used in the Pyro solver. These particles aren't visible because the never really existed. In any case, they wouldn't help you with your goal.

The third is when you use a particle system to act as an input to a fluid sim. For example, the particle system may track where you want to add fuel, for example. A one way relationship, where the particle system is unaffected by the behaviour of the fluid, is relatively straightforward to set up by using a source relationship or particle to field micro solver to transfer the particle's attributes to the voxel array. In the case where one wants the particle to float with the fluid's motion, one is best to attach them as extra geometry to the fluid and use the gas advect node to move them. If you look at what the seed vorticles shelf tool does you can see an example of adding passively moving points to a voxel fluid sim.

Adding passive tracking particles in this manner is quite possible in Houdini, examples being the surfels created in fluid simulations and vorticles in smoke simulations.

If you want to use particle tracking for to define density rather than a pure voxel field you can modify the default fluid solvers to do this. Add a new geometry dop, called say “densityparticles”. To the advection input of the fluid solver, add a merge node. Then to that merge node add in sequence a sop solver, a gas advect, and a gas particle to field.

Gas advect should be set as the geometry densityparticles, vel field vel.

Gas particle to filed should set destination field as density and geometry as densityparticles. The parameters for how to stamp the particles into the field depend on what sort of reconstruction you want. Accumulate may actually work well for this purpose. Set the attribute to density.

In the sop solver you need to create any new particles you want to birth. After creating the new markers, append an attribcreate with “density” as the float point attribute, default/value of 1. (this is what will be used for the stamping in particle to field)

Now, merge those particles with the purple dopimport node that was auto created and put your display flag on the merge.

Hopefully you now have density being created by the particles rather than using the voxel field. Indeed, you could skip the gasparticletofield stage entirely if you want to just render the particles in the end, but the advantage of rebuilding a density field is that the rest of the pyrosolver that looks for density fields for things like gravity will respect your points.
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
This is pretty much exactly what I'm trying to do … you're explanation is great but a little over my head. I'd like to use particles as a fuel source, would also be great to use their velocity for the smoke velocity and a density attribute as well.

Looking around for an example hip or video tut for and can't seem to find one .. could someone point me in the right direction as to the bare-bones of this technique? Using the shelf fire-ball tool get's me the visual effect I want but I'm very unclear on how to use animated geometry / geometry sourcing for fuel in a pyro sim
User Avatar
Staff
809 posts
Joined: July 2006
Offline
Hi Andrew,

There's some different approaches for using particles as a source for density in this thread:
http://forums.odforce.net/index.php?/topic/8822-particle-rasterization-to-voxel-grid [forums.odforce.net]
Using them for fuel instead/also should be relatively straightforward.

Please ignore most of my blatherings in that thread until the last blather (at which point I finally realized that Houdini has native support for using particles as a fluids source).

Good luck
  • Quick Links