https://github.com/zerdicorp/terrain_3d
Procedural terrain generation based on Perlin Noise in 3D!
https://github.com/zerdicorp/terrain_3d
3d-rendering perlin-noise procedural-generation terrain-generation
Last synced: 2 months ago
JSON representation
Procedural terrain generation based on Perlin Noise in 3D!
- Host: GitHub
- URL: https://github.com/zerdicorp/terrain_3d
- Owner: ZERDICORP
- Created: 2022-05-07T15:51:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-27T10:18:10.000Z (over 3 years ago)
- Last Synced: 2025-04-02T20:48:35.378Z (6 months ago)
- Topics: 3d-rendering, perlin-noise, procedural-generation, terrain-generation
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# terrain_3d 🏞️
#### Procedural terrain generation based on Perlin Noise in 3D!
## What is it? :no_mouth:
Well.. I've been playing around with 3D graphics rendering recently.
And, also, I studied Perlin Noise.
Don't feel it yet?
I couldn't resist trying to combine the two :yum: :sweat_drops:## How it works? :hushed:
> There is not much to talk about here, everything is extremely simple.
> I can literally do it in 3 steps.#### Step #1 - Create a heightmap with Perlin Noise
Yes, we just take the perlin noise and find the noise values for all points in the 2d map (the resulting values are the **heightmap**).If you want to learn a little more about perlin noise: https://github.com/ZERDICORP/perlin_noise_2d
#### Step #2 - Convert heightmap to 3D point array
Knowing the height values, we can already generate points in 3D space.
One of the axes should indicate the depth of the terrain (in my case it is the x-axis).
We apply height values to it.#### Step #3 - Connect all points with polygons
Yes, this is the last step to create the base terrain.Then you can add all sorts of cool things (color depending on the height values, the plane of the water surface, various objects on the map and much, much more).
## How can I try it? :rabbit2:
> I am using IntellijIDEA, btw
#### 1. Just open the project in the IDE and run the following file
```
src/main/java/just/curiosity/terrain_3d/Main.java
```
#### 2. You can read about how to interact with the renderer at the link below
https://github.com/ZERDICORP/renderer_3d#interaction-point_right-raised_hands
#### 3. To generate a new terrain, press the "R" key## Screenshot :heart_eyes_cat:
