This is a project that I made by following the papers of the following authors for thermal and hydraulic erosion on the GPU. While this project is not strictly done on a GPU, I was able to apply its formulae and principles to Houdini to create a simulation using Houdini's VEX coding language. Below are some photos from my results:
For the thermal erosion portion, I referenced the paper Realtime Procedural Terrain Generation by Jacob Olsen and implemented the equation shown in the image on the left using Houdini VEX. Following the equation, I modify the height of each neighbour in reference to the current point, in which:
The variable d_i represents the change between current point and its ith neighbour.
The variable d_max is the greatest found change between any current height and its neighbour. It gets updated for every new point that is checked.
The variable T (Talus) represents a threshold angle in which once d_i surpasses that angle, erosion will occur and the ith neighbour's value will change. Hence, the left equation will only be triggered if d_i > T.
The variable c is a constant between 0 and 1.
For the hydraulic erosion portion, I referenced the paper Fast Hydraulic Erosion Simulation and Visualization on GPU by Xing Mei, Philippe Decaudin, and Bao-Guang Hu and implemented the model shown in the image on the left using Houdini VEX. Following the model and subsections of the paper, I implemented:
Water Increment via rain: Incremented water variable over time
Flow computation: As shown in the model, water will flow into neighbouring cells on top, bottom, left, and right. Flux change is the calculation for each direction on how much water (d) and terrain height (b) will change over each time increment.
Water velocity change: I then use flux change to calculate the out flow that results in flow change using the flux values calculated in the previous step for each direction.
Erosion Deposition: After obtaining a change in the water, I determine using a capacity variable on the amount of sediment that gets dissolved and transported by water and the amount of sediment that gets deposited.
Sediment Transport: Deposit the sediment carried by the water into the nearest four neighbours of the current cell.
Evaporation: Finally, I modify the value of the water remaining by having a portion of it dissipate by multiplying the current amount by 1 minus a constant k.
For this project, I generated a scene of procedural vibing jellyfish swimming in a sea of particles. The base mesh itself was actually created for a class project for Procedural Graphics, but I enjoyed working on the project so much so that I wanted to add more to my scene by giving my jellyfish some friends, and an environment to swim in.
Below are some screenshots that I took while the jellyfish was a work in progress, both the textures and the background.
From this project, I learned how to think in terms of what exactly I can do to achieve an end product on a Node-based system such as Houdini. But, honestly, I think the hardest part about this project was finding a good enough underwater environment map for my jellyfish.
Please feel free to read a more detailed breakdown of the nodes that I used on my Github.
Link to Github.
Work in Progress shots.
Some edits in the vellum simulation for the tentacles.
For this Houdini project, I created a legofying tool that takes any given mesh and turns it into a legoified version, making it seem as if it was originally created out of various versions of lego blocks.
There is a specific way that this effect was achieved, which was basically using the volume_to_points node to turn all of the space inside the mesh into a bunch of points, and then using a voxel to bound a lego brick mesh over each of these set points. The algorithm can also adapt to different sized blocks, such that we can fit 2x1, 2x2, etc. style blocks onto the mesh where the logic allows it. The node structure also allows for the fitting of slanted (slope) blocks, as well as flat blocks on the top of the mesh.
To read a more detailed breakdown of the greedy algorithm to place different kinds of lego blocks on a mesh, please head to my Github, which is linked below.
Link to Github.