A generator for procedural textures, rendered with Unity, utilizing a Perlin Noise implementation.
Ensure you have libimgui-dev
and libglfw3-dev
installed. If not, you can install them using the following command in the shell:
sudo apt-get install libglfw3-dev libimgui-dev
To compile and run, use the following commands:
g++ -Wall -Wextra -pedantic -std=c++17 Main.cpp PerlinNoise.cpp lodepng.cpp -o terrain_creator -limgui -lstb -lX11 -lglfw -lGL
./terrain_creator
If you're running Ubuntu through Windows, you might need a program like VcXsrv to execute the application.
In the C++ file directory, you will find the application already compiled. If you have the correct libraries, you can run it using ./terrain_creator
.
You will also find:
terrain.png
: Corresponds to the noise map.terrain_texture
: Corresponds to the textured noise map.
To utilize the generated textures in Unity:
- Open a project with Unity and load the sample scene.
2. Select the terrain generators in the scene's objects.
3. Utilize it to generate a noise map/height map, color map, and mesh.
4. You can then play around with the different parameters such as
- Frequency
- Octaves
- Lacunarity
- Offset (X and Y)
- Amplitude
- Scale
- Seed
Image of the colorized height map resulting from perlin noise :