RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsflowgraphnodesutil

Perlin Noise (Flowgraph Node)

- **Node Name:** `Perlin Noise`

Overview

  • Node Name: Perlin Noise
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/util/perlinNoise.lua

Generates coherent random numbers using Perlin noise. Produces smooth, natural-looking random values suitable for procedural content.

Pin Schema

Input Pins

PinTypeDefaultDescription
flowflow-Input flow
valuenumber-Input seed value (e.g., time or distance)
octavesnumber (hidden)6Number of detail levels
amplitudenumber (hidden)128Output value range
frequencynumber (hidden)4Detail density per octave
normalizebool (hidden)falseNormalize output to -0.5 to 0.5 range
randomStartSeedbool (hidden)trueRandomize seed each run for varied patterns

Output Pins

PinTypeDescription
flowflowOutput flow
valuenumberThe generated noise value

Internals

Key Methods

MethodDescription
init()Initializes graph data, debug settings, scale range
drawCustomProperties()Provides "Smooth preset" and "Natural preset" buttons
drawMiddle(builder, style)Renders a debug graph of recent output values
_executionStarted()Initializes permutation table, sets random start seed
work()Computes octave Perlin noise from input value, maintains debug graph
OctavePerlin(x, y, z, octaves, amplitude, frequency)Multi-octave noise accumulator
noise(x, y, z)Core Perlin noise function using permutation hash
grad(hash, x, y, z)Gradient function using dot product lookup
fade(t)Smoothstep fade: 6t⁵ - 15t⁴ + 10t³
lerp(t, a, b)Linear interpolation

Presets

PresetFrequencyAmplitudeOctaves
Smooth0.15641
Natural0.51286

Debug

When data.debug is true, the node displays a scrolling graph of the last 1000 output values in the editor.

How It Works

  1. On execution start, builds the permutation table (classic Perlin noise permutation) and optionally generates a random start seed.
  2. Each frame, computes OctavePerlin(randomStartSeed + inputValue, 0, 0, ...).
  3. Octave noise sums multiple noise passes at increasing frequency and decreasing amplitude.
  4. Core noise() function hashes unit cube coordinates and interpolates gradients using the fade function.
  5. If normalize is enabled, divides the result by the maximum possible value to produce -0.5 to 0.5 range.

Usage Example

-- Generate smooth terrain-like variation:
-- [Timer] → elapsed → value → [Perlin Noise] octaves=6, frequency=0.5
--                                → value → [Scale] → [Set Terrain Height]

-- Use for vehicle body sway animation:
-- [Frame Counter] → count → value → [Perlin Noise] preset=Smooth
--                                     → value → [Apply Camera Offset]

Key Dependencies

  • bit (bit32) - bitwise operations for permutation hash
  • Classic Perlin noise permutation table (Ken Perlin's reference implementation)

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

On Menu (Flowgraph Node)

- **Node Name:** `On Menu`

Pop Action Map (Flowgraph Node)

- **Node Name:** `Pop Action Map`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsPresetsDebugHow It WorksUsage ExampleKey DependenciesSee Also