Skip to main content

Perlin Worm

The Subterranean Carver. Generates smooth, organic paths by walking noise-steered routes. Ideal for tunnels, caves, and winding corridors.

Ports​

PortTypeDescription
Mask Bool Mask (Optional)Restricts where the worms can start and carve.
Worms Bool MaskA mask representing the volume carved out by the worms.

Details​

Perlin Worms are a classic procedural generation technique. Unlike the Vein node (which uses discrete steps and turns), the Perlin Worm node uses continuous noise to steer its heading, resulting in much smoother, snake-like paths.

Parameters​

  • Worm Count: How many worms to spawn.
  • Length (Min/Max): The range of steps each worm will travel.
  • Radius / End Radius: The thickness of the worm at the start vs. the end. This allows for "tapering" tunnels.
  • Turn Frequency: Controls how often the worm changes direction. High values create tight squiggles; low values create broad curves.
  • Turn Strength: How sharply the worm can turn.
  • Start Mode:
    • Random In Mask: Worms start at random valid locations.
    • Surface Column: Worms start at the top of the map (or the top of a masked area) and tunnel downward.
  • Horizontal Bias: Forces worms to prefer moving sideways (ideal for sprawling side-scroller caves).
  • Downward Bias: Forces worms to prefer moving down (ideal for vertical shafts or pits).

Potential Use Cases​

  • Natural Caves: Set a high Radius (3-5) and low Turn Frequency to carve out large, smooth underground chambers.
  • Wormholes: Use a tapering radius (Radius 4, End Radius 1) to create tunnels that narrow as they go deeper.
  • Terraria-style Tunnels: Use Surface Column start mode with high Downward Bias to create entrance shafts into an underground biome.
  • Root Systems: Combine multiple low-radius worms with moderate Turn Strength to create gnarled root patterns under a "Great Tree."