This repository is a fork and enhancement of Kurt Spencer's original OpenSimplex Noise algorithm, ported from Java to C.
⚠️ Note: This is not Ken Perlin’s Simplex noise algorithm. It is a separate and patent-free noise function with similar benefits.
- Support for 2D, 3D, and 4D noise
- LuaJIT bindings via FFI (see
opensimplex-lua.lua) - Ideal for procedural generation (e.g. terrain, textures, maps, etc.)
open-simplex-noise.c/h– Core C implementationopensimplex-lua.lua– LuaJIT FFI wrapperusageExample.lua– LuaJIT usage exampleMakefile– Compile withmake.gitignore,LICENSE,README.md
makelocal simplex = require("opensimplex-lua")
local noise = simplex.new(123456) -- Start with a seed
print("=== Noise 2D ===")
for i = 0, 4 do
local val = noise:noise2(i * 0.1, i * 0.2)
print(string.format("noise2(%.2f, %.2f) = %.4f", i * 0.1, i * 0.2, val))
endSee full usage in usageExample.lua.
This library was enhanced and adapted for procedural terrain and map generation for games, currently being developed using a pipeline of C, Lua (LuaJIT), and Python (with bpy for Blender integration).
You can check out the full project here:
🔗 Procedural Generation of Maps → github.com/Thomaskynol/ProceduralGenerationMaps
OpenSimplex provides smooth and visually pleasing noise ideal for:
- Terrain generation
- Biome maps
- Texture synthesis
- Noise-based animations
MIT License – see LICENSE
- Kurt Spencer – Original creator of the OpenSimplex noise algorithm (Java implementation)
- smcameron – C port of Kurt Spencer’s implementation
- Thomas – LuaJIT FFI bindings and Lua integration