Oscillate
Generates repeating wave patterns over space and/or time.
Category: Fields Menu path: Fields > Oscillate
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
scalar | scalar | output | Wave value at comp center |
vec2 | vec2 | output | Gradient vector at comp center |
scalarField | scalarField | output | Spatial wave field |
vectorField | vectorField | output | Analytical gradient of the wave field |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
waveform | enum | Sine | Wave shape: Sine, Triangle, Square, Sawtooth |
mappingMode | enum | Linear | Coordinate mapping: Linear (parallel stripes) or Radial (concentric rings) |
frequency | scalar | 2.0 | Number of wave cycles across the composition width |
speed | scalar | 0.0 | Temporal animation rate in cycles per second. 0 = static pattern |
amplitude | scalar | 1.0 | Output scale multiplier |
offset | scalar | 0.0 | DC bias added to the wave output |
phase | scalar | 0.0 | Wave offset in cycles (0-1 = one full cycle) |
angle | scalar | 0.0 | Wave direction in degrees (Linear mode only) |
center | vec2 | (0, 0) | Ring center in comp-pixel coordinates (Radial mode only) |
damping | scalar | 0.0 | Exponential decay over time. 0 = no decay. Higher = faster fadeout |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
frequency_in | scalar | frequency |
speed_in | scalar | speed |
amplitude_in | scalar | amplitude |
phase_in | scalar | phase |
angle_in | scalar | angle |
center_in | vec2 | center |
damping_in | scalar | damping |
How It Works
Oscillate converts 2D position into a scalar distance using the selected mapping mode, then applies a repeating wave function. In Linear mode, the distance is measured along the angle direction, producing parallel wave fronts. In Radial mode, the distance is measured from the center point, producing concentric rings.
The wave function is: wave(distance * frequency + phase + time * speed) * amplitude * damping + offset
The vectorField output is the analytical gradient of the scalar field — a vector pointing in the direction the wave is rising, with magnitude proportional to the slope. This makes it immediately useful for driving particle motion via PointAdvect.
Usage Examples
Basic: Animated ripples
Set mapping mode to Radial, frequency to 4, speed to 1. Connect scalarField to Colorize for visible concentric rings that expand outward over time.
Creative: Wave-driven particles
Connect vectorField to PointAdvect's field input. Particles will oscillate back and forth with the wave. Use Radial mode for particles that pulse in and out from a center point. Add damping to make the motion settle over time.
Basic: Stripe pattern
Leave mapping mode on Linear, set frequency to 5. Connect scalarField to ShapeAttributes or PointAttributes for alternating stripe patterns across geometry.
Tips
- Speed = 0 produces a static spatial pattern (no animation). Useful for procedural textures.
- The Square waveform has zero gradient everywhere (flat between transitions), so its vectorField output is effectively zero. Use Sine or Triangle for particle-driving workflows.
- Phase is in cycles (0-1), not degrees. Phase 0.5 inverts the wave.
- Damping only takes effect when speed > 0 (it decays based on elapsed time).
- Angle only applies in Linear mode; center only applies in Radial mode.
- Frequency is normalized to composition width, so frequency=2 always gives 2 wave cycles across the comp regardless of resolution.
Related Nodes
- Noise — Smooth procedural noise (non-periodic, organic patterns)
- Random — Spatially incoherent random values (TV static)
- Gradient — Spatial color gradient with similar mapping modes
- DistanceField — Distance field from shape geometry
- Remap — Reshape any field output through a curve