Gradient Pattern*

Preview
Performance Cost 🟢 Low
Space 2D/3D - UV/World/Object
Implementation Native Compiled C++
Devices (Cycles) CPU / GPU (1:1)

Gradient Pattern is a versatile procedural generator that goes far beyond standard linear or spherical gradients. It offers 19 analytic shapes ranging from basic ramps (Linear, Quadratic, Easing) to complex radial structures (Spiral, Conical, Rings, Star). Unlike texture-based gradients, these are computed mathematically per-pixel, offering infinite resolution, precise repetition controls, and full 3D transform support (Translation, Rotation, Scaling) without requiring UV maps.

Usage & Behavior

Spiral ramp
Ring
Conical
Diamond

This node is designed to be the foundational block for masking, blending, and UI elements. The Repeat parameter is particularly powerful: it tiles the gradient in 3D space, automatically centering and normalizing the pattern within each cell. This allows you to turn a single "Spherical" gradient into a grid of polka dots, or a "Linear" gradient into blinds/stripes, all within a single node.

Best Used For: Masking (soft falloffs), UI elements (radars, loading bars), geometric textures (polka dots, stripes), and controlling blend factors.

Key Features

  • 19 Gradient Types: Extensive library including Shapes (Star, Hex), Ramps (Easing, Quadratic), and Radials.
  • Built-in Tiling: Native Repeat parameter handles tiling and centering automatically.
  • 3D Transforms: Position, Rotation, and Scale controls work in Object/World space.

Deep Dive: Preserving Gradient Energy

In standard procedural shading, simply repeating a pattern often breaks its contrast because the coordinate domain shrinks.
Rombo Gradient uses specific Energy Conservation logic to prevent this.

The Problem: Shrinkage

Gradient formulas rely on input coordinates reaching a value of 1.0 to produce pure white. When you split space into 50 repetitions, the local coordinates inside a tile shrink to tiny values (e.g., 0.02), resulting in weak, dark gray gradients.

The Solution: Normalization

We automatically multiply the local coordinates by the Repeat factor. This stretches the internal domain back to the standard -1 to +1 range inside every individual tile, ensuring that Contrast is Conserved at any scale.

Parameters

Gradient Type Enum
Selects the mathematical function used to generate the gradient:
  • LINEAR / QUADRATIC / EASING: Standard ramps with varying interpolation curves.
  • DIAGONAL / BILINEAR: Multi-axis ramps.
  • RADIAL / CONICAL: Angular gradients sweeping around a center point.
  • SPHERICAL / QUADRATIC SPHERE: Distance-based falloff from a center point.
  • SPIRAL / SPIRAL RAMP: Continuous winding patterns.
  • RINGS: Concentric sine-wave ripples.
  • PARABOLIC / MANHATTAN: Shaped falloffs (Dome vs Pyramid).
  • SHAPES: Diamond, Hex, Star, Smooth Box (Geometric distance fields).
  • STEPS: Quantized radial bands.
Projection Axis Enum
Determines the 2D plane within 3D space where the gradient is drawn.
  • YZ / XZ / XY: Selects the projection plane. Useful when working in World Space.
Coords Vector
The input texture coordinates.
Position Vector (default: 0, 0, 0)
Translation offset. Moves the center point of the gradient.
Rotation (default: 0.0)
Rotation angle (in radians).
Scale Vector (default: 1.0, 1.0, 1.0)
Scales the gradient domain. Larger values compress the gradient (make it smaller/tighter).
Repeat (default: 1)
Tiles the gradient.
- 1: Single instance.
- > 1: Creates a grid of repeating gradients, automatically re-centered and normalized.

Quick Recipes

Common utility patterns.

Polka Dots

  • Type SPHERICAL
  • Repeat 10
  • Color Ramp Hard Step
Repeating a spherical gradient and clamping it creates a perfect grid of dots.

Radar Sweep

  • Type CONICAL
  • Rotation (Animate)
  • Scale 1.0
A spinning conical gradient simulates a radar or sonar display.

Soft Box Light

  • Type SMOOTHBOX
  • Scale 0.8
  • Repeat 1
Creates a square shape with rounded, soft edges, ideal for masking rectangular lights.
Technical Note: The repeating logic uses fmod(coord + large_const, cell_size) - cell_size*0.5 to ensure the gradient origin (0,0,0) is always perfectly centered in the middle of every tile, regardless of whether the repetition count is even or odd.
↑ Back to Top

Leave a Reply