you might want to look into Simplex noise, this is another gradient noise algorithm designed by Ken Perlin to be less costly when dealing with higher dimensions. when calculating 3d simplex noise, you are sampling 4 points instead of 8 which is what perlin noise does. so it might be beneficial to use if you are planning on calculating multiple noise maps.
Make sure the trees still reveal the terrain. plus, spaced out trees make survival more challenging. also when you get down to smooth shading, make it 16x16 or whatever your texture is so every "pixel" on cubes is shaded slightly different.
I'am just going to put it there in the comments. Some things you could add: dynamic music. biome specific music. community made music. chunk hierarchy(chunks in chunks). Lod. Biome ore variants. Noise textures for different biome characteristics(temperature, humidity,foliage amount.)
As someone that has explored caves irl, the 08:38 cave entrance is FANTASTIC, I really fell from the sky on this video so I know nothing about Daydream, but it would be awesome to have some sort of "god rays", or just better lightning with some really dark shadows, caves would look awesome!!
Oh yes! I want to go real hard on the lighting at some point: god rays, ray tracing, the works. It's something of a nerdy obsession with myself, and I've had to actively try not to make this whole project only about computer graphics :)
About music. I trully believe that there are better ways to compose music for games than Minecraft's. One of my favourite examples is RainWorld, with it's dynamic layered music composition. In short, you have a calm and simple background music, but things like the sun setting or entering a cave(which can be just a depth check), or be under water can change the base track (so the base is spatially and temporally situational). Then on top of the base track, things like the amount of enemies, entering combat, etc add layers of sound on top of that. All simple layers, but with a certain mood to them. There can be layers that just grow louder, like the combat music with the amount of enemies (so a 1v1 has mild music, but figting a horde has more intensity). There can be layers that just shift or randomize the pitch, like being under water, or just a base layer to randomize everything to avoid monotony. Tho I understand why this is not done by most games, it's difficult to pull off well, and implementing sound synthesis of this level requires really good performance that a generic sound mixer won't be able to do on a real time game. But.... If you're going to have procedurally "infinite" worlds, why not also have procedurally "infinite" music? Just my thoughts tho, great video as always
Not planning to do a full dynamic music engine but absolutely looking to tailor music choices situationally. Broadly though I'm looking to place more emphasis on ambience and soundscapes over full on music though.
As you approach terrain generation, it got me thinking about one thing in Minecraft terrain generation that I find very disappointing: the perfectly level water level across the world. Every ocean, lake, and river is at exactly the same level, meaning there are no mountain lakes and rivers. Consistent sea level makes sense, but having rivers that can go up in elevation as you move away from sea level and lakes that naturally fill small depressions in terrain would be amazing, but probably too computationally expensive, so just having mountain lakes would be a good start.
You didn't go into too much detail about the upsampling, but it sounds and looks like it's pretty naive. You can improve the quality and cost at once (assuming you aren't doing something like this already) by using a binary search along the height axis for each column to find the region where density values approach the threshold and place more samples there
I really wish there was a repo for all of this information, I'm working on my own voxel game / thing in wgpu and i would pay money to see real code examples. Keep up the great work your content is really informative and helpful!
Total coincidence! It's actually the first seed I entered many months ago when I was just starting to implement the generator, and it just so happened to develop into a really cool little coastline.
I can appreciate the staging approach where adjacent chunks can only see the state of a previous stage instead of the current one. I also recognise that having two chunks regenrate common features isn't the worst outcome in terms of compute. The cases where it doubles the compute (two chunks generate the same tree) are less frequent than the cases where thread A blocks thread B because it's waiting on memory. However, maybe you could try something similar to the engine from Noita? Basically if you stage your chunk generation so that you do, even, odd, even, odd in each axis you can actually have multithreaded chunk generation with reduced blocking. I'm very curious to see how you go about implementing structures (if you're planning to). I'd love to see an in depth exploration into minecraft structure generation because of the way they do blueprint/structure files with extra jigsaw metadata of connection A can connect to connection B etc.
I did consider generating dual chunks but for simplicity I haven't done that yet. If performance concerns call for faster code then it'd for sure be one of the first things I explore though! No planned large-scale structures, but generally these are generated with a very similar approach anyhow - they're generated by querying which parts of the structure intersect a chunk, and running the generation logic for those parts.
I thought you were playing minecraft music until you said otherwise. Great job! Really interesting to think about how more work of gather actually outperforms the lesser work of scatter due to calculations being completely dependent and fully parallelizable (and duplicate calculations just come from the cache). I'm not building a voxel game but loved all the info!
So, the grid-based visibility algorithm in the previous video didn't work in the end? By the way, the new soundtrack is pretty good. I think it fits really well with the vision you have for the game. I also have another question: What are your plans regarding the game’s release? Are you considering releasing an alpha version at some point, or do you intend to wait until the game is fully finished?
I just haven't explored it yet, but in theory it would still work. Mostly I focus on improving just one part of the engine at a time right now :) I don't have any concrete release plans atm, just building things out as a hobby right now and enjoying the scenic route. Once there's enough basic features around, perhaps I'd start offering access as a Patreon perk (if I decide to do Patreon!). I'd save something like steam early access for when the game would be more feature complete since I'd want the steam listing to be properly representative of the game.
Very interesting video, the caves look fascinating. I don’t think it’s a good idea to make all beaches sandy though. There are plenty earthy, dirty/grassy and rocky beaches near different sized rivers, lakes and seas. I think it’s more realistic to have more variety in this aspect
I do have alternate blocks in the engine like gravel but for now I'm sticking to some basics. I plan to introduce more variation down the line for sure! My main motive going into this was to build enough scaffolding to start thinking about gameplay. Most of the visual touches I added were probably not necessary at this stage but they were easy and quick to implement, so I figured I'd play with them a bit :) Longterm I definitely want more variation than what you see here
I don't have a central archive or blog, but I do talk about it in some earlier videos in the series! ua-cam.com/video/fqRhZawXv6o/v-deo.html&pp=gAQBiAQB
Have you thought about possibly implementing LoD (along the lines of distant horizons mod in minecraft) to allow for panoramic vistas? Or would this be beyond the scope of your engine
I have a question : would it be posible to generate realistic-ish rivers (down flawing merging and not flat and ocean connecting like in minecraft) without losing too much process power ? Also it would be really cool to have lakes at different altitude and stuff ! I feel minecraft really misses that so a game that would would be good in my book !
I would prefer to have biomes naturally emerge from more flexible systems. I don't particularly fancy the idea of hardcoding which things are allowed to go together, because it would reduce the number of surprising combinations!
@@dphfoxI can already imagine instead of finding a THE designated birch forest biome, you find the intersection of birch tree growth with jagged terrain generation in a foggier region, or something like that
@@dphfoxI agree, I think large scale structures like biomes will emerge naturally when you designed the correct local rules, such as if you have implemented temperature then snow will naturally appear where it is cold, but such rules are not easy to find. I wonder how you would go about finding them. The rules may also become so convoluted and difficult to solve that in the end you might as well manually create each biome and also every single transition between them.
I like this, but I would prefer you add some example diagrams when explaining concepts, as I have a hard time listening to your explanation by just looking at your hands
I don't see why you need all that fancy logic for trees. Trees should be treated like any other structure, you have some padding of loaded chunks around the rendered area, and you only generate structures on them when they are surrounded on all sides by unrendered chunks. Yes, it means you need to load in more chunks than what the player can see, but this becomes inevitable when you start generating big structures that span multiple chunks, like villages. Or so I think, anyway. Also seems faster and simpler. Great video.
Chunks don't have write access to nearby chunks for thread safety reasons so that isn't possible - also the approach doesn't scale for larger structures like villages, so those are also generated chunk wise in games like Minecraft. The approach of scatter-as-gather I presented was the only way I could find to make cross-chunk generations work correctly without locking on shared mutable memory.
@@dphfox Ah, I see, you're generating your chunks across multiple threads? That seems unnecessary to me, once the starting area loads in, you're only loading in a small amount of chunks on any given frame as the player moves around and loads/unloads chunks around them. I would just have one dedicated thread for that. Then you don't have to do all that other bs lol if a chunk is unrendered, you know it's only being accessed by the chunk loading thread anyway.
haha I am very aware that this is pretty trendy to do on UA-cam these days! Been trying to pursue this idea for over a decade at this point since I was much younger and noobier, so I'm in no rush, but it's something of an aspirational goal to achieve properly.
you might want to look into Simplex noise, this is another gradient noise algorithm designed by Ken Perlin to be less costly when dealing with higher dimensions. when calculating 3d simplex noise, you are sampling 4 points instead of 8 which is what perlin noise does. so it might be beneficial to use if you are planning on calculating multiple noise maps.
Make sure the trees still reveal the terrain.
plus, spaced out trees make survival more challenging.
also when you get down to smooth shading, make it 16x16 or whatever your texture is so every "pixel" on cubes is shaded slightly different.
Well edited and informative video! That terrain generator is certainly better than mine lol
Thanks! I've been enjoying following your voxel work, btw - really cool job with the ray traced lighting work :)
I'am just going to put it there in the comments.
Some things you could add:
dynamic music.
biome specific music.
community made music.
chunk hierarchy(chunks in chunks).
Lod.
Biome ore variants.
Noise textures for different biome characteristics(temperature, humidity,foliage amount.)
I plan to do one or two of these things already! Thanks for the suggestions.
the voronai based caves is my favorite thing, they look awesome
Same here! They're a lot of fun to explore even with no other gameplay being implemented yet. And they generate pretty fast too :)
As someone that has explored caves irl, the 08:38 cave entrance is FANTASTIC, I really fell from the sky on this video so I know nothing about Daydream, but it would be awesome to have some sort of "god rays", or just better lightning with some really dark shadows, caves would look awesome!!
Oh yes! I want to go real hard on the lighting at some point: god rays, ray tracing, the works. It's something of a nerdy obsession with myself, and I've had to actively try not to make this whole project only about computer graphics :)
@@dphfox That's incredible to hear!! I'll definitely keep watching this devlog series. Hyped :)
About music. I trully believe that there are better ways to compose music for games than Minecraft's.
One of my favourite examples is RainWorld, with it's dynamic layered music composition.
In short, you have a calm and simple background music, but things like the sun setting or entering a cave(which can be just a depth check), or be under water can change the base track (so the base is spatially and temporally situational).
Then on top of the base track, things like the amount of enemies, entering combat, etc add layers of sound on top of that.
All simple layers, but with a certain mood to them. There can be layers that just grow louder, like the combat music with the amount of enemies (so a 1v1 has mild music, but figting a horde has more intensity). There can be layers that just shift or randomize the pitch, like being under water, or just a base layer to randomize everything to avoid monotony.
Tho I understand why this is not done by most games, it's difficult to pull off well, and implementing sound synthesis of this level requires really good performance that a generic sound mixer won't be able to do on a real time game.
But.... If you're going to have procedurally "infinite" worlds, why not also have procedurally "infinite" music?
Just my thoughts tho, great video as always
Not planning to do a full dynamic music engine but absolutely looking to tailor music choices situationally. Broadly though I'm looking to place more emphasis on ambience and soundscapes over full on music though.
10/10, this is such a fun development process to watch
As you approach terrain generation, it got me thinking about one thing in Minecraft terrain generation that I find very disappointing: the perfectly level water level across the world. Every ocean, lake, and river is at exactly the same level, meaning there are no mountain lakes and rivers. Consistent sea level makes sense, but having rivers that can go up in elevation as you move away from sea level and lakes that naturally fill small depressions in terrain would be amazing, but probably too computationally expensive, so just having mountain lakes would be a good start.
I'll think on it and see if there's some computationally cheap way I can introduce more varied water levels :)
I would love to see this with insanely big terrain gen and far render distances.
Honestly been watching ur work for abit now, i gotta say ur a good looking and smart man ❤
You didn't go into too much detail about the upsampling, but it sounds and looks like it's pretty naive. You can improve the quality and cost at once (assuming you aren't doing something like this already) by using a binary search along the height axis for each column to find the region where density values approach the threshold and place more samples there
I really wish there was a repo for all of this information, I'm working on my own voxel game / thing in wgpu and i would pay money to see real code examples. Keep up the great work your content is really informative and helpful!
10:07 No way. It looks like the logo of the minecraft resource pack 0_0
Total coincidence! It's actually the first seed I entered many months ago when I was just starting to implement the generator, and it just so happened to develop into a really cool little coastline.
I can appreciate the staging approach where adjacent chunks can only see the state of a previous stage instead of the current one. I also recognise that having two chunks regenrate common features isn't the worst outcome in terms of compute. The cases where it doubles the compute (two chunks generate the same tree) are less frequent than the cases where thread A blocks thread B because it's waiting on memory. However, maybe you could try something similar to the engine from Noita? Basically if you stage your chunk generation so that you do, even, odd, even, odd in each axis you can actually have multithreaded chunk generation with reduced blocking.
I'm very curious to see how you go about implementing structures (if you're planning to). I'd love to see an in depth exploration into minecraft structure generation because of the way they do blueprint/structure files with extra jigsaw metadata of connection A can connect to connection B etc.
I did consider generating dual chunks but for simplicity I haven't done that yet. If performance concerns call for faster code then it'd for sure be one of the first things I explore though!
No planned large-scale structures, but generally these are generated with a very similar approach anyhow - they're generated by querying which parts of the structure intersect a chunk, and running the generation logic for those parts.
I thought you were playing minecraft music until you said otherwise. Great job! Really interesting to think about how more work of gather actually outperforms the lesser work of scatter due to calculations being completely dependent and fully parallelizable (and duplicate calculations just come from the cache). I'm not building a voxel game but loved all the info!
Love this. This tricky logic and math in game development always fascinates me, all this text and code, converted into worlds.
This was super interesting to watch. Very cool!
So, the grid-based visibility algorithm in the previous video didn't work in the end?
By the way, the new soundtrack is pretty good. I think it fits really well with the vision you have for the game.
I also have another question: What are your plans regarding the game’s release? Are you considering releasing an alpha version at some point, or do you intend to wait until the game is fully finished?
I just haven't explored it yet, but in theory it would still work. Mostly I focus on improving just one part of the engine at a time right now :)
I don't have any concrete release plans atm, just building things out as a hobby right now and enjoying the scenic route. Once there's enough basic features around, perhaps I'd start offering access as a Patreon perk (if I decide to do Patreon!). I'd save something like steam early access for when the game would be more feature complete since I'd want the steam listing to be properly representative of the game.
love your voice + the background music
Very interesting video, the caves look fascinating.
I don’t think it’s a good idea to make all beaches sandy though. There are plenty earthy, dirty/grassy and rocky beaches near different sized rivers, lakes and seas. I think it’s more realistic to have more variety in this aspect
I do have alternate blocks in the engine like gravel but for now I'm sticking to some basics. I plan to introduce more variation down the line for sure!
My main motive going into this was to build enough scaffolding to start thinking about gameplay. Most of the visual touches I added were probably not necessary at this stage but they were easy and quick to implement, so I figured I'd play with them a bit :)
Longterm I definitely want more variation than what you see here
This is such a good video. I love how you break down these concepts!
Thank you!
Where can we read more about what your game will be?
I don't have a central archive or blog, but I do talk about it in some earlier videos in the series! ua-cam.com/video/fqRhZawXv6o/v-deo.html&pp=gAQBiAQB
Have you thought about possibly implementing LoD (along the lines of distant horizons mod in minecraft) to allow for panoramic vistas? Or would this be beyond the scope of your engine
@@adrilazzaro I've idly considered it but don't consider it to be essential at the moment, so maybe it's something I'll consider at a later date.
I have a question : would it be posible to generate realistic-ish rivers (down flawing merging and not flat and ocean connecting like in minecraft) without losing too much process power ? Also it would be really cool to have lakes at different altitude and stuff ! I feel minecraft really misses that so a game that would would be good in my book !
I'm not sure but I'll think on it a bit!
idk if your aware but there seems to be alot of bugs with VOLUMIKA due to roblox updates will the plugin be fixed?
I'm tracking some rendering issues but many of them aren't in my control, you'll have to follow up with Roblox rather than myself.
hold my beer
will there be biomes?
I would prefer to have biomes naturally emerge from more flexible systems. I don't particularly fancy the idea of hardcoding which things are allowed to go together, because it would reduce the number of surprising combinations!
@@dphfoxI can already imagine instead of finding a THE designated birch forest biome, you find the intersection of birch tree growth with jagged terrain generation in a foggier region, or something like that
@@dphfoxI agree, I think large scale structures like biomes will emerge naturally when you designed the correct local rules, such as if you have implemented temperature then snow will naturally appear where it is cold, but such rules are not easy to find. I wonder how you would go about finding them. The rules may also become so convoluted and difficult to solve that in the end you might as well manually create each biome and also every single transition between them.
I see Rust.
New sub!
are the chunks 3D or 2D?
3D 16x16x16 chunks, no height limit :)
@@dphfox perfect
POWERRRR . SWAGGGGG . THE SWAG OF POWERRRR
I like this, but I would prefer you add some example diagrams when explaining concepts, as I have a hard time listening to your explanation by just looking at your hands
Noted, will make sure to include more visuals in the future!
What was that curve tool at 5:00?
desmos
GeoGebra is very similar too
I don't see why you need all that fancy logic for trees. Trees should be treated like any other structure, you have some padding of loaded chunks around the rendered area, and you only generate structures on them when they are surrounded on all sides by unrendered chunks. Yes, it means you need to load in more chunks than what the player can see, but this becomes inevitable when you start generating big structures that span multiple chunks, like villages. Or so I think, anyway. Also seems faster and simpler. Great video.
Chunks don't have write access to nearby chunks for thread safety reasons so that isn't possible - also the approach doesn't scale for larger structures like villages, so those are also generated chunk wise in games like Minecraft. The approach of scatter-as-gather I presented was the only way I could find to make cross-chunk generations work correctly without locking on shared mutable memory.
@@dphfox Ah, I see, you're generating your chunks across multiple threads? That seems unnecessary to me, once the starting area loads in, you're only loading in a small amount of chunks on any given frame as the player moves around and loads/unloads chunks around them. I would just have one dedicated thread for that. Then you don't have to do all that other bs lol if a chunk is unrendered, you know it's only being accessed by the chunk loading thread anyway.
Make That A Minecraft Mod
yesssssss, finally
But... I don't have a terrain generator
Someone give this masterclass programmer a 250K+ yearly salary | 1 question, how did you manage/get into roblox?
I did the standard set of interviews and they thought I was a good enough fit to extend an offer :)
damn unc
Just saying: if you stop here -- you will be like any other minecfat clone youtuber
haha I am very aware that this is pretty trendy to do on UA-cam these days! Been trying to pursue this idea for over a decade at this point since I was much younger and noobier, so I'm in no rush, but it's something of an aspirational goal to achieve properly.
@dphfox i meant more of "dont stop here" but okay