Presentation is loading. Please wait.

Presentation is loading. Please wait.

HOUDINI 9 ADVANCED FLUIDS Building a Fluid Solver SIGGRAPH 2007 Master Class Training Jeff Lait

Similar presentations


Presentation on theme: "HOUDINI 9 ADVANCED FLUIDS Building a Fluid Solver SIGGRAPH 2007 Master Class Training Jeff Lait"— Presentation transcript:

1 HOUDINI 9 ADVANCED FLUIDS Building a Fluid Solver SIGGRAPH 2007 Master Class Training Jeff Lait http://www.sidefx.com/papers/advfluid07.html

2 Fluid Solvers in Houdini 9  The Shelf quickly sets up a fluid simulation  Note the auto created Fluid Solver node

3 Inside Fluid Solver DOPs  The inside of the node is complex  We will rebuild this

4 Volume Primitives  New Primitive type in Houdini 9  A box divided into a grid with a value stored at each node  Manipulated by SOPs  Single point stores center  Transform stores size/rotation, like Spheres and Metaballs  Mantra can render it directly  IsoOffset, IsoSurface, VolumeMix SOPs

5 IsoSurface  IsoSurface allowed the expression of implicit functions  Outputs polygons at the zero-crossing of the function

6 Volume from IsoSurface  Build Volume option stores implicit function value at every grid point

7 IsoSurface from Volume  The $V local variable in IsoSurface provides the incoming volume primitive value

8 Building Velocity Field  snoise is builds three different noise fields  Three fields merged together to provide x, y, and z components of velocity

9 Import to DOPs  SOP Vector Field imports three volume primitives as vector field

10 Velocity Visualization  An abundant number of ways to visualize the velocity field with guide options

11 Vector Guide Options

12 Point Geometry  Begin with a lattice of points...

13 Add Geometry to DOPs  SOP Geometry DOP imports the geometry  Geometry Copy DOP makes it writeable

14 Advect Geometry  Gas Advect Microsolver moves the points through the velocity field

15 Advect Geometry  Motion of points follows the streamers  Note the clumping of points at stable points of field

16 Stamp Tubes  Primitive Tubes are stamped onto the points

17 Tube Advection  Tubes stay upright in playback as only points are moved

18 Velocity Stretch  Gas Velocity Stretch DOP uses local velocity values to twist the tubes

19 Tube Rotation  Tubes now rotate as the velocity field twists

20 Velocity Stretch  Gas Velocity Stretch DOP can also stretch the tubes according to shear/scale in velocity field

21 Tube Scaling  Tubes now fully distort according to field, swiftly becoming planes/points (This is not a nice field!)

22 Scalar Fields  IsoOffset allows you to build a Signed Distance field from geometry and store it in a Volume Primitive

23 Scalar Fields 2  Volume Mix manipulates values in volume primitives  expression builds a shell

24 Scalar Fields in DOPs  Import volume to DOPs with SOP Scalar Field  View as Smoke guide option

25 Scalar Field Guides  Inspect a slice with a plane guide

26 Scalar Field Advection  Gas Advection node can also advect a field

27 Smoke Advection  Smoke moves through the velocity field

28 Plane Advection  Single slice of the field as the field moves through the velocity field

29 Scalar Field Scaling  Respect the expansion/contraction in the field

30 Smoke Scaling  Note that the smoke stays sharper and we don't get a net gain of smoke

31 Plane Scaling  Compression effects are clear in single cross section view

32 Signed Distance Fields  Voxels store 1 for fluid, 0 for none  SDFs store negative for fluid, positive for none  Zero crossing not restricted to voxel boundaries, allows sub-voxel detail

33 Iso Guide Options  Guide options for scalar fields allows one to track a specific IsoSurface

34 SDF Advection  One can advect distance fields in the same way as density fields

35 What is Divergence?  Measure of imbalance of velocity field  Divergence at center can be measured by comparing in going and outgoing velocties of boundary of cell  Incompressible fluids should have zero divergence  Consists of “swirl”, “shear”, “translate” factors. Does not have “scale” factor

36 Removing Divergence  “Scale” components can be represented as a pressure field  Find a pressure field that removes our divergence  Changing one cell, however, affects neighbouring cells  Entire fluid is coupled and needs to be solved at once  Use preconditioned conjugate gradient method with an incomplete Cholesky preconditioner.  Or just use a Gas Project Non-Divergent DOP

37 Project Non-Divergent  Add a Gas Project Non-Divergent DOP to our non-nice velocity field

38 Pressure Computation  Pressure field created to remove divergence

39 Pressure Application  Final non-divergent field

40 2d Divergence  Same process in 2d for clarity  Note the central rarification becomes a low pressure zone and is removed

41 Divergent Free Advection  Smoke no longer bunches up

42 Changing Velocity Field  Add a DOP Fan Force  Gas External Forces updates the velocity field

43 Fan Motion  Velocity accelerates inside fan  Exterior velocity only adjusted by pressure  Loss of momentum!

44 Velocity Advection  Conserve momentum by moving the velocity  Do this by advecting the velocity with itself

45 Velocity Advection  Fan-accelerated air carries its velocity outside of the fan  Entire system starts moving

46 Combustion Inputs  Inputs to combustion model

47 Combustion Flow  Temperature that exceeds Ignition Temperature determines potential burn  Burn clamped by fuel  Actual burn rate determines feedback effects

48 Add Fields  We add to our fluid object the required fields, such as Fuel

49 Add Field Temperature  Likewise, temperature  Note the initial hotspot to trigger the combustion

50 Add Burn Field  The output will be this “burn” field

51 Add Combustion Model  We use the Gas Combustion DOP to express this model

52 Inside Combustion Model  Flow chart implemented by a series of Gas Calculate DOPs

53 Buoyancy Force  To get hot air to rise, we add a Gas Buoyancy DOP

54 Simple Combustion  Flame doesn't spread  No expansion at flame front

55 Intentional Non-Zero Divergence  To get the gas to expand at the flame front, set the burn field to be our desired divergence

56 With Gas Expansion  Temperature field stays sharp  Flame front doesn't spread against wind direction

57 Temperature Diffusion  A Gas Diffuse DOP lets us smear out the temperature field

58 With Temperature Diffusion  Fire chases the fuel against the updraft

59 Only Burn Field  Examining the burn field alone  Shows which voxels burn on this timestep

60 Soot Field  Turn on the display of the density field we use to store the burnt fuel

61 Smoke and Fire  Both displayed at once

62 Augmenting Houdini Solvers  Add a Colour field to Houdini's Fluid Solver  Build three volume primitives for Red/Green/Blue

63 Add to DOPs  SOP Vector Field adds the colour data  Gas Advect moves it by the velocity

64 Apply in SOPs  Import extra colour field  apply_colour is copying the colour field onto Cd

65 VOP SOP for Field Application  red, green, blue, are Volume Sample VOPs

66 Colour Scalar  Colour tracks fluid  Boundary blends the two colours together  Could add Gas Diffuse to increase blending

67 Sharp Boundaries  Build an SDF to store which colour we want.

68 Add Colour Key to DOPs  Replace the SOP Vector Field with SOP Scalar Field.

69 Use Colour Key to set Colour  VOP SOP converts negative/positive to either red or green

70 Colour Key  Colour tracks fluid  Sharp boundary between colours is maintained

71 Summary  Arbitrary data fields can be added to extend a fluid simulation  Small atomic “microsolvers” can be used to build a complicated simulation out of manageable pieces  Packaged solvers are built in this manner – a good source to see how micro solvers can be used  Packaged solvers have extra inputs to take your own added layers of simulation


Download ppt "HOUDINI 9 ADVANCED FLUIDS Building a Fluid Solver SIGGRAPH 2007 Master Class Training Jeff Lait"

Similar presentations


Ads by Google