13.07.2015 Views

Controlling Fluid Simulations with Custom Fields in Houdini Master ...

Controlling Fluid Simulations with Custom Fields in Houdini Master ...

Controlling Fluid Simulations with Custom Fields in Houdini Master ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sets, which means they are built from a network of smaller microsolvers <strong>in</strong>side.There are currently around 60 microsolvers <strong>in</strong> Houd<strong>in</strong>i 10 as can be seen <strong>in</strong>Figure (6). It is beyond the scope of this thesis to cover all of them so <strong>in</strong>stead afew of the more important ones of which the equivalent often shows up <strong>in</strong> uidequations will be covered. Microsolvers are wired together by us<strong>in</strong>g a mergedop, the order of the <strong>in</strong>puts is very important as it will dene which microsolvercontributes to the nal result rst. The order of operations works from left toright, top to bottom. This is quite dierent from the pure top to bottom nodeow <strong>in</strong>side of the surface operators context (SOPS).4.2 How do volume elds work <strong>in</strong> Houd<strong>in</strong>i?4.2.1 Den<strong>in</strong>g scalar and vector eldsVolume elds <strong>in</strong> Houd<strong>in</strong>i come <strong>in</strong> two types: scalar elds and vector elds. Theyare dened as primitives <strong>in</strong> SOPS (surface operators) but can also be created<strong>in</strong> DOPS (dynamic operators) and represent an attribute of the volume, themost commonly known is the density scalar eld. Other custom elds can bedened us<strong>in</strong>g a volume sop which will dene an empty volume primitive or aniso-oset sop which will dene a volume based on the closed mesh of an <strong>in</strong>putgeometry. One of the more powerful ways to dene custom volumes is by us<strong>in</strong>gthe volumevop. This runs CVEX (Houd<strong>in</strong>i's vertex expression language) overa set of volume primitives, the operations can be dened through code or bybuild<strong>in</strong>g a CVEX VOP (vertex operators) network. Not only do you have a lotof low level mathematical functionality, us<strong>in</strong>g VOPS will compile the result<strong>in</strong>gnetwork <strong>in</strong> vex code which will make it a lot faster to run <strong>in</strong> comparison tonormal expressions which would have to be <strong>in</strong>terpreted. This volumevop is usedas part of the tool that was developed to dene custom elds <strong>in</strong> SOPS.In DOPS elds can be created us<strong>in</strong>g a (SOP) Scalar Field node or a (SOP)Vector Field node. The (SOP) part allows you to reference elds from SOPS,but sometimes temporary elds are needed to store results of calculations andthe eld is created <strong>with</strong>out the need to reference it from SOPS as it will be lledup <strong>with</strong> data that is calculated from other elds <strong>in</strong> DOPS. To quickly create anempty eld based upon the properties such as the dimensions and resolution ofanother eld, a Gas Match Field microsolver can be used.A scalar volume eld such as density will conta<strong>in</strong> a s<strong>in</strong>gle primitive, whereasa vector eld such as velocity will conta<strong>in</strong> 3 primitives, one for each component.By convention the velocity eld is named vel, the components are vel.x, vel.yand vel.z.4.2.2 Nam<strong>in</strong>g volume primitivesIt is important to give the correct names to scalar elds before merg<strong>in</strong>g them<strong>in</strong>to a s<strong>in</strong>gle vector eld. Some elds are recognised by the preset shaders, suchas the color eld (Cd), but are not yet supported by the preset uid solvers.By modify<strong>in</strong>g the preset shaders you can have custom elds <strong>in</strong>uence the look9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!