Physarum

Summary

Physarum is a GPU-accelerated simulation that creates organic network patterns inspired by the Physarum polycephalum slime mold organism. This operator simulates particles (agents) that sense their environment through forward-facing sensors, rotate toward higher concentrations of deposited trails, and move while depositing their own trails. The emergent behavior produces vein-like networks, branching patterns, and maze-solving structures as particles collectively optimize paths through space, creating patterns similar to biological transportation networks, neural systems, and fungal mycelium.

The simulation operates in 2D or 3D space with a volumetric trail map that stores deposited pheromone-like values. Each particle extends sensors at specified distances and angles to sample trail concentrations, rotates toward the strongest signal using configurable rotation angles, and moves forward depositing trail substance. The trail map undergoes diffusion and decay each iteration, spreading and fading the deposited trails to create smooth gradients that guide particle movement. You control particle behavior through sensor parameters (distance, angle), rotation parameters (turning angle based on sensor readings), move distance, and diffusion settings (blur type, decay rate, filter size).

Physarum supports optional volume constraints to confine particle movement within texture-defined regions using force-based repulsion (2D texture in 2D mode, 3D texture in 3D mode). The simulation outputs both particle positions and the trail texture, allowing visualization of the particle swarm itself or just the accumulated trail patterns. Boundary behaviors (off, clamp, loop, zigzag) control how particles interact with simulation bounds. This makes Physarum ideal for generative network art, organic vein patterns, maze generation, path optimization visualization, neural network aesthetics, and procedural mycelium textures.

Parameters

Page: Physarum

Target Particles Update POP Particlesupdatepop Reference to a POP node downstream in the network. This reference will cause a feedback loop and re-injects the particles next frame.
Target Trail Update TOP Trailupdatetop Reference to a TOP node downstream in the network. This reference will cause a feedback loop and re-injects the trail deposit texture next frame.
Simulation Space Simspace Dimensionality of simulation.
3D 3d
2D 2d
Max Axis Resolution Maxaxisres Maximum voxel/pixel resolution for longest axis of trail texture.
Bounds Size Boundssize Physical size of simulation volume in world units.
Bounds Size Boundssizex
Bounds Size Boundssizey
Bounds Size Boundssizez
Simulation Resolution Simres Read-only display of actual trail texture resolution.
Simulation Resolution Simresx
Simulation Resolution Simresy
Simulation Resolution Simresz
Bounds Type Boundstype Boundary behavior.
Off off
Clamp clamp
Loop loop
Zig Zag zigzag
Number of Particles Numberofparticles Particle count when no input connected (spawned at initialization).
Seed Seed Random seed for particle spawn positions and directions.
Point Size Pointsize Particle render size in 2D mode for trail deposition.
Sensor Distance Base Sensordistancebase Base distance for sensor probe ahead of particle.
Sensor Distance Power Sensordistancepower Power function applied to trial-sampled sensor distance variation.
Sensor Distance Scale Sensordistancescale Multiplier for trial-sampled sensor distance variation range.
Sensor Angle Base Sensoranglebase Base angle offset for sensors from forward direction (degrees).
Sensor Angle Power Sensoranglepower Power function applied to trial-sampled sensor angle variation.
Sensor Angle Scale Sensoranglescale Multiplier for trial-sampled sensor angle variation range (degrees).
Rotation Angle Base Rotationanglebase Base rotation angle when turning toward detected trails (degrees).
Rotation Angle Power Rotationanglepower Power function applied to trial-sampled rotation angle variation.
Rotation Angle Scale Rotationanglescale Multiplier for trial-sampled rotation angle variation range (degrees).
Move Distance Base Movedistancebase Base distance particles move forward per iteration.
Move Distance Power Movedistancepower Power function applied to trial-sampled move distance variation.
Move Distance Scale Movedistancescale Multiplier for trial-sampled move distance variation range.
Decay Rate Decay Rate at which trails fade over time (0 = permanent, 1 = instant).
Diffuse Passes Diffusepasses Number of blur iterations to spread trails (0 = no diffusion).
Type Type Blur filter algorithm for diffusion.
Catmull-Rom catmull
Gaussian gaussian
Box box
Bartlette bartlette
Sinc sinc
Hanning hanning
Blackman blackman
Extend Extend Edge handling for blur.
Hold hold
Repeat repeat
Mirror mirror
Filter Size Size Blur kernel radius (larger = wider spread).
Filter Scale Filterscale Per-axis multiplier for filter kernel size.
Filter Scale Filterscale1
Filter Scale Filterscale2
Filter Scale Filterscale3
Sample Step Offset Sample offset distance for blur in pixels.
Sample Step Offsetx
Sample Step Offsety
Sample Step Offsetz
Initialize Initializepulse Pulse to reset simulation and spawn initial particles.
Start Startpulse Pulse to begin simulation from initialized state.
Play Play Toggle continuous simulation playback.
Step Steppulse Pulse to advance simulation by one iteration while paused.

Page: Constraint Volume

Constraint to Volume Constrainttovolume Confines particle movement within texture-defined regions.
Constraint Volume Constraintvolume Reference to a 2D/3D texture TOP to use as constraint volume when no third input is connected.
Force Strength Forcestrength Strength of repulsion force from volume boundaries.
Pre-Shrink Preshrink Downsamples volume before blur for performance.
Filter Size Filtersize Blur kernel size for smoothing volume constraint field.

Page: Common

Free Extra GPU Memory Freeextragpumem Free memory that has accumulated when output memory has grown and shrunk.

Inputs

Input 0 POP Particles In
Input 1 TOP Constraint Volume

Outputs

Output 0 POP Particles Out
Output 1 TOP Trail
Output 2 TOP Deposit