Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    31
  • comments
    55
  • views
    46947

Adding Biomes and Rivers

Sign in to follow this  
CC Ricers

3084 views

This week I have been working on adding more natural features- rivers and biomes (or at least the start of it). As part of making the world more varied and less same-y, I decided it's a good time to add bodies of water! I thought about oceans but I wasn't sure yet on how to modify the height on a large scale. I want to support negative height values for underwater oceans but the voxel engine doesn't support it yet.

So I went with rivers. I took the simple way out for this and used the same noise functions I've been using for everything else. Eventually I settled on a stripped down version of the pattern used for the big mountains so that rivers naturally travel in the valleys and creases between them.

20150119-landscape4.jpg

There is also a bit of erosion added, which is more visible in the flatter, lower areas. Noise values are converted to absolute values (all negatives become flipped) so areas near 0 are lowered in height and the closest to 0 areas are where the rivers are made.

20150117-river.jpg


(The more eagle-eyed lot might notice some faint grid lines running along the mountains- this is a visual bug related to raycasting unable to access voxel info from adjacent chunks. This would be fixed eventually.)

I want to fix this also for steeper areas because the water looks a bit odd taking on the shape of the mountains. But it's a good start. The rivers tend to travel more in the flatter areas, because I put a hard cap on height on where they begin.

And then come biomes. These depend on a set of variables also provided by, yep, noise functions. A set of Simplex noise patterns with very low frequencies have subtle changes on the local scale (from the player's point of view) but are very apparent across the entire world. They're essentially the same patterns that made the world maps in this previous post. And so they will affect other things such as humidity and temperature. Biomes affect the color of Surface blocks and eventually, vegetation, enemy types and materials scattered around.

My approach to biomes will not be to use different classes for different biomes, or even divide the world up into discrete regions. Instead the regions will be formed implicitly by the noise patterns. I will go in detail more as I flesh out the biome system later. Here is an example of a desert biome.

20150120-desertbiome3.jpg

For now, I just hardcoded the terrain to show the desert biome using the desert surface colors. What I really wanted to show here is how rivers change the humidity on a very local level. If we look at the other side of the peak we can see some sort of an oasis.

20150120-desertbiome5.jpg

Humidity in this case can also mean the moisture level in the ground. Areas are grassy around rivers, even in the desert. With smart object placement, there will also be shrubs and trees in these areas.

20150120-desertbiome4b.jpg

That's all for now. I want to get the biome rules more defined in order to make the biomes transition well over different parts of the world.
Sign in to follow this  


8 Comments


Recommended Comments

Thanks, and it is fun to wander around to see what's there, even if that's the only thing you can do right now.

 

Your trees are spawning in the rivers.

 

Yeah, right now the function to add trees doesn't take into account whether the surface is solid ground or water. Eventually it will be replaced by a better, more generalized function that takes tuple parameters to indicate what kind of object it should make, where and its chances of appearance. 

Share this comment


Link to comment

Excellent,

  what functions do you use for trees generator ?

 

I use functions that test which voxels lie inside 3D shapes. Cylinder shape for the trunk, (additional voxels for the base), and a group of ellipsoids for the leaves.

Share this comment


Link to comment

 

Excellent,

  what functions do you use for trees generator ?

 

I use functions that test which voxels lie inside 3D shapes. Cylinder shape for the trunk, (additional voxels for the base), and a group of ellipsoids for the leaves.

 

Thank you, I work on a voxel game too.

Look at my blog http://procfxgen.wordpress.com/

For trees I used LSystem. Your solution is certainly faster...

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!