Fun The Mental

418 Final Project Proposal

Title: Sand Castle Simulation.

Members : Bryce Summers (bwsummer)
Brandon Lum (jiajunbl)

OUTDATED, Click here for latest version!

1 Sentence Description.

We are going to implement an optimized heightfield based beach simulation, where the geometry of sand and water will be updated realistically using NVIDIA GPUs.


There has been much interest in accurately simulating and displaying water over the years. In this vein, some techniques have been developed where heightmaps are used to simulate the geometry of only the surface of a water body instead of the entire 3 dimensional volume. To simulate the next time step of a heightmap requires doing very small computations for every element in the heightmap. We wish to combine several dependant heightmapped entities including water, sand, and breaking waves to create a plausible simulation of a sandy beach. By doing this we will be investigating the optimization of a data parallel algorithm with a large amount of data at interactive rates. The simulation we envision is not as straightforward as it may seem, because the calculation of the water heightmap will depend on the current height of the sand under the water body at a particular point and their are many opportunities to reduce the memory transfer requirements without jeopardizing realism.
A Youtube Video of a 1D simple water and sand simulation that Bryce made in 2012.

The Challenge

The main challenge in this project is likely to be the bandwidth limitations associated with transferring height values to and from the GPU. Also, we hope to be able to process as fine a scene as possible. As the beach gets more detailed, the 2 dimensional heightfield arrays will increase quadratically. We plan to overcome some of the bandwidth limitations by only communicating data about water and sand that needs to change. This in turn will present a work load distribution challenge, because the area where the waves are breaking will need much more processing than areas high in the sand that do not move. In order to adapt our heightfield based implementation to allow for the picking up and dropping of sand in addition to breaking wave, we will need to implement some sort of efficient system for dynamically creating new heightmap layers. This will introduce new cache locality problems.


Goals and Deliverables

What we plan to achieve.
  1. We plan to implement a basic naive implementation our algorithms in the 1 dimension visualized as a 2d image case first. This will allow us to clearly illustrate the algorithms, check for correctness, make sure the utilization of the GPUs is going well, and provide a comfortable place to test out features.
  2. We will next transform our code from the 1d heightfield implementation to the 2d heightfield implementation.
  3. We will run our code and take baseline measurements for the performance of the naive algorithm.
  4. We will implement techniques for minimizing the amount of data that needs to be moved from the CPU to the GPU.
  5. We will try to get our program working in real time with as detailed a resolution as we can manage.
What we hope to achieve.
  1. User interactivity. We want the user to be able to move sand.
  2. Implement Breaking waves.
  3. Implement Realtime heightfield based caustics on the underwater sand.


For the demo, we plan to run our program for the audience. They should be amazed by the sheer wonderfulness of our realistic beach simulation.
Our system should be capable of generating and updating positions for triangles that represent sand and water at real time speed.

Platform choice

We plan to use a normal personal computer using NVIDIA's GPUs and CUDA. This is good for our needs, because it is good at data parallel execution and will likely work well with the render that we use to visualize the scene.


Motivation :)

CMU Students are usually under very high stress and the Pittsburgh weather is not the greatest, so we feel that a beach simulator will help take the stress away from students by allowing them to imagine that they are stuck on a Caribbean instead.