HOW TO GODOT: Infinite procedural terrain generation

preview_player
Показать описание
A tutorial on how to create a procedural random generated terrain using a chunk system in the Godot Engine.

Рекомендации по теме
Комментарии
Автор

Your channel is awesome, I also created an infinite terrain system for Unreal with LOD system and everything, but, Unreal has so many bugs that i decided to drop it and switch to Godot, it's so much more powerful.

WindBendsSteel
Автор

Very interesting that you used "x, z" as a key for the chunks, personally the first time I wrote a voxel engine I used a set of equations to convert a 2d vector into an integer used to represent chunks, it was a real headache to make a system which allowed for convertion between an integer and a 2d vector. In my defense it did save memory by allowing me to use normal arrays instead of dictionaries, which was important since I was developing in WebGL and JavaScript is wayyy slower than traditional languages, but your way is far easier, and I doubt it will have too much impact on performance given this is an engine optimized for these kinds of things. Regardless thank you for the tutorial! It was really helpful for someone like be who's never used Godot before.

deidara_
Автор

Great tutorial! Thanks for making the font bigger and going through each step. This is very helpful to learn. I plan to implement this in gd native and see how much faster it is.

LOD next would be an interesting addition for the next tutorial. It won't matter on low poly, but if you increase the view distance and chunk resolution it would.

TokisanGames
Автор

IMPORTANT: For whatever reason the game might crash when generating the terrain before the water. So in the chunk.gd, in the _ready function, start by calling the generate_water() and then generate_chunk()! If someone knows why this is happening, feel free too comment! :) Thanks @whoknowsyoubetter for pointing that out!

codat
Автор

Thanks for for your tutorial. I helped me getting started with a voxel based terrain generator in Godot + C#

MangoJones
Автор

omg your keyboard sounds amazing, what is it? btw awesome tutorial!

JackieCodes
Автор

Very interested in seeing what Godot is able to do. thanks for being very plain and straightforward.

tranceemerson
Автор

Hi! I have all the code from 18:35 working with no errors but no terrain has generated. any ideas?

dimred
Автор

Thank you for another great tutorial! Exactly what I was after for my current project. I noticed you've not posted anything for a few months so hope you are well!

thelukeaaron
Автор

i just gave you 1000th like under this video :D

rysiekgremory
Автор

Your tutorial is dope :v hope you doing it more

bloglifenguyen
Автор

Planing to use this concept to generate full planets. Similar to the other project you posted, except I'm planning to make them a lot more high-poly with detailed shaders as well as allowing the player to walk on and around them. Should have the base concept handled... more worried about calculating the sky and sunlight settings based on view position / angle lol

MirceaKitsune
Автор

Great Tutorial learned a lot, cheers.

ajomeara
Автор

Great tutorial, will have to check out the last one and see what ya did before.

ungodlyfaded
Автор

"SUBSCRIBE TO HELP ME GET RICH" straight to the point, I like it

hooman
Автор

I liked the tutorial, I followed it exactly and watched it twice, but the terrain never appears. Does anyone have a sample they can share? I must be making some minor logical mistake somewhere!

Theaksten
Автор

Thanks so much for making this! It'd be really useful if you made a tutorial for loading the chunks at different LODs :)

ignacio
Автор

can you link this on github or a personal website repository so we can download these files?

hashkeeper
Автор

I'm uncertain about the safety of this threading approach – it doesn't allow one chunk to start being added while another is still being processed, which is good, but it just drops the attempt instead of queuing it up if one is still in-progress, with an end result that I don't think it can generate more than one chunk per _process call. And looks like it's possible to start adding another chunk after load_chunk has finished, but before load_done has completed, in which case the wait in the load_done from the first chunk would end up waiting for the second call to load_chunk to complete? Not sure of the results, if that happens.

qwertystop
Автор

what if my map is not infinite and I just want to generate all the chunks over time without having to regenerate them? Can I simply add all chunks as children and hide them when far from the player? I'm not worried about memory. I'm only worried that these hidden chunks may still cause some slowdown.

Looki