Perlin Noise Generator for C#
A downloadable tool
IndieForge – Seeded 2D Perlin Noise
OVERVIEW
This package provides a deterministic, seeded 2D Perlin noise implementation intended for procedural generation in games and simulations. It's meant for those who don't really want to bother learning all the math involved.
It converts (x, y) coordinates into smooth, natural-looking pseudo-random values. The same seed will always generate the same noise pattern, making it suitable for reproducible worlds, save/load systems, and testing.
This implementation focuses on clarity, performance, and ease of integration.
FEATURES
• Seeded and deterministic output
• Classic gradient-based Perlin noise
• Fractal Brownian Motion (fBm) support
• Lightweight and dependency-free
• Designed for real-time use
• Compatible with Unity, MonoGame, Godot (C#), and similar engines
OUTPUT RANGE
Noise(x, y) returns values approximately in the range:
-1.0 to 1.0
To convert the result to a 0–1 range:
normalized = noise * 0.5 + 0.5
SEEDS AND DETERMINISM
The generator is initialized with an integer seed.
Same seed: • Produces the same noise pattern every time
Different seed: • Produces a completely different noise pattern
Coordinates alone do not define randomness — the seed controls the permutation table used internally.
This behavior is important for: • Procedural worlds • Save/load consistency • Multiplayer synchronization • Debugging and testing
CORE METHODS
Noise(x, y)
Generates 2D Perlin noise at the given coordinates.
• Uses gradient vectors at grid corners
• Smoothly interpolates values
• Avoids visible grid artifacts
Typical usage: Sample noise at scaled coordinates (for example, x * 0.01).
Fbm(x, y, octaves, frequency, gain, lacunarity)
Generates Fractal Brownian Motion by stacking multiple layers of Perlin noise.
Each octave: • Increases frequency (adds detail) • Decreases amplitude (reduces influence)
Common values:
• Octaves: 4 to 8
• Frequency: 0.005 to 0.05
• Gain: 0.45 to 0.6
• Lacunarity: 2.0
This method is commonly used for terrain heightmaps and organic patterns.
PERFORMANCE NOTES
• Uses a precomputed permutation table
• No memory allocations during sampling
• No trigonometric functions
• Safe to call frequently
For large worlds, consider caching results or sampling at chunk boundaries.
WHAT THIS CODE DOES NOT DO
• Does not place tiles
• Does not generate meshes
• Does not render graphics
• Does not manage chunks or world data
This code only produces numeric values. Interpretation is left to the user.
FILE CONTENTS
PerlinNoiseC#
ReadMe.txt
LICENSE NOTES
This source code is intended for use in personal and commercial projects.
You may:
• Use the code in games and tools
• Modify the code
• Integrate it into larger systems
You may not:
• Resell or redistribute this exact source code as a standalone asset without modification
Adjust license terms as needed for your release.
Presets
Smooth terrain
-
octaves: 4–5
-
frequency: 0.008–0.015
-
gain: 0.45
-
lacunarity: 2.0
Rugged mountains
-
octaves: 6–7
-
frequency: 0.01–0.02
-
gain: 0.6
-
lacunarity: 2.0
-
plus: power curve
Pow(n01, 1.8–2.6)
Cloudy texture
-
octaves: 5–6
-
frequency: 0.03–0.07
-
gain: 0.5
-
lacunarity: 2.0
-
keep contrast low
| Updated | 19 hours ago |
| Published | 4 days ago |
| Status | Released |
| Category | Tool |
| Author | IndieForgeStudios |
| Tags | c, code, coding, Indie, perlin, perlinnoise, programming, tools, visual-studios |
Purchase
In order to download this tool you must purchase it at or above the minimum price of $1.99 USD. You will get access to the following files:

Comments
Log in with itch.io to leave a comment.
Sorry, it doesn't state this but I plan on adding support for more languages.
Don't worry, the price will stay the same!