-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion for procedural generation #20
Comments
Hi there, thanks for your question. Soillib doesn't technically do a "shallow water equations" simulation, meaning it doesn't explicitly model the "height" of the river - just the total discharge. Additionally, it doesn't actually compute "river paths" - just a field with discharge rates and directions, which can be visualized as rivers by just visualizing the amount of water. I suppose that you already have a height-map? Is it a strict requirement that this runs in C++? I have ported the library mostly over to python in the most recent version, so it should be easier to just use in that sense. The question is also whether you want to allow soillib to erode some of your terrain to make the paths more realistic, or if the shape of the height map should be perfectly fixed. That will change the approach. A possible approach for you to take would be as follows:
Would this work for you? This would be relatively easy to implement in python. I will make an effort to add more examples soon that show how to use it for these use cases! |
Hi, thanks for your response and your interest in my current challenge 🙌
I think you're approach is looking good, I would add some consideration:
I dont know if this is something that could be made generic, I've seen quite some blogs/topics on river generation and it looks to be something not trivial (compare to mixing some noises 😅). In the end if your library support out of the box taking a heightmap (RO/RW as allow or not erosion) and produce a second heightmap representing the river beds with their heights could be awesome. If you have already some implementation in mind and want to try a heightmap I have this one for instance (black = -1) here that is currently pretty smooth and could be a great example with erosion enabled 😉 |
Dear Nicholas McDonald,
I am currently looking for a simple way from a heightmap to generate river paths, and I came to your library. I am wondering how would you generate river path in a one go during the terrain generation phase of a world generation. So I'm looking to get a new map representing the path of the bed river with values from [-1.f, 0.f] as the depth/volume of the water. Would you mind exposing me a simple c++ example for doing so? Right now I'm a bit confuse with where I should start from.
Additionally, I'm wondering for better integration with existing c++ project, would you provide a CMakeLists.txt support to use as add_subdirectory()?
Thanks in advance for your help 🙏
The text was updated successfully, but these errors were encountered: