Closed stephen-hqxu closed 3 years ago
The main idea is requesting all adjacent chunks of the current chunk we are working on, make a copy of them and combine all chunks into a large texture, erode them as usual, break the large texture back to chunks and finally store them back.
Data safety is guaranteed. Chunks have been copied must not be used by any other threads until they are returned and released, it can be achieved by a simple lock.
There are 2 main technical difficulties:
first index in chunk i = last index in chunk (i-1) + 1
and first index in chunk i = 0
.Figure 1: Showed erosion
Figure 2: Showed deposition
This pull request deems to officially resolve #1.
Free-slip hydraulic erosion is a technique, that allows out-of-chunk-boundary raindrop to "free-slip" to neighbour chunks instead of ending the lifetime early. This significantly improve eroding efficiency of every raindrop and gets the same erosion detail as of previous algorithm with fewer number of erosion iterations.
Main academic reference: Ondˇrej Št’ava, Bedˇrich Beneš, Matthew Brisbin, Jaroslav Kˇrivánek: Interactive Terrain Modeling Using Hydraulic Erosion. In Eurographics/ACM SIGGRAPH Symposium on Computer Animation (2008)
Checklist
Main free-slip hydraulic erosion feature
Releated improvements addressed in this release