Title: Snow Train
Modeled: Semi-Procedural Houdini
A project with the intention of designing a system in order to replicate a real-life reference as closely as possible.
Found below is the in progress renders, system design breakdown, and current shot breakdown process.
As of November 16, 2020 (11/16/20) this project is a work in progress. All the work shown so far is not an accurate depiction of the final results until stated otherwise.
Render System Test
The snow the train first comes into contact with instantly breaks apart into a fine powder. Which is then thrown into the air and swirls along the air currents.
As the force from the initial impact is transferred along, the snow chunks begin to break apart prior to contact.
Which in turn gets thrown into the air and becomes powder.
Larger clumps of wet compacted snow are thrown into the air but do not immediately fall apart. Instead, they break into smaller pieces and slowly disintegrate along the outer and trailing edges of the clumps.
Original Video found at:
System Design Process
Problem: The designed system needs to be able to take animated collision geometry and accurately handle the interpolation/transfer of force to sim objects.
Option 1: Rigid Body Dynamic (RBD) Simulation. Handles collisions rapidly and fairly accurately, depending on setup. However, RBD is limited to only previously fractured geo and only solves for the convex hull of objects, not individual points.
Option 2: POP Grain Solution. Solves collisions on a per-particle basis based on Pscale. Drawbacks include an older and less efficient system.
Option 3: Vellum Grain. Similar to POP grain in concept, but runs on a much faster algorithm and can handle a much larger quantity of particles. It also includes features of constraint control for clumping. However, for such a large region needed, sim times would grow exponentially with desired detail.
Chosen Solution: Use RBD simulation to solve the larger chunk/clumping region. Feed-in animation from RBD and use as sourcing for Vellum grain solver to handle smaller particles clumps only in the desired area. Therefore, increasing the overall solver efficiency.
RBD sim prep/geo creation. Points are scattered inside a volume with the majority centered around the train's path. The points are then used in a vornoi fracture to create the RBD pieces.
RBD constraint creation. The packed geo is unpacked to allow constraint connections. Three main constraints are made.
Glue_Fixed: Used to freeze geometry until needed.
Pin: Allows geometry to bend prior to fully breaking.
Glue_Cluster: Focused upon smaller volume piece to create small random clumps.
POP Speed Limit and POP Drag ensure that pieces don't receive an unrealistic velocity at any point in time.
Grain Source Prep
The train geometry is given an attribute which is transferred to the newly created packed RBD geo. The sim is frozen and each piece's volume is measured, fit between 0-1 and then transferred back to the animated sim.
The selected source is passed to a configure vellum grain node. Each frame the animated geo calculates it's centroid and is then transferred to the newly created grains. The particles are culled based on the camera and Y position to optimize the scene. Afterwards a new velocity is created based on noise and the centroid, which is then added back onto the original velocity.
Grain Source Constraints
Create constraints from clusters (class). Next the name attribute is transferred to the create primitives. Any primitives that have two conflicting names/classes are removed and then grouped.
The grain points generate an attraction weight based on AA noise. Finally the points are set as active and combined with constraints.
Near identical setup to RBD Sim.
Problem: The larger pieces and area close to the train need to generate a large amount of material to fill and interact with the air of the scene.
Option 1: Particle Operator (POP) Simulation. Capable of generating millions of individual particles, each can be affected by forces such as wind, gravity, and custom fields. Also extremely efficient to solve. The drawback is the number of particles needed to generate the desired effect is beyond substantial (initial guess exceeds 70 million).
Option 2: Pyro Simulation. Solved as a fluid and voxels instead of individual particles. When rendered as a volume can cover much larger areas requiring far lower resolutions. Also received a massive update to include sparse solution in Houdini 18. Drawbacks include simulation times are slower due to being three-dimensional instead of points, also less control is available over certain aspects of the simulation.
Chosen Solution: Create Sparse Pyro source based on RBD and Vellum Grain results. Results will provide better outcome and more control in the final composite than attempting large particle simulation.
Timeshift RBD to frame 1 and transfer the used group plus the trigger time from animated sim. Scatter points onto this frozen geo and create ID. Move the points based on name from SIM. Blast the points based on velocity and the dot product between the velocity and normal.
Get and add points from grain sim to newly created points.
Trail by length of one. Create primitives based on id (Add node). Resample resolution. Create uv along spline. Use spline to create ramp along length. Convert particles to vdb and back into polygon.
Use new sparce pyro (pyro source) method. Transfer back vel to points. Add noise to vel. Refine density by ramp and area. Finally volume rasterize attributes.
Sparse Pyro Sim
**Ensure to turn on "Enlarge Fields to Contain Source" on the volume source node.**
Problem: Due to the choice of using sparse pyro to generate the larger mass of airborne snow when rendered the volume will not have the fine specular reflection gained from particle (point) rendering.
Chosen Solution: Create a POP simulation to generate airborne particles that are driven by pyro simulation. When rendered and layered together final result will be visually more appealing.
Near identical to Pyro source just without the volume creation.
POP Sim Settings
System Design Tests
RBD Source: Heightfield
A heightfield was created for the surrounding environment. A section of the heightfield was taken and converted to geometry to work with.
RBD Source: Create Snow Geometry
Vex noise is used to generate the desired look of the top snow. The original geometry position is then mixed between and the updated position using vex to create a smooth transition between the heightfield and soon to be simulation geometry.
RBD Source: Reshape and Reduce
The VDB is smoothed and dialated to generate a less harsh mesh. It is then converted to polygons and reduced.
RBD Source: Scatter Points
Volum wrangles are used to focus where points are going to be scatter inside the geometry. These points are then used to pre-fracture the snow for RBD simulation.
RBD Source: Fracture
Noise is added to the original position and then fractured. Afterwards the rest position is restored and interior detailed added. The pieces are then packed and given a section number.
RBD Source: SIM Geometry
Sim geo is created by remeshing the individual pieces to reduce sim time.
RBD Source: Define Active
All sim geo is turned inactive and then only the desired region is grouped and are turned back to active.
RBD Source: Optimize Active
To prevent simming on unneeded pieces, chunks are turned active only within a certain radius of the train geometry. A SOP Solver is then used to check the previous active state of a piece and if necessary ensure they stay active.
RBD Source: Glue Constraints
RBD Source: Cluster Constraints
Clusters allow the retention of larger and smaller pieces.
RBD Source: Soft Body Constraint
Soft body constraints are used to allow a bending/compacting motion to occur.
RBD SIM Network
RBD SIM: Settings
RBD SIM: Solver Impulses
The impact data is stored to create impulses to drive later aspects.
RBD SIM: Constraint Controls
Vex code is used to control when and how the constraints break for more directability.
RBD Secondary Source: Volume
The original high resolution geometry is unpacked so that secondary fractures can be created.
RBD Secondary Source: Volume
Each piece is measured, blasted if smaller than a certain volume, fractured into ten smaller pieces, packed, transfered its original name, remeshed into a sim geo, and grouped accordingly.
RBD Secondary Source: SIM Animation
The primary sim points are taken and time shifted to $FEND to calculate the @triggertime attribute, vel is adjusted to add randomness, @triggertime is transfered back to the live points. The new fractured SIM geo is animated based of sim points.
Credit: Triggertime creation and usage
RBD Secondary Source: New Activation
New fractures are set to @active = 0 and @animated = 1 utnil the condition is met.
Condition is based off of if the points are part of an active group and has an index greater than zero, followed by @triggertime, velocity threshold, and volume threshold.
Each piece is given a random "activate" value, if this value is less then a user given "check" the piece has the opportunity of being turned active.
RBD Secondary Source: New Activation
Blue: @active = 0; @animated = 1;
Grey: @active = 1; @animated = 0;
RBD Secondary Source: Constraints
Identical setup as primary fracture.
RBD Secondary SIM: Forces
A metaball is copied to to points on the front of the animated train. Instead of using the "Force" node which would only allow the assignment of one directional force, a wrangle node creates the identical attributes instead giving complete control over the applied forces.
RBD Secondary SIM: Network
RBD Hero objects are used for the train to gain better control of the density.
RBD Secondary SIM: Settings
Vellum Source: New Sim Points
Take secondary RBD sim points, create a new @triggertime attribute, along with id.
Vellum Source: Set Active
Transfer active and volume. Create random keep attribute.
RBD Secondary SIM: Network
Transform high resolution geometry based on sim points. Cull any loose pieces that transformed below ground plane.
Vellum Source: Grains
Take active source and convert to vellum grain. Unpack rbd geometry and transfer velocity, centroid and id. Cull points to ensure none spawn below ground plane.
Vellum Source: Update attributes
Add noise to velocity to breakup shape. Class is used to randomly select points to generate constraint geometry.
Vellum Source: Constraints
Connect adjacent points, transfer and promote name, kill any primitives between name and class points, and then group.
Vellum Source: Pass to SIM
Add ensures that no constraint geometry gets passed into the source. Wrangles are used to give final control over SIM attributes.
Vellum SIM: Forces
Same process taken prior for metablls.
Vellum SIM: Network
Vellum source is used to allow the import of an animated source.
Vellum SIM: Settings
Vellum SIM: Solver Settings
Vellum SIM: Vellum Source Error
The "Vellum Source" node has an error/setting that restricts it to read in a source file only once per integer frame. This does not work when using DOP network substeps.
By unchecking "Use Frame" and replacing "Time Between Frames" with the DOP network timescale inside the "Gas Intermittent Solve" node within vellum source. It now pulls the animated source on every substep accurately.
Vellum SIM: Export and Upres
Upres technique credited to Steven Knipping
Vellum Grain Test
Pyro Source: Animated Scatter
Points are scatter on the high resolution geometry and given the pieces name. The points are then animated from the vellum source animation.
Pyro Source: Refine Points
Refine source points based on velocity, position, @triggertime, and boundary.
Pyro Source: Custom Trail
Houdini "Trail" sop only works in integer frame steps. The behavior is replicated and replaced with the ability to recognize subframes using a timeshift set to subtract one substep from $FF. Add creates a line between point ID, and resample generates more points for better detail.
Pyro Source: Create Source
The lines are converted to vdb then back into geometry where the pyro source scatters points inside. Velocity and ramp are transfered back to points. Noise is added to velocity and then rasterized.
Pyro Source: Grain Source
The new vellum grain simulation points are taken and culled based on position, velocity, and density. Finally noise is added using "Point Jitter".
Pyro Source: Grain Rasterize
Group any points that get moved inside train geometry, check bounds, and then rasterize.
Pyro SIM: Airfield
Station bounds are used to create an airfield region.
Pyro SIM: Airfield
Station normals are transfered to the points to create a cross product between it and the airfield noise. It is then rasterized to be passed to simulation.
Pyro SIM: Settings
Pyro SIM: Solver Settings
Pyro SIM: Gas Dissipate Custom
Gas dissipate bases its calculation upon FPS, time defaulting to being 24fps or some derivative of this number value. If set to evaporation of 0.99 it means that the volume would be removed near entirety over 24 frames. If 4 substeps are introduced it means it would take over 96 subframes to be removed.
Instead of adjusting the global FPS and ruining all other simulations, manual parameters were added to calculate a new timescale based on desired number of subframes for evaporation.
1(time)/(5(integer frames) * 4(substeps)) = 0.05 timescale
1/(24*4) = 0.01 timescale