Editor Tool Utilities – Simplex Noise
2D Simplex noise implementation with a static permutation table. Provides smoother, less grid-aligned noise compared to Perlin noise, with O(n²) complexity for n dimensions.
2D Simplex noise implementation with a static permutation table. Provides smoother, less grid-aligned noise compared to Perlin noise, with O(n²) complexity for n dimensions.
Public API
| Function | Signature | Description |
|---|---|---|
M.noise | (xin, yin) → number | Evaluates 2D simplex noise at coordinates. Returns approximately [-1, 1] (scaled by 70) |
Code Examples
local simplex = require('editor/toolUtilities/simplex')
-- Sample simplex noise at a point
local value = simplex.noise(15.3, 42.7)
-- Generate a displacement map with simplex noise
local scale = 0.02
for y = 0, 255 do
for x = 0, 255 do
local n = simplex.noise(x * scale, y * scale)
-- n is in roughly [-70, 70] range; normalise as needed
local normalised = (n / 70 + 1) * 0.5 -- map to [0, 1]
end
end
-- Compare with Perlin noise for different characteristics
local perlin = require('editor/toolUtilities/perlin')
local pVal = perlin.noise(10, 20) -- Perlin
local sVal = simplex.noise(10, 20) -- Simplex (less directional artifacts)See Also
- Tool Utilities - Fit Polyline - Related reference
- Editor Tool Utilities – Geometry - Related reference
- Editor Tool Utilities – Gizmo - Related reference
- World Editor Guide - Guide
Editor Tool Utilities – Road Design Standards
Provides preset road design standards for homologation analysis. Each preset defines maximum slope, minimum curve radius, maximum banking, and width gradient tolerances.
Editor Tool Utilities – Skeleton (Image Vectorisation)
Suite for converting PNG bitmap images to vectorised polylines. Pipeline: bitmap → binary mask → Guo-Hall skeletonisation → keypoint detection → path extraction → join/filter → width estimation → RDP