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 first model, Gray-Scott, describes two chemicals reacting with two input parameters for how the chemicals interact. Whereas, the second model, Kenjiro Maginu, also describes two chemicals reacting however has three input parameters for how the chemical 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 & Presets ¶
Model
Selects which model to use to describe how the chemicals interact, as well as some provided presets. The presets are not entirely based on scientific names.
Preset
Sets parameters to create 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
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 which slowly diffuses from large blobs (given the input was already chaotic) into
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.
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.
Caching of frames during Simulation mode.
Note
When Live Simulation is on, the Start Frame, Cached Frames, and Checkpoint Rate parameters no longer apply.
Cache Simulation
Enable 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.
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.
Reaction Diffusion in this implementation is resolution sensitive. When changing resolution you may encounter instability, which is caused primarily by taking time steps that are too large. Consequently, the best way to combat it is to reduce size of the time steps. You can do this by increasing the number of Substeps or decreasing the TimeScale–though note that this has an associated runtime cost. Our explicit integration of the equations has timestep restrictions, the reasoning behind this was to make sure that the results (as in the scale of the reaction) stay resolution independent, but this can sometimes cause instability.
Tip
Roughly speaking, if you double the resolution, you might need around four times the Substeps (or quarter the Timescale) to remain stable.
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.
Substeps
Sets the amount of substeps for each simulated frame.
Reaction Parameters ¶
These parameters are sensitive. Reaction-Diffusion exhibits nonlinear behaviour, meaning that fast changes can flip the entire reaction, kill it, or make it enter a blow-up state.
There are a couple of main reasons for this:
-
Some combinations of input parameters sit near bifurcation points, thus the stability of the reaction may change abruptly with even tiny variations of the control parameters. The node tries to take care of some of this for you in the 'Normalized' interpretation mode which is on by default, however it still can 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
Enables the parameters and input layers to be interpreted as raw
.
It is advised that this is kept disabled as the normalized parameters and layers are warped to limit the possibility of instability, to create the most artistically interesting results, and to 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 will freeze the reaction alltogether. 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, Gamma on the Reaction-Diffusion Block Begin COP node act as overrides for these parameters, not multipliers.
However, Reaction Scale and Diffusion Coefficients input layers do act as multiplers to the parameters.
Gray-Scott Model ¶
Described as:
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 ¶
Described as:
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 ¶
Both models in this node require both diffusion coefficients to have a different ratio to each other. Altering these can create very complex and interesting patterns, though can quickly lead to instability.
Note
The input 'coefficient' layer on the Reaction-Diffusion Block Begin COP act as multipliers to these parameters.
Diffusion A
Controls how fast chemical A diffuses.
Gray-Scott:
Generally sits at 1.0
.
Kenjiro Maginu:_
Generally sits at 1.0
.
Diffusion B
Controls how fast chemical B diffuses.
Gray-Scott:
Generally sits at 0.5
.
Kenjiro Maginu:
Generally sits at 1.0
.
Boundary ¶
An SDF input can be fed into the node to force the reaction to grow naturally into the given shape.
Invert Boundary
Invert the input boundary shape.
Boundary Threshold
Controls the offset of the boundary shape. A larger input will grow the shape, whereas a smaller input will shrink the shape.
Boundary Smoothing
Blurs the boundary shape, causes the reaction to contract away from the border of the boundary. At lower Reaction Scales, high values of smoothing can sometimes cause instability.
-
Create an
SDF Shape such as a Star shape and feed it into the Boundary input on the Block Begin.
-
It is important to note that the Activation mask needs to have an activation area within a valid area of the Boundary, otherwise the reaction will not be allowed to grow.
-
Once the reaction has successfully started, the boundary edge can be grown or shrunk using the Boundary Threshold.
Output Correction ¶
Alters the look of the output pattern. These controls are only active when the Signature is set to Pattern (Mono)
.
Invert
Inverts the values of the output pattern.
Normalize Model
Some models and modes have 'weaker' values, this remaps the range of the output to keep the values consistent across models.
Clamp Minimum
Sets the minimum pixel value of the image.
Clamp Maximum
Sets the maximum pixel value of the image.
Inputs ¶
chemical
The input chemical from the Reaction-Diffusion Block Begin.
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 |