Procedural Generation Tutorial 1 - Planes

  Рет қаралды 9,730

Victor Gordan

Victor Gordan

Күн бұрын

In this tutorial I'll show you how to procedurally generate the vertices and indices of a plane both on the CPU and GPU.
Links for Compute Shaders
• Modern OpenGL Tutorial...
Discord Server
/ discord
Patreon
/ victorgordan
Timestamps
0:00 Intro
0:10 Simple Plane
1:03 Plane Indices
1:45 Line Generation
2:25 Complex Plane
3:10 Plane Attributes
3:38 GPU Generation
3:53 Outro
#proceduralgeneration #procedural #programming

Пікірлер: 44
@nix3l_
@nix3l_ 2 жыл бұрын
I love how you explain things in a concise and clear manner. Love the tutorial, i was actually looking for exactly this lol
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you for the compliment :) I'm glad you enjoyed it!
@albertkoppelmaa7178
@albertkoppelmaa7178 2 жыл бұрын
Amazing tutorial, keep going like this! Can't wait for future episodes !
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you, good to hear you're looking forward to new episodes :)
@fudgeracoon2529
@fudgeracoon2529 2 жыл бұрын
Finally, been waiting for this series forever. Might we get a hint what the next episode will be about ?
@VictorGordan
@VictorGordan 2 жыл бұрын
Most likely spheres, but who knows, might be about noise as well
@yoyo12345
@yoyo12345 2 жыл бұрын
Just learned how to render a triangle, and this sounds terrifying
@VictorGordan
@VictorGordan 2 жыл бұрын
It's not that hard haha, just read the code carefully and try to understand it ;)
@veritas7661
@veritas7661 2 жыл бұрын
Hey man, thanks soo much for your videos! I’m starting my own open gl engine, and it helped a lot, even though I think you should make your videos explanations “slower”, any way, keep up with good content!
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you! If you wanna share stuff related to your engine you can join my Discord channel :)
@starklosch
@starklosch 2 жыл бұрын
1:24 that reminds me the Seb Lague's chess video xd. Btw nice video.
@VictorGordan
@VictorGordan 2 жыл бұрын
His content is awesome! He partially inspired me to make a YT channel haha
@Y.Albasel
@Y.Albasel 4 ай бұрын
will you please continue this series
@truongannguyen4142
@truongannguyen4142 2 жыл бұрын
Your animation is so good
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you! I try haha
@SpaceCadet5100
@SpaceCadet5100 Жыл бұрын
Nice video! Could you maybe boost the midrange on your mic in the fallowing vid?
@VictorGordan
@VictorGordan Жыл бұрын
I'm not that good with audio. What exactly sounds wrong?
@austineadah2843
@austineadah2843 2 жыл бұрын
Nice tutorials. Please could you recommend any good books on these shaders type and examples? Thanks in advance
@VictorGordan
@VictorGordan 2 жыл бұрын
I never read any procedural generation books, so I can't help you with that. If by "these shaders" you mean Compute Shaders, then I also have a tutorial on those ;)
@austineadah2843
@austineadah2843 2 жыл бұрын
@@VictorGordan thanks alot.I'm coming from a python background and I don't don't any background with openGl.wiling to learn and was thinking if there were some book that explains the different types of shaders regarding modern opengl
@VictorGordan
@VictorGordan 2 жыл бұрын
I explain all main shader types (vertex, fragment, geometry, tessellation, and compute) in my tutorials ;)
@CodeParticles
@CodeParticles 2 жыл бұрын
This is terrific! Couldn't you also use a black and white heightmap and use that value to calculate the y axis for the plane to generate a terrain this way? And you would increase the triangular mesh for more resolution thats what I did! =)
@VictorGordan
@VictorGordan 2 жыл бұрын
Heightmaps will get a whole video dedicated to them :)
@MrHuman-iy5lw
@MrHuman-iy5lw 2 жыл бұрын
It was great tutorial
@VictorGordan
@VictorGordan 2 жыл бұрын
Thx! :)
@giannism3114
@giannism3114 2 жыл бұрын
awesome
@VictorGordan
@VictorGordan 2 жыл бұрын
No, you're awesome 👉😎👉
@michterion
@michterion 2 жыл бұрын
hi can you make video about making simple shader for minecraft ?
@VictorGordan
@VictorGordan 2 жыл бұрын
Hmmm, it's very unlikely that I will, but who knows, I might....
@raghavkumar2867
@raghavkumar2867 2 жыл бұрын
Why did you use 48 as the number of bytes per vertex in the glNamedBufferData call when each vertex is 80 bytes?
@VictorGordan
@VictorGordan 2 жыл бұрын
Ooops, mistake on my part. When I took the screenshot of the CPU side I was taking just pos, normal, uv, and padding ((4 + 4 + 2 + 2) ×4 =48) 😅
@fatgolem69
@fatgolem69 2 жыл бұрын
Please create a tutorial on loading cubemaps from a single image file or sprite sheet as in a big project there can be more than 32 textures(the max textures that can be binded at once in opengl)
@VictorGordan
@VictorGordan 2 жыл бұрын
I might make something like that at some point, but it's not a priority right now. If you want help with that, some ppl on my Discord channel might be able to help :)
@fatgolem69
@fatgolem69 2 жыл бұрын
@@VictorGordan Okay, no problem
@samholland209
@samholland209 Ай бұрын
You forgot the semicolons in the code.
@raghavkumar2867
@raghavkumar2867 2 жыл бұрын
Can you please shar ethe code
@VictorGordan
@VictorGordan 2 жыл бұрын
It's super messy, and I'm not sure if I even have it anymore. All the important code is in the video though
@vanessaleonard709
@vanessaleonard709 2 жыл бұрын
pr໐๓໐Ş๓ 😴
@TristanPopken
@TristanPopken 2 жыл бұрын
I saw that you used a struct of vertices and a buffer which you edit. But how do you set this up on the cpu side? Is it something with ssbo's or is it something else?
@VictorGordan
@VictorGordan 2 жыл бұрын
Yes. I show in the video that I create a VBO and an EBO which I link as usual to thr VAO except I don't plug in any data into them (I do set their sizes tho). I can then send the VBO and EBO as SSBOs to the compute shader to edit them. What's rly cool is that I don't need to transfer any vertices from the CPU to thr GPU since I can generate all of them on the GPU. Hope that clears things up! :)
@TristanPopken
@TristanPopken 2 жыл бұрын
​@@VictorGordan Ah, I see one last question, When returning the data back to the CPU, what is the layout of the data in the vbo? Will it be something like pos1, norm1, tan1, pos2, norm2, tan2 where it repeats itself? Or does it return the array differently?
@VictorGordan
@VictorGordan 2 жыл бұрын
I don't return the data to the CPU since I don't need it on the CPU. But yeah, the data is stored in the format you mentioned :)
@TristanPopken
@TristanPopken 2 жыл бұрын
@@VictorGordan Tysm!
Computer Graphics Tutorial - PBR (Physically Based Rendering)
13:40
Victor Gordan
Рет қаралды 30 М.
Cellular Automata | Procedural Generation | Game Development Tutorial
15:22
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Рет қаралды 123 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 9 МЛН
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 93 МЛН
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 903 М.
Modern OpenGL Tutorial - Tessellation Shaders
7:59
Victor Gordan
Рет қаралды 17 М.
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 555 М.
Practical Procedural Generation for Everyone
31:30
GDC
Рет қаралды 408 М.
Designing a Physics Engine in 5 minutes
7:37
Winterdev
Рет қаралды 147 М.
Procedural Generation Tutorial 0 - Introduction
8:42
Victor Gordan
Рет қаралды 6 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН