Math Step*

Preview
Performance Cost 🟢 Low
Signal Type Vector → Vector
Implementation Native Compiled C++
Devices (Cycles) CPU / GPU (1:1)

Math Step performs parametric shaping operations between two values. While the standard "Math" node offers basic arithmetic, this node focuses on Thresholding and shaping. It provides several response curves: from hard binary steps (0 or 1) to soft, organic transitions (Smoothstep) and signal generation (Pulse). It also includes Smooth Minimum/Maximum blending, making it essential for continuous value shaping and SDF (Signed Distance Field) logic.

Usage & Behavior

Shape Logic: Practical Applications

Use this node to define edges, isolate specific values, or blend shapes together.

1. The Hard Mask (Clipping)
Mode: STEP
Input 1: Threshold (0.5)
Mixer: Noise / Gradient

The standard "Greater Than" logic. Use this to turn soft gradients into binary black/white masks. Perfect for creating holes, alpha cutouts, or turning a smooth noise into distinct islands.

2. The Isoline (Band Extraction)
Mode: PULSE
Input 1: Center Position
Input 2: Band Width

Instead of just cutting off values, Pulse isolates a specific range. It returns white only when the input is close to the Center. Use this to draw topographic lines on terrain or "scan lines" on a sci-fi shield.

3. The Organic Fusion (SDF)
Mode: SMOOTH MIN
Input 1: Shape A (Distance)
Input 2: Shape B (Distance)

Standard math creates sharp, unnatural intersections when shapes overlap. Smooth Min blends the values together with a liquid-like fillet. Essential for Signed Distance Field (SDF) modeling or merging procedural masks organically.

Step between two value
Smooth Step
Pulse
Pulse Train

This is your primary tool for remapping ranges. Use Smoothstep to turn a linear gradient into a soft mask with eased edges. Use Pulse to extract a specific "band" of values (isolines). Use Smooth Min to merge two shapes together organically without sharp intersections.

Best Used For: Mask generation, edge softening, isolating value ranges, creating stripes/bands, and organic shape blending (SDFs).

Key Features

  • 8 Shaping Functions: Covers everything from hard logic to organic blending.
  • Vector Support: Processes RGB channels simultaneously.
  • Signal Generation: Creates periodic pulses and trains without complex math chains.

Cheat Sheet: Step Modes

Select the mode based on the desired transition curve:

Thresholds (Remapping)
  • STEP: Binary cutoff. Returns 0 if $Val < Edge$, else 1.
  • LINEAR STEP: Linear ramp between Edge A and Edge B.
  • SMOOTH STEP: Cubic curve ($t^2(3-2t)$). Standard soft transition.
  • SMOOTHER STEP: Quintic curve ($t^3(6t^2-15t+10)$). Even softer.
Organic Blending
  • SMOOTH MIN: Softly blends to the smaller value (Union).
  • SMOOTH MAX: Softly blends to the larger value (Intersection).
Signals / Patterns
  • PULSE: Returns 1.0 within a specific range, 0.0 outside.
  • PULSE TRAIN: Repeating pattern of pulses.

Parameters

Mode Enum
Selects the mathematical operation (see Cheat Sheet above).
Input 1 Vector
Step Modes: The lower edge / threshold.
Blend Modes: The first value to blend.
Input 2 Vector
Step Modes: The upper edge / threshold.
Blend Modes: The second value to blend.
Mixer (float)
Step Modes: The value to test (the gradient/coordinate).
Blend Modes: The "k" factor (smoothness amount). Higher values create a wider, softer blend area between Input 1 and Input 2.

Quick Recipes

Practical shaping scenarios.

Perfect Soft Mask

  • Mode SMOOTH STEP
  • Input 1 0.3
  • Input 2 0.7
  • Mixer Gradient
Takes a linear gradient and forces it to be black below 0.3, white above 0.7, and smooth in between.

Isoline (Band)

  • Mode PULSE
  • Input 1 Center (0.5)
  • Input 2 Width (0.1)
  • Mixer Noise
Extracts a thin band of values where the noise equals 0.5.

Liquid Merge

  • Mode SMOOTH MIN
  • Input 1 Shape A
  • Input 2 Shape B
  • Mixer 0.2
Merges two shapes together with a goopy, liquid-like fillet instead of a sharp intersection.
↑ Back to Top

Leave a Reply