Magic Pattern*

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

Magic Pattern is an experimental procedural generator based on Iterated Function Systems (IFS), similar to the famous "Kali Set" fractals. Unlike standard noise which aims for natural randomness, Magic Pattern creates highly structured, psychedelic, and kaleidoscopic intricacies. By iteratively folding, rotating, and translating coordinate space in a loop, it generates infinite, alien geometric details from a very compact mathematical formula, outputting a rich spectral color field.

Usage & Behavior

Magic seed : 136
Magic seed : 108
Magic seed : 122
Magic seed : 140

This node is a "happy accident" generator. The visual result is often unpredictable but aesthetically striking. Small changes to the Seed parameter can completely transform the structure from a symmetrical mandala to a chaotic energy field. It is particularly effective when used as an emission map for sci-fi effects or as a domain-warping source for other noises.

Best Used For: Abstract backgrounds, sci-fi energy shields, alien biological surfaces, psychedelic art, and kaleidoscopic motion graphics.

Key Features

  • Fractal IFS: Uses a 30-iteration loop to fold space into itself.
  • Spectral Color: Automatically maps the result to a sine-based RGB palette.
  • Detail Texture: Integrates a secondary Perlin noise layer for surface grain.

Deep Dive: The Fractal Loop

The "Magic" comes from a mathematical feedback loop executed 30 times per pixel:

  1. Polar Conversion: The XY coordinates are converted to an Angle and Radius.
  2. Folding: The angle is folded symmetrically (abs(fract(...))), creating the kaleidoscopic mirroring.
  3. Reconstruction: Coordinates are converted back to Cartesian space.
  4. Transformation: The space is offset (-0.7) and rotated. This prevents the pattern from collapsing into a single point and creates the "traveling" fractal structure.

Finally, a Perlin noise lookup is applied to the distorted coordinates to add the surface "Detail" grain.

Parameters

Coords Vector
The input texture coordinates. Note: The code pre-multiplies these by 24.0, so the pattern starts at a high frequency.
Seed (default: 120.0)
Acts as the "Evolution" or Time parameter. Changing this rotates the fractal domain and shifts the color phase. Animate this value for a continuously morphing, trippy effect.
Detail (default: 4.0)
Controls the amplitude of the secondary Perlin noise layer.
- High values: Adds granular, noisy texture to the fractal bands.
- Low values: Results in cleaner, smoother geometric shapes.

Quick Recipes

Fun starting points for exploration.

Living Energy

  • Seed #frame / 20
  • Detail 2.0
  • Coords UV * 0.5
Animating the seed creates a writhing, organic energy field.

Alien Carpet

  • Detail 10.0
  • Seed Static
High detail emphasizes the noise grain, creating a complex, rugged texture.

Mandala

  • Detail 0.0
  • Seed 120.0
Removing detail reveals the pure, smooth geometry of the underlying fractal.
Technical Note: The colors are generated using a cosine-based palette logic: 0.5 + 0.5 * sin(T + phase * n), where the phase shift is hardcoded to (13.0, 17.0, 23.0). This ensures a rich, harmonious color spread regardless of the input value. You may want to add a Mapping node and set its X,Y to -0.5 to have the pattern centered.
↑ Back to Top

Leave a Reply