Friday 23 June 2017

latticing VDBs/volumes

Bring in your VDB however you need to.
Plug it into a VolumeVOP and create an addpoint node. Plug P into the ptvalue input.
Next create a setattrib node and plug your addpoint's ptnum output into the setattrib's i1. Plug your density into the value node and name the parameter "density". Jump back out of the VOP.

This will have made a volume grid of points that represent your VDB, each containing the corresponding density value. The number of points created is dependent on the resolution of your VDB, although I guess you could duplicate points and hope that they interpolate nicely?

Next, add a Timeshift node after the VOP and freeze your volume at the point you think it occupies the most space. Eg. if it's a trail of cigarette smoke, it's last frame. Create a Bound node for this.
This is now the lattice you can transform and deform.
Then make a Lattice node and plug your Volume VOP into the first input, the output of the Bound into the 2nd and then finally whatever your transform/deforms are into the 3rd.

So far, we've transformed a bunch of points, that hold our density values.. Now we have to recreate our volume..


Connect a Bound node to your deformed points. We're making an empty volume that encompasses the limits of your deformed sequence. Add an Iso Offset to this, set the Output Type to Fog Volume, Mode to Ray Intersect and name it Density. You control the effective resolution with the sampling. Next let's copy the density back into your empty volume.

Make a volume VOP, plug the Iso Offset into the first input & the lattice into the second. Jump in and make a Point Cloud Open node. Connect the P to the P and the OpInput2 into the File input.
Create a Point Cloud Filter and set it's signature to Float Channel and label the Channel "density". Plug the Point Cloud Open's handle into the Point Cloud Filter's handle input. Finally plug the value into the volumevopoutput's Density..

Your blank volume now has a deformed version of the original's density!
Sit back, relax and pretend you're resimming now.

Tuesday 20 June 2017

Pyro UPRES

Setup a Pyro as you would normally..This will be your low res sim. In a Geo sop somewhere, make a DopIO node and choose the pyro preset to make sure you're importing all the required fields from the low res sim. You could file cache this out..

Then..make a new Dop network. Inside this, create a smoke object and plug it into a Gas Upres node.
Point the Gas Upres node's Initial Data/Low Res Sop Path to a DopIO node you made earlier. Alternatively if you've cached it out to VDBs or bgeo.sc's you can switch the source to "file" and point it to that cache.


I've found that putting a copy of your low res sim's Source Volume helps a lot. Plug that into the last input of the Gas Upres. Switch it's Velocity setting to COPY, since you'll want to copy it from the lowres sim.

You might have to play with the smoke object's initial size settings, so that it encompasses your entire sim size. Oh - and change the division size to your desire resolution..we are upres-ing after all.

Mess around with extra dissipation or turbulence in the Gas Upres node...

That should be it.

Monday 19 June 2017

Pyro.. without shelf tools

Setting up Pyro manually...


  • You'll need to plug your emitter geometry into a Fluid Source node. You might want to turn off empty interior. As always, label with a null. OUT_SOURCE. Add a scalar volume and label it temperature. Your pyro won't react properly to buoyancy otherwise. THANKS HOUDINI.
  • It's a good idea to create two bounding boxes - one for the source, one for the padding. Make the padding way bigger than the source, freeze the time so it doesn't jump around in the simulation. You don't have to freeze the source bounding box as the solver only takes the first frame anyway. Label them with nulls, with something like OUT_BOUND and OUT_PAD.

  • Inside a dopnetwork -
  • You need a Source Volume node. use your OUT_SOURCE as your volume path. Initialise it to Source Smoke. Set the Velocity to Add. Otherwise it will just keep overriding the velocity.
  • You need a Smoke object. You might as well link the Division Size to the same parameter in the Fluid Source you created earlier. For the size and centre parameter boxes, use these respective expressions with the relevant paths and axis variations - 
bbox("../../geo1/OUT_BOUND",D_XSIZE)
centroid("../../geo1/OUT_BOUND",D_X)

  • In the Creation tab, you'll probably want to tick ON Solve on Creation Frame. This gives the system some density on frame 1, so it won't immediately shrink and implode on itself.
  • Next you need a Gas Resize Fluid Dynamic node. This just keeps track of the size of the simulation. Tick ON Clamp To Maximum, set it to From Object and point it toward OUT_PAD. Nice and easy, no expressions required. You still might have to faff with the padding values in the Bounds tab....
  • Lastly, but not least - you need a Pyro Solver node. Plug the Smoke Object into the first input, the resize into the second and the Source Volume into the last.
That should all work! The Solver contains most of the turbulence/shaping controls for the simulation.
You now have a basic pyro setup without using shelf tools. YAY.

Monday 12 June 2017

random rotation with POPs

To get random rotation with POP particles, add a point wrangle at SOP level with a more specific version of the following code-

v@w=rand(x-value,y-value,z-value);

Then in the dop network, add a POP-torque node and set the amount to zero, so that it takes the initial "w" value. "w" is angular velocity..all according to keikaku.

Thursday 8 June 2017

installing QLIB...what to stick in your houdini.env file

#QLIB
QLIB=C:/Users/threedee/Documents/houdini16.0/qLib-dev
QOTL=$QLIB/otls
HOUDINI_GALLERY_PATH = &;$QLIB/gallery
HOUDINI_OTLSCAN_PATH = &;$QLIB/otls/base;$QLIB/otls/future;$QLIB/otls/experimental
HOUDINI_TOOLBAR_PATH = &;$QLIB/toolbar