• Stars
    star
    320
  • Rank 131,126 (Top 3 %)
  • Language
    C++
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Perlin's Simplex Noise C++ Implementation (1D, 2D, 3D)

Perlin Simplex Noise C++ Implementation (1D, 2D, 3D)

Travis CI Linux Build Status AppVeyor Windows Build status

About Perlin's "Simplex" Noise

  • Perlin's "Classic" Noise (1984) is an algorithm producing pseudo-random fluctuations simulating natural looking variations, producing paterns all of the same size. It is a kind of gradiant-noise algorithm, invented by Ken Perlin while working on visual special effects for the Tron movie (1982). It works by interpolating pseudo-random gradiants defined in a multi-dimensionnal grid. Ken Perlin original references
  • Perlin's "Improved" Noise (2002) switches to a new interpolation fonction with a 2nd derivative zero at t=0 and t=1 to remove artifacts on integer values, and switches to using predefined gradients of unit lenght to the middle of each edges. Ken Perlin original references
  • Perlin's "Simplex" Noise (2001) rather than placing each input point into a cubic grid, based on the integer parts of its (x,y,z) coordinate values, placed them onto a simplicial grid (think triangles instead of squares, pyramids instead of cubes...) Ken Perlin original references

Coherent noise

A coherent noise is a type of smooth pseudorandom noise with following properties:.

  • same input will always return the same output.
  • small change of the input will produce small change of the output.
  • large change of the input will produce random change of the output.

Fractal noise / Fractional Brownian Motion

Fractional Brownian Motion (fBm) is the summation of successive octaves of coherent noise, each with higher frequency and lower amplitude.

  • Frequency of an octave of noise is the "width" of the pattern
  • Amplitude of an octave of noise it the "height" of its feature
  • Lacunarity specifies the frequency multipler between successive octaves (typically 2.0).
  • Persistence is the loss of amplitude between successive octabes (usually 1/lacunarity).

2D image of fractal noise with 7 octaves of 2D Simplex Noise (from my SimplexNoiseCImg example project): 1 octave of 2D Simplex Noise

Code attribution

This C++ implementation is based on the speed-improved Java version 2012-03-09 by Stefan Gustavson (original Java source code in the public domain). http://webstaff.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java:

Simplex noise demystified, Stefan Gustavson, Linköping University, Sweden ([email protected]), 2005-03-22

License

Copyright (c) 2014-2019 Sebastien Rombauts ([email protected])

Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt or copy at http://opensource.org/licenses/MIT)

Current Status

Features

  • 1D, 2D and 3D Perlin Simplex Noise algorithms
  • standard Fractal/Fractional Brownian Motion (fBm) noise summation of multiple octaves
  • CMake project with, cpplint to check code style, cppchek to check code sanity, Doxygen to generate code documentaion

Wishlist

  • Implement 4D Perlin Simplex Noise algorithms
  • Add a parameter for permutation (offset and mask?) of the random table (could be way better than simple offseting applied by the user application)

How to contribute

GitHub website

The most efficient way to help and contribute to this wrapper project is to use the tools provided by GitHub:

Contact

You can also email me directly.

See Also

SRombauts GitHub website

Continuous Integration

This project is continuously tested under Ubuntu Linux with the gcc and clang compilers using the Travis CI community service with the above CMake building and testing procedure. It is also tested in the same way under Windows Server 2012 R2 with Visual Studio 2013 compiler using the AppVeyor countinuous integration service.

Detailed results can be seen online:

More Repositories

1

SQLiteCpp

SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
C
2,150
star
2

UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
C++
820
star
3

shared_ptr

A minimal shared/unique_ptr implementation to handle cases where boost/std::shared/unique_ptr are not available.
C++
178
star
4

UE4ProceduralMesh

UE4.7 Procedural Mesh Generation plugin
C++
169
star
5

UEPlasticPlugin

Plastic SCM Plugin for Unreal Engine
C++
148
star
6

LoggerCpp

LoggerC++ (LoggerCpp) is a simple, elegant and efficient C++ logger library.
C++
62
star
7

ecs

A small and easy C++ Entity-Component-System (ECS) library
Python
51
star
8

UE4QuickStart

Unreal Engine 4.10 C++ Programming Quick Start Tutorials
C++
34
star
9

HtmlBuilder

A simple C++ HTML Generator
C++
30
star
10

SQLiteCpp_Example

C++ Example project using SQLiteCpp as a Git submodule / CMake subdirectory
C++
25
star
11

UE4ArchVisDemo

Architecture Visualization Demo with Unreal Engine 4
14
star
12

UE4StealthGame

Unreal Engine 4 FPSGame C++ Template modified to become a Multiplayer Stealth Game
C++
12
star
13

cpp-skeleton

A simple skeleton for C++ development with CMake and Google Test.
C++
10
star
14

UE4CoopGame

Unreal Engine 4 C++ TPS Multiplayer Coop Game
C++
8
star
15

UE4_Paper2D_2048

Unreal Engine 4 Paper2D clone of 2048 (http://gabrielecirulli.github.io/2048/)
7
star
16

UE4ShooterGame

UE4.19 C++ Shooter Game
C++
6
star
17

SimplexNoiseCImg

A simple 2D Map Generator using my SimplexNoise and CImg
C
6
star
18

cmake-basics

Using the CMake tutorial to test Travis-CI
C++
6
star
19

CrashHandler

A basic Linux crash signal handler in C
C
6
star
20

UE4Tanks

Unreal Engine Tanks Tutorial from Epic Games currently on Twitch
C++
6
star
21

glload

The OpenGL Loading Library (GL Load) is the Unofficial OpenGL SDK library for initializing OpenGL's functions.
C
5
star
22

opengl-experiments

Some basic experiments with the Unofficial OpenGL SDK
C++
5
star
23

sdlman

Test SDL2 with CMake Travis CI AppVeyor...
C
4
star
24

ZMQCpp

ZMQC++ (ZMQCpp) is a smart and easy to use C++ wrapper of the ZeroMQ messaging library.
C++
4
star
25

cpp-algorithms

Experimenting with well known algorithms and data structures. Hash and random functions
C++
3
star
26

UE4BasicCode

Test of a basic C++ code project for Unreal Engine 4
C++
3
star
27

BoostHttpServer

Improvements on top of the Boost Asio HTTP server example
C++
3
star
28

UE4CustomSettings

C++
3
star
29

srombauts.github.io

SRombauts GitHub Pages
CSS
2
star
30

cpplint

cpplint checks for compliance with Google C++ Style Guide (with modifications)
Python
2
star
31

gltext

Simple C++ library to render text with Freetype2 and Harfbuzz under OpenGL 3
C++
2
star
32

UE4Menus

Unreal Engine 4 Main and Pause Menus using a dedicated level
2
star
33

glfw_fullscreen

Minimal application to demonstrate fullscreen glwf mode
C++
1
star
34

codingame-great-escape

My attempt at the CodinGame multiplayer contest "The Great Escape"
C++
1
star
35

UE4VrDevKit

UE4.21 demo with Oculus Go mobile Headset
1
star
36

freetype-experiments

Experiments with freetype2 and gltext in OpenGL
C++
1
star
37

cpp-basics

Small example to show some basic features of C++
C++
1
star
38

unique_ptr

Famous C++03 unique_ptr implementation rescued from the lost http://home.roadrunner.com/~hinnant/unique_ptr03.html
C++
1
star