Fluid density limited to 1?

   5587   3   2
User Avatar
Member
793 posts
Joined: April 2020
Offline
Hello all,

I was playing around with the fluids. One thing I was trying to do, is to create a bit more “violent” fluid sim. In maya fluids, this can be easily done by emitting a very high density into the field. This will then expand rapidly and fill the volume more quickly.

In houdini, I created a source using an iso-offset and then used a volume mix to set the density to ten. On the first (un-simulated) frame of the simulation, the density does show 10 in the filled voxels. However the moment I simulate the density gets capped at 1.

The result of this is that the simluation where I fill the voxels with density 1 is exactly the same as the sim where I fill the volxels with density 10. This limits us in genrating more “explosive” sims.

Is there a reason for this limitation?

Thanks for any help,
Koen
User Avatar
Staff
6413 posts
Joined: July 2005
Offline
This is a bug caused by how we perform density sinks. We do a minimum against the sink mask, but we invert the sink mask by doing 1 - sinkfog. This results in density clamped at 1.

You can work around this by unlocking the smokesolver, diving into it and searching for the “remove_sink_density” node. If you bypass that node it will no longer clamp your density. (But sink relationships won't work)

This is bug 32991.

Higher densities will cause more bleed into surrounding voxels and also the smoke involved to fall faster with respect to gravity (As forces are scaled by the density value) It won't cause the smoke to expand to make the density one, however. To do that you can tweak the divergence to be a function of how much greater than one the density is. Attached is an example of this (and with the sink disabled) where we use VOPs to set the divergence to be >0 where density is greater than some cut off.

Note the Compress Gas toggle has to be on the smoke solver when you play with divergence or you won't have the density thin out in areas that it expands.

Attachments:
densitytodivergence.hip (503.7 KB)

User Avatar
Member
793 posts
Joined: April 2020
Offline
Thanks Jeff, the example is very useful.

Koen
User Avatar
Member
18 posts
Joined: July 2005
Offline
Hi Jeff
Thanks for that example scene file… didn't know there was a gas field vop node.
In the gas field vop node how can one bring in input parameters like temperature or other data. By default it looks like only density can be brought in.
I would like to make divergence a result of temperature and reduce the temperature over time.
I am attaching a scene file, if you can please take a look and let me know how I can achieve this.
thanks

Attachments:
gasDivergence.hipnc (360.0 KB)

  • Quick Links