Comments (10)
Yeah, the blend is very difficult. I remember once (like maybe a year ago) trying a climate based biome system, where the inputs are 2 noise maps, one for precipitation and one for temperature. Here's picture of what I mean:
In that experiment, I think I could generate the biomes nicely, but blending the heights was the biggest problem which I never managed to solve.
from marching-cubes-terrain.
That looks really nice! What if you blend the biomes map like this? Each biome has its own noise so once the map is blended so as the noise maps. Would that be possible?
This is a bit ugly example, but does this even make sense? In my head this sounds logical yet I have no idea how to accomplish this.. :D
from marching-cubes-terrain.
Biomes map would almost act like a mask for noise maps, if the biomes map is 'blurred' you would get a smooth transition
from marching-cubes-terrain.
I looked for the repository about the climate based biomes (like in the diagram in the previous comment) and found it! I made a few changes to fix the blending, and made the repository public. Here it is: https://github.com/Eldemarkki/TerrainBiomeGenerator.
This is what it looks like with blending=0:
It's not perfect, the colours are quite sharp looking at some places, and it is not very realistic as there are multiple places where it goes from desert to tundra, but that can be tweaked quite easily.
And in case it wasn't obvious, that is not using marching cubes.
The blending is done by just taking the average height around the sampling point. The transition from any biome to ocean is not blended, because I don't want the ocean to suddenly go upwards near the transition.
from marching-cubes-terrain.
I'm not really sure. If I end up implementing it, it most likely will not be in the main repository, but in the TerrainBiomeGenerator repository.
from marching-cubes-terrain.
This solution that I quickly thought up of would only work with 2 biomes, but maybe someone smarter than me knows how to extend it to more than 2. I haven't spent much time on this.
First, create 2 noise functions; 1 for biome A called GetA(x, z)
, and one for biome B called GetB(x, z)
. Those functions would generate the height for the biomes. So GetA()
could for example be an infinite plains biome, and GetB()
and infinite mountains biome.
Then, have a third noise function representing the blend. For any given point (x, z), the height of point (x, z) would be y = Lerp(GetA(x, z), GetB(x, z), GetBlend(x, z))
. GetA()
and GetB()
representing the noise functions of A and B. GetBlend()
would tell how much to blend the biomes: 0 would be completely biome A, and 1 would be completely biome B.
I would rather do something like this, than a height-based biome, as height-based gives rings of biomes and I don't really like the look of that
from marching-cubes-terrain.
Thanks for the tip! This sounds like a good solution. For multiple biomes I was thinking would it be possible to generate a biomes map, something like this maybe.
Each biome has its own color, so with a map like this it would be easy to determine where each biome is located. One issue is blending biomes together. Maybe even make biomes bleed into each other, so it would give more realistic results. I'm not smart enough to figure this out tho..
from marching-cubes-terrain.
I think that's a great idea! I'll post something here if I manage to think of some implementation. It's definitely a hard problem.
from marching-cubes-terrain.
Awesome thank you! 🙂 Been scratching my head for hours, it's quite a task.. A bit too much for my brain too handle 😄
from marching-cubes-terrain.
Really nice! This works pretty well! Will you be implementing this approach to Marching-Cubes-Terrain project as well? 🙂
from marching-cubes-terrain.
Related Issues (20)
- Project Structure HOT 3
- Generate chunks around the player in a circular shape
- Implement unit tests for the project
- Be able to give a random seed to the procedural density generator
- When you repeatedly add and remove densities from the same position, it leaves floating parts
- Increase Procedural Terrain Generation Performance HOT 3
- Have an ability to generate procedural cave systems with 3D noise
- If you modify the edge of the chuck the side chunk that will be generated will not connect HOT 5
- Convert this project into a Unity Package Manager package HOT 3
- Ability to procedurally generate terrain using 3D noise HOT 5
- Unable to deform certain chunks HOT 8
- Create an IncrementVoxelData function to VoxelDataStore
- Player far from origin jitter issue HOT 2
- When reloading a chunk changes made to terrain using left click and right click are overwritten HOT 1
- generate assets with mesh HOT 1
- Detect floating islands feature request
- A debugging panel
- Include NativeArray in custom VoxelDataGenerator HOT 1
- Memory is never freed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marching-cubes-terrain.