3D World Generation: #3 (Quadtree & LOD)

preview_player
Показать описание
3D World Generation: #3 (Quadtree & LOD)

This is the third in a series of 3d world generation tutorials, covering my quadtree implementation, terrain level-of-detail, and leading to infinite procedural terrain.

What's covered:
* What are Quadtrees
Go over my quadtree implementation and how I ended up using it for LOD (level-of-detail) on the terrain.

* Optimizations
Some optimizations I threw at the implementation to reduce the framerate drops when generating the terrain.

In the future:
This is intended to be part 3 in a series of tutorials on the topic of 3d world generation. Planning on making this a planetary scale thing in a coming tutorial, so look out for that.

Full source code for the project is available, so if you're interested in fiddling with the code, screwing around with it, or improving it.

Clip Credits:

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

One possibility is to check the camera distance from the origin, when it reachs a threshold, move it back to the origin and update the chunks heightmap, so you fake movement and also you need to move the placements. But this way you deal with the problem of precision of the position, when you use the usual 32 bit floats, avoiding other problems when you reach huge numbers.

Lycam
Автор

Thank you for these tutorials!!! I hope you never stop

kanpekiken
Автор

Wow, your tutorials are so awesome. Very informative, concept are very well explained. Instant subscribe

yukipuki
Автор

im working on a very different project and needed to understand quad trees and how to approach it. This vid was soo helpful thanks!

isaackershnerART
Автор

It would be awesome if you could explain 3d Gaussian splatting.
I'm struggling and your videos make things so clear.

omgnowairly
Автор

Amazing video, didnt even know Javascript was this powerful

coloneljcd
Автор

This is exactly what I need for my current project. Thank you for sharing!

lukeaaron
Автор

haha nice, i know quadtree but i didnt know where to start if you have no objects (of course except the camera which i know from you now and is on rethinking realy logical x)

svens
Автор

How this quadtree would be combined with a tesselation shader? I've got rendered 64 * 64 quad instances and tessellated them in a shader that when the plane is closer to the camera its inner and outer level increases. Although it works, the world is still quite small and I've no idea if I need to extend my shader code or do some stuff on a cpu side. I've found your videos incredibly interesting, but also I'd love to learn more about tesselation shaders and I cannot find any articles that described this topic as if I were an idiot :( and I don't quite understand them.

scshout
Автор

if it generates a noise for a plane with a certain number of segments, how do these vertices join the vertices of the planes adjacent to it?

diegomacias
Автор

Hi, did you try webworkers for the terrain builder? Maybe it wouldn't fit your need, but instead of spreading the generation in the UI thread, i could allow to process it in an independent thread without freezing the UI. Or maybe I'm totally wrong :-)
Anyway, I'm a huge (huge!!) fan of all your video and the way you present them. Thanks for sharing them!

tcharlyy
Автор

Hi Simon, thanks for the videos. This content is really helpful and unique.
I wanted to know that if you recreate QuadTree every frame? If yes, wouldnt that be too slow?

greatbanni
Автор

Hey I want to draw a line between 2 points in terrain does not attach with terrain ..how to solve this ??can u plz help ..

akashmishra
Автор

I gave it a try to the github repo and I happily fined out that it is possible use the mouse to rotate infinitely the camera when the cursor is hidden

GarronArgentina
Автор

Great video!
I wonder which algorithm are you using for the water?

AmazingMaxStuff
Автор

do you keep the textures resolution high between different size nodes?
because it looks funky when texture resolution changes if it has less reference points
i mean the resolution of moisture texture
i wanted to access those also on CPU so i can do gameplay stuff based on those too

nomadshiba
Автор

Do you, in general, de-quad areas when they are not close anymore? Is that what you did with the pool?

Also, I saw an inmplementation, where the quad remaind the same, and only the noise moved “through” the mesh, when the player was moving.
Worked great for an infinite plain, but wouldn’t work for interplanetary rendering I guess.

frddyfrsh
Автор

How did you manage to get the chunks match with each other if the algorithm is random

alonsovalls
Автор

how did you stitch the lod difference between neighboring chunk?

glowiever
Автор

I see in the wireframe that smaller chunks are not being stitched together with bigger neighbor chunks. Wouldn't this normally create cracks since the smaller chunks have extra vertices on the edges that wont match up correctly with the edges that have less vertices.

Btw, src isnt up on github.

SketchpunkLabs