C++: Perlin Noise Tutorial

  Рет қаралды 11,463

Zipped

Zipped

Күн бұрын

In this video, we dive into Perlin noise, a gradient noise function primarily used in computer graphics for producing natural-looking procedural content like terrains and textures. We break down its layered structure, explore the importance of octaves, and guide you through the algorithm and its C++ implementation. Finally, we sample the noise function and display a preview using SFML (SFML Visual Studio Installation Guide: • C++ SFML Tutorial: Ins... ).
Final code: pastebin.com/gXEYsmw8
Random Gradient Function Solo Code: pastebin.com/XwCPn0xR
Contact: IG: @xzips Discord: mr_io

Пікірлер: 23
@KS-qe9yu
@KS-qe9yu Жыл бұрын
This is an excellent video. Thanks a lot.
@gustafbstrom
@gustafbstrom 9 ай бұрын
Nice and clear. Well done.
@drag0nblight
@drag0nblight 5 ай бұрын
Best explanation of Perlin Noise so far.
@rafa_br34
@rafa_br34 2 ай бұрын
I can't deny I loved the time and dedication you put into this video, and I found it underrated even (honestly we need more quick videos like that guide through the theory and the implementation). Some improvements could be made, for instance, when describing how octaves work you could have shown all the images used to create the final result (maybe even a legend with the parameters used), but that's just my opinion. Also (not that I have anything against SFML, in fact I myself have used it) but it might be interesting to mention other (considerably easy) ways of encoding images for people with less C++ experience (PPM, some single header PNG encoder, etc). Again, that's just my opinion on the changes that could be made, your explanation of how the algorithm works was basically perfect. I will definitely be looking forward to more content of yours.
@yugsolanki4766
@yugsolanki4766 Жыл бұрын
Great video
@MrPartzz
@MrPartzz 4 ай бұрын
Great explanation.
@Juss_Chillin
@Juss_Chillin Жыл бұрын
Great explanation, great animations, great video!
@Y.Albasel
@Y.Albasel Ай бұрын
This goes into my 3d terrain generator
@Mochu_s_Junkyard
@Mochu_s_Junkyard 2 ай бұрын
What a great video
@varshneydevansh
@varshneydevansh Жыл бұрын
amazing
@Astro_retired
@Astro_retired 4 ай бұрын
Amazing tutorial, straight and simple.
@arthurklause5251
@arthurklause5251 4 ай бұрын
thx !
@hellfire0332
@hellfire0332 9 ай бұрын
Great video. If you wanted to wrap the noise on the left and right edges so that they flow smoothly (such as in a terrain generated world map), what modifications would you need to make to this code?
@vladmunteanu5864
@vladmunteanu5864 8 ай бұрын
You'd probably have to take the module of your x and y coordinates depending on the size of the texture you want
@oliverpetrovic3689
@oliverpetrovic3689 Жыл бұрын
❤❤
@kilianvounckx9904
@kilianvounckx9904 11 ай бұрын
Awesome video, learned a lot! One question: in the main function, you create the pixel array with new, but never use delete. Does this mean it is leaked?
@zipped1214
@zipped1214 11 ай бұрын
Thank you, glad it helped! That's an excellent question and you're totally correct, that's a mistake and I should have called delete on it before ending the program. The program memory will still be freed once it closes, so the memory isn't really leaked, but if we had a longer program or called the main function in a loop for some reason, then yes that could become a problem. Nicely done on spotting that!
@kilianvounckx9904
@kilianvounckx9904 11 ай бұрын
@@zipped1214 Since I only learned c++ last year, I was told to always use a std::array, never raw arrays. It will take care of this automatically with RAII
@athuldas44
@athuldas44 Ай бұрын
i have a doubt interpolation is something that runs in a loop but you run it only once here like what this actually gets you anyone
@delqyrus2619
@delqyrus2619 2 ай бұрын
0:43 Because you fade it in and out there is no real visual difference between the two. A sharp edge bewtween them would visually show the difference more.
@SomeGamerDoesGaming
@SomeGamerDoesGaming 11 ай бұрын
🥵🥵🥵
@pshr2447
@pshr2447 6 ай бұрын
Random Gradient function should've been explained in detail, saying that it's out of scope of the video just feels wrong. That part feels like an interesting aspect don't suppose it's out of scope, unless this video is just supposed to explain only the Math and not the code in which case it is incorrectly titled. I'm not a hater.
@Astro_retired
@Astro_retired 4 ай бұрын
It's just a deterministic function to avoid precalculating random vectors. You can easily replace it by creating a two-dimensional array with percalculated vectors and use it instead of calculating those vectors every time. Probably that's the reason why he didn't explain this function, it's not necessarily a part of generating perlin noise.
How to turn a few Numbers into Worlds (Fractal Perlin Noise)
15:24
The Taylor Series
Рет қаралды 187 М.
Programming Perlin-like Noise (C++)
27:54
javidx9
Рет қаралды 103 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 79 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 43 МЛН
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 32 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 59 МЛН
Coding Challenge 11: 3D Terrain Generation with Perlin Noise in Processing
22:44
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 329 М.
Teaching myself C so I can build a particle simulation
11:52
Gradience
Рет қаралды 222 М.
Minecraft terrain generation in a nutshell
25:49
Henrik Kniberg
Рет қаралды 150 М.
Coding Worley Noise
15:40
The Coding Train
Рет қаралды 116 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level Learning
Рет қаралды 548 М.
Value Noise Explained!
16:21
The Art of Code
Рет қаралды 33 М.
Lessons Learned from a Decade of Audio Programming
26:14
I.7 : What is OpenSimplex Noise?
17:46
The Coding Train
Рет қаралды 109 М.
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 79 МЛН