SimWa is a water simulation plugin that creates the simulation based on a height map. The goal of SimWa is to facilitate 3D water simulation on non-plane objects. SimWa can generate rivers and lakes. The plugin follows the height map data to generate realistic water flow depending on water input amount, water displacement equation, and water input coordinates. It’s all calculated by the shaders, so there’s almost no CPU usage. It only uses the Update function to call the different shaders to calculate the water flow and set the water input information.
Currently SimWa generates water flow on a 2D environment only.
Option to chose water area instead of using full height map.
First 3D implementation
Current features
Heightmap recalculation, can be used when rebuilding terrain on play mode
Full water simulation based on height map.
Water input coordinates can be adjusted.
Shader code, no CPU heavy algorithms.
SimWa started as a project to understand Unity shader programming. The first phase of the project was to calculate color displacement of a bunch of red pixels at the middle of a plane.
Yes, it could be used for that game, but IMHO (at least for what I could see with the screenshots) you are better using a normal water plane since your water surface is flat. This plugin goal is to generate water flow in not flat surface, like a terrain.
Are you intending to model the water flow itself? Unity lacks decent river simulation. How does your algorithm compare to something like this Loading...
That’s some interesting project. I’m definitely going to check it out.
The main goal is to model the water flow so that any game can easily have rivers running around the terrains/models. But after seeing that project, including water erosion could be an interesting thing to do. This could be added to a future todo list. I first need to study how good that could be for a game and how much GPU/CPU demanding it could be.
Well I already fixed the water restarting on heightmap changed! This means that you could modify the terrain in play mode, call the function to update the water field and it will update the water field without restarting the water.
I also made my first 3D implementation and it works well. I will create a video and update the demo web player this week.
Demo updated. Now the water doesn’t recalculate when the height map is changed. I also uploaded a video of the first 3D test. Here’s how its working so far.
Since you had to abandon this project, would it be possible for you to share the source code of what you created so far? I’ve been looking for a solution as good as this and it would be great if I could work on this and continue developing it.
Thanks!
I cannot since it is being heavily used for non game simulations, so currently is not viable for any real time game, but you can follow the posted solution above https://github.com/Scrawk/Interactive-Erosion it’s a really good solution and probably faster than what I ended up doing.