Showing posts with label dopnetwork. Show all posts
Showing posts with label dopnetwork. Show all posts

Thursday 18 April 2019

PYRO DIY 2019

The pyro setup tools have changed a little bit in Houdini 17..

Here's a refreshed outline of what you need to make a setup from scratch.

  1. Create something to emit the pyro. You'll eventually be turning it into a volume, so keep that in mind.
  2. Plug your emitter object/points into a Pyro Source node. 
  3. Optional, but usually a good idea - Connect an attribute randomise node and randomise Density and Temperature
  4. Use a Point Wrangle to randomise pscale with your favourite function (or don't)
  5. Connect a Volume Rasterise Attribute node and specify  Density, Temperature and V (for velocity) as the things you want to rasterise. Now you have some volumes which will act nicely as sources for smoke. Label them with nulls (SOURCE)
  6. Before we jump into simulating, there are two more things we need to make to help along things. A box that encompasses the volume of the entire sim and a box that roughly covers the volume of the first frame of your sim. Label them with nulls( BOUND and START for example)
  7. Create a dopnetwork. Inside, make a Pyro Solver. This is the brains of it all.
  8. The first input into the solver should be a Smoke Object. For testing purposes use a higher division size, maybe 0.1, which represents 10cm as a single voxel. In the "size" boxes, use an expression bbox("../../START",D_XSIZE) and respectively the D_YSIZE, D_ZSIZE 
  9. For the centre, use the expression centroid("../../START", D_X) and D_Y, D_Z
  10. The rest of the Properties tab can usually be left as default.
  11. In the Creation tab, set the Creation Frame to the first frame where your source appears. You may or may not want to have Solve on Creation Frame ticked on. See what works for you.

  12. The second input into the solver is the Gas Resize Fluid Dynamic.
  13. The Max Bounds tab is what we're interested in first. Set the type to "From Object" and navigate to the BOUND object you created in step 6. This stops the simulation from going nuts and out of bounds.
  14. Back in the Bounds tab, you might have to play around with the padding values. Generally the closer to zero, the less extra work the solver has to do.
  15. Let's skip a few inputs of the solver. The last input will be the source volumes. Add a Volume Source node and navigate to your SOURCE object (step 5) You could have this connected to the Dopnetwork as one of the inputs, but lately I tend to keep those clear (you might have many sources etc..)
  16. In the Volume tab, press the + button. You'll want to add the "density", "temperature" and "v" from your SOURCE. Label the target fields "density", "temperature" and "vel" respectively. The first two are scalar values & vel is a vector one.You could leave out temperature and velocity if your sim doesn't really require it, but I find a little bit of temperature helps gets the sim moving.
  17. Hit play, or click on a frame (this is faster, as having to display each frame slows down Houdini a little) in the timeline & wait a little bit. Something should have happened!

  18. The sim probably looks a little simple. We can disturb the velocity or temperature to make it look more interesting now. This is what the third input is for. You can plug in Gas Disturbance, Gas Turbulence and a few other nodes to do the trick here.
AND THAT'S IT.. A simple and clean pyro setup.