On this page | |
Since | 21.0 |
This node marks the end of a Reaction-Diffusion simulation block, which is a complex 2D simulation of chemicals reacting and diffusing. Pair the node with a Reaction-Diffusion Block Begin COP.
This node features two methods of describing and simulating how the chemicals interact with each other. The Gray-Scott model describes two chemicals reacting with two input parameters for how the chemicals interact. The Kenjiro Maginu model describes two chemicals reacting with three input parameters for how the chemicals interact.
See Reaction-Diffusion solver for information about how to use this node.
Note
Compiled COP networks don’t support simulation.
Parameters ¶
Signature
Signature which controls the output of the node.
Pattern (Mono)
Mono output of the chemical pattern with various optional remappings and output correction applied.
Chemical (UV)
UV output of the raw chemical values.
Note
Chemical output mode is outputting the raw values, and does not allow for any control for color customisation. Therefore results may be visually unfriendly.
Model
The model to use to describe how the chemicals interact, which includes presets.
Gray-Scott
Two chemicals reacting with two input parameters for how the chemicals interact.
Kenjiro Maginu
Two chemicals reacting with three input parameters for how the chemicals interact.
Preset
Sets parameters to create Gray-Scott preset patterns.
Small Waves
Smaller oscillating waves.
Large Waves
Larger oscillating waves.
Spots
Self-replicating cells.
Blinking Blobs
Tiny oscillating waves that bounce against each other, creating a blinking effect.
Worms
Long stretchy blobs that resemble worms or snakes.
Labyrinth
Maze-like labyrinth pattern with many corners and loops.
Negatons
Creates a subcritical cellular look.
Chaos with Negatons
Reaction that fluctuates between a stable state and a chaotic state mixed with subcritical cells.
Spatiotemporal Chaos
Reaction that fluctuates between a stable state and a chaotic state.
Preset
Sets parameters to create Kenjiro Maginu preset patterns.
Blobs & Spots
Tiny cellular blobs amongst larger blobs.
Wormy
Long wormy structures with singular cells broken up throughout.
Abstract
Creates a blobby abstract look with large blobs containing smaller blobs.
Noisy
Chaotic noisy pattern.
Brusselator
Creates a fast oscillating spiral look.
Foamy
Chaotic pattern with similarities to foam.
Oily
Pattern that slowly diffuses from large blobs (given the input was already chaotic).
Nearly Chaos
Chaotic pattern with stable areas and unstable areas.
Moving Brusselator
A Brusselator pattern with a more chaotic structure and moving spirals.
Time ¶
Simulate
Turns on simulation so block outputs feed directly back into the inputs, which creates a feedback loop. This is useful for complex motion and simulations.
Reset Simulation
When Simulate is on, this clears the entire simulation cache.
Iterations
Amount of iterations to run in non-simulation mode.
Iterations per Step
Amount of iterations to take per step within non-simulation, simulation, or Live Simulation.
Live Simulation
When Simulate is on, this turns on live simulation to provide an interactive, non-deterministic simulation mode. It simulates independent of the playbar and isn’t associated with any keyframes or caching.
This parameter (and its associated parameters) is intended as a sandbox mode where you don’t have to rely on the playbar.
Tip
Live Simulation doesn’t save the results like other simulation types in Houdini, so use a Stash COP to save results.
Toggle Live Simulation
When Live Simulation is on, this lets you pause and resume the live simulation.
Tip
You can also use the Live Simulation button to pause and resume live simulation. See Cooking controls for more information.
Live Tick
When Live Simulation is on, this is the current tick (frame) within the live simulation.
Time Scale
When Simulate is on, this is the amount to scale the time inside the block. A value of 1
maintains the normal speed, a value greater than 1
speeds up the simulation, and a value less than 1
slows down the simulation.
This value is used within the chemical reaction equations.
Note
Reaction Diffusion in this implementation is resolution sensitive. When changing resolution you may encounter instability, which is often due to taking time steps that are too large. To resolve this instability, reduce the size of the time steps by increasing the number of Substeps or decreasing the Time Scale. This has an associated runtime cost. The explicit integration of the equations has time step restrictions to make sure that the results (as in the scale of the reaction) stay resolution independent, but this may cause instability.
If you double the resolution, you may need around four times the Substeps (or quarter the Time Scale) to remain stable.
Substeps
Sets the amount of substeps for each simulated frame.
Caching ¶
Caching of frames during Simulation mode.
Note
When Live Simulation is on, the Start Frame, Cached Frames, and Checkpoint Rate parameters no longer apply.
Caching
Turns on caching of frames.
Start Frame
When Simulate is on, this is the frame on the Houdini playbar where the simulation starts.
Cached Frames
When Simulate is on, this is how many frames behind the current frame to keep cached.
Checkpoint Rate
When Simulate is on, this is the rate at which the node continually caches a single frame.
For example, set this to 24
to cache frames 24
, 48
, 72
,
and such. This allows random-scrubbing to be faster as it only
has to re-cook from the checkpoint frame.
Set to 0
to disable checkpointing.
Reaction Parameters ¶
The Reaction Parameters are sensitive. Reaction-Diffusion exhibits nonlinear behavior, meaning that fast changes can flip, kill, or make the entire reaction enter a blow-up state. This occurs for a couple reasons:
-
Some combinations of input parameters sit near bifurcation points, so the stability of the reaction can change abruptly with even tiny variations of the control parameters. The node tries to take care of some of this for you in 'Normalized' mode (when Switch to Raw Values is off), but it can still occur.
-
Changing the input parameters too fast can mean that the chemicals don’t have enough time to fully grow and stabilize into their new diffusion parameters before the input parameters are changed again.
Switch to Raw Values
Interprets the parameters and input layers as raw.
Note
It’s recommended that you keep this off since the normalized parameters and layers are warped to limit the possibility of instability, create the most artistically interesting results, and stop the reaction from dying out or overreacting.
Scale Multiplier
Changes the size of the patterns by altering the reaction rate relative to the diffusion rate. This leads to the reaction happening slower at extreme scales, and tiny scales freeze the reaction altogether. Therefore, having a larger scale may require letting the reaction run for more iterations/ticks to fully grow into the requested scale.
Note
Input layers for alpha
, beta
, and gamma
on the Reaction-Diffusion Block Begin COP override these parameters. Input layers for
scale
and coefficient
on the Reaction-Diffusion Block Begin COP multiply these parameters.
Gray-Scott Model ¶
Technical description
A' = DiffusionA * LaplacianA - (AB*AB) + α(1.0 - A)
B' = DiffusionB * LaplacianB + (AB*AB) - (β + α) * B
Alpha α (Feed)
Chemical A is added into the simulation at a given “feed” rate.
This is scaled with (1.0f - A)
so that A does not exceed 1.0.
Beta β (Kill)
Chemical B is removed from the simulation at a given “kill” rate.
This is scaled with (kill + feed) * B
so that it does not go below 0.0.
Kenjiro Maginu Model ¶
Technical description
A' = DiffusionA * LaplacianA + α * (A - A*A*A) - B
B' = DiffusionB * LaplacianB + β * (A - γ * B)
Alpha α
Controls the nonlinear self-activation of A. Essentially the reaction strength of A.
Beta β
Determines how strongly Chemical B reacts to the presence of Chemical A.
Gamma γ
Controls how strongly B is pulled back towards A. Essenially a damping or decay coefficient that prevents B from growing indefinitely.
Diffusion Coefficients ¶
The models in this node require the diffusion coefficients to have a different ratio to each other. Altering these can create complex and interesting patterns, but can quickly lead to instability.
Note
The coefficient
input on the Reaction-Diffusion Block Begin COP multiplies these parameters.
Diffusion A
Controls how fast chemical A diffuses.
Generally, the Gray-Scott model sits at 1.0
and the Kenjiro Maginu model sits at 1.0
.
Diffusion B
Controls how fast chemical B diffuses.
Generally, the Gray-Scott model sits at 0.5
and the Kenjiro Maginu model sits at 1.0
.
Boundary ¶
Wire an SDF input into the node to force the reaction to naturally grow into the given shape. Create an SDF Shape (such as a Star shape) and wire it into the
boundary
input on the Reaction-Diffusion Block Begin COP. After the reaction successfully starts, use the Boundary Threshold to grow and shrink the boundary edge.
Note
The activation
mask must have an activation area within a valid area of the boundary otherwise the reaction can’t grow.
Invert Boundary
Inverts the input boundary shape.
Boundary Threshold
The offset of the boundary shape. Higher values grow the shape and lower values shrink the shape.
Boundary Smoothing
The amount to blur the boundary shape, which causes the reaction to contract away from the border of the boundary. At lower Reaction Scales, high values of smoothing can sometimes cause instability.
Output Correction ¶
Alters the look of the output pattern. These parameters are active only when the Signature is Pattern (Mono)
.
Invert
Inverts the values of the output pattern.
Normalize Model
Remaps the range of the output to keep the values consistent across models.
This is useful since some models and modes have 'weaker' values.
Clamp Minimum
The minimum pixel value of the image.
Clamp Maximum
The maximum pixel value of the image.
Inputs ¶
chemical
The input chemical from the Reaction-Diffusion Block Begin COP.
feedback
A cable of the current feedback data. This is fedback to the input. The structure of this cable must match the initial structure provided on the block begin.
Outputs ¶
product
The output pattern.
feedback
A cable of the current feedback data.
See also |