ColorTrailsEffect
Source:
ColorTrailsEffect.h
ColorTrailsEffect¶
src/light/effects/ColorTrailsEffect.h:38Inherits:
EffectBase
Effect: color emitters carried by a flow made of two noise profiles, one per axis.

The flow is separable, which is the whole idea. A velocity field costs one vector per cell; this is one noise value per row and per column. Each row shifts horizontally and each column vertically, and the two shears compose. The picture swirls and folds with no solver behind it.
Credit: Stefan Petrick, whose concept this is, and Jeff (4wheeljive), whose ColorTrails it follows.
Public Attributes¶
uint8_t speed = 60
: How fast the emitters travel.
uint8_t flow = 128
: How far a row or column is pushed: the shear amount.
uint8_t flowSpeed = 128
: How fast the profiles themselves drift.
uint8_t scale = 85
: The profiles' spatial frequency: few broad bands, or many fine ones.
uint8_t persistence = 60
: How long color survives, as a half-life.
uint8_t colorSpeed = 128
: How fast the emitters walk the palette.
uint8_t size = 128
: Orbit radius, and the Lissajous figure's reach.
uint8_t mode = static_cast<uint8_t>(Mode::All)
: Which emitters are drawn.
uint8_t flowType = static_cast<uint8_t>(Flow::Noise)
: The selected wind.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags for the visual catalog.
virtual inline Dim dimensions() const override
: Volumetric: the two profiles steer every slice.
virtual inline void defineControls() override
: Publish the emitters, the flow, the palette walk and the tail's half-life.
virtual inline void prepare() override
: Size the wide plane, its spare, the dither error and the two profiles, and clear them.
virtual inline void tick() override
: The hot tick, which by default ticks every enabled child and times each.
Public Types¶
enum Mode
: Which emitters pour color in. All is the intended picture, the rest show one at a time.
| Value | Description |
|---|---|
All |
|
Orbital |
|
Lissajous |
|
Border |
enum Flow
: Which wind carries the color. Radial runs from geometry, so it costs no field and no state.
| Value | Description |
|---|---|
Noise |
|
Radial |
|
RadialIn |
More info¶
The cheap end of the transport family¶
FluidEffect runs a real Stam solver at roughly twenty passes over the grid, and this is two. On a large panel that is the difference between an effect that runs and one that does not. Reach for the solver when the medium is the subject, and for this when carried color is. Both tiers are Jeff's own arrangement: his FlowFields repo holds them behind one dispatch table.
Four power functions¶
inoise16 fills the profiles, [draw::advect16] carries the plane, [draw::decay16] fades it. The plane is 16-bit: a value multiplied by slightly less than one dies early or never fades at 8.
Two differences from the original¶
His advection is two passes over a temporary, so the y-shear reads an already-sheared row. Ours fuses them from the undisplaced source: sequential composition against simultaneous. He also floors the per-line shift at 0.3, where a low flow here can reach a cardinal slide.
Source: https://github.com/4wheeljive/FlowFields/blob/main/src/flows/flow_noise.h