Coding Challenge 11: 3D Terrain Generation with Perlin Noise in Processing

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=IKB1hWWedMk



Duration: 22:44
1,032,086 views
25,186


In this coding challenge, I create a 3D procedural terrain using Perlin Noise and the beginShape() function in Processing. Code: https://thecodingtrain.com/challenges/11-3d-terrain-generation-with-perlin-noise

πŸ•ΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/OPYPc4ueq

πŸŽ₯ Previous video: https://youtu.be/HyK_Q5rrcr4?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Next video: https://youtu.be/f0lkz2gSsIk?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
πŸ’Ύ beginShape() reference: https://processing.org/reference/beginShape_.html
πŸ’Ύ noise() reference: https://processing.org/reference/noise_.html

Videos:
πŸš‚ What is Perlin Noise?: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/perlin/perlin-noise-and-p5js-tutorial-intro
πŸ”΄ Coding Train Live 37: https://youtu.be/ELpZW62HGVs?t=1735s

Related Coding Challenges:
πŸš‚ #18 3D Fractal Trees: https://youtu.be/JcopTKXt8L8
πŸš‚ #24 Perlin Noise Flow Field: https://youtu.be/BjoM9oKOAKY
πŸš‚ #112 3D Rendering with Rotation and Projection: https://youtu.be/p4Iz0XJY-Qk

Timestamps:
00:00 Introduction to the Challenge
00:46 What do we need to do?
02:14 Draw a rectangular grid!
04:13 Create a flat triangle strip mesh!
06:51 Rotate the surface in 3D!
08:47 Set the z-values of the vertices randomly!
11:04 Create a 2D array to store the z values!
13:31 How do we make the terrain infinite? What is Perlin Noise?
17:03 How do we make the terrain smooth?
17:43 Reduce offsets to get smoother z values
19:17 How do we make it appear as if we are moving over the terrain?
20:30 Change y-offset per frame to create the illusion of flying!
22:05 Thanks for watching!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://discord.gg/hPuGy2g
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#perlinnoise #terraingeneration #procedural #processing







Tags:
processing perlin noise
perlin noise
perlin
terrain generation
coding challenge
processing
noise
challenge
procedural
random
game
tutorial
terrain
procedural terrain
procedural generation
programming
coding
daniel shiffman
nature of code
processing 3
generation
creative coding
programming challenge
learning processing
processing (programming language)
p3d processing
p3d
2d perlin noise
3d
processing tutorial
perlin noise processing
terrain perlin noise