Wednesday, April 18, 2012

Exploring Houdini 12: Setting up Voxel Fluids

Currently I am using Houdini 12.0.572, I have greatly enjoyed the changes that come with H12 and fully recommend it to all.

The first thing to understand about fluid dynamics is that it applies to a wide variety of procedural effects that may not be immediately considered to be fluids, such as smoke or clouds.

 So...Much...Fluid

Particle Fluids are fantastic for liquids while Voxel Fluids are great for things like dust or smoke, this tutorial is going to focus on Voxel Fluids.


1) The Container
On your shelf (top right bar with all the icons) click the Fluid Containers (or Fire and Smoke for those using older versions) tab.  Select the Smoke Container button.


Ctrl + Click on the Smoke Container button will automatically place the container in the direct center of your grid if you dislike the interactive placement tool.


The tic marks on the edges of your container represent the voxels within it.  Every ten tics there is an extra long one, meaning that my box is 30 voxels long and wide.  The Size of the box can be changed in order to affect the shape.  This will not stretch the voxels but will add more divisions, so keep that in mind when you play with it.  If you really want to stretch them then above Size is Division Method, change that to Non Square.

2) The Emitter
Make a shape within your container that will act as an emitter, I chose a Sphere.
Navigate on your shelf to the Populate Containers (or, still, the Fire and Smoke for older versions) and click the Source from Surface button (or Source from Object in older versions).


Select your object and hit Enter.
Select your container and hit Enter.

It should look something like this.

3) Control
Hitting the play button on the bottom right hand of the screen should give you a nice preview of what the final render will look like.

Back in your AutoDopNetwork in the options within the smoke node, there is a checkbox for Closed Boundaries (this was defaulted to the unchecked position in Houdini 12).  Checking the box will contain your smoke and allow it to pool and channel.  Unchecking various portions of the Closed Boundaries option will change the end result, for example, unchecking the -Y will let the smoke drop down from the ball and straight through the bottom of the box into oblivion.
All boundaries closed.

Unchecking the -Y box allows the smoke to keep flowing through the bottom.

Use Wind Tunnel Direction to better direct your smoke-stream.

4) Caching 
Saving out your simulations for future use is most helpful indeed.
Make a file node in your AutoDopNetwork and affix it to the bottom of your node tree.
When saving a simulation change Operation Mode to Write Files.  Make sure you have a File path set, then hit play through the simulation.  To read what you have saved, simply change the Operation Mode to Read Files and have it point to your previously saved cache.


More Houdini 12 fun to come.  Stay tuned!
Josh Evans

No comments:

Post a Comment