418 Final Project Proposal
Title: Sand Castle Simulation.
Members : Bryce Summers (bwsummer)
Brandon Lum (jiajunbl)
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.
Background
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.
Resources
- We will probably be running the code on a single personal computer that has a NVIDIA GPU.
- We will use either OpenGL or any other renderer to render our scenes.
- There is a chance that we will use OpenFrameworks,
because it handles lots of the basic window management and openGL setup,
so that we can focus on the parallelization and visualizing of the heightmaps.
-
Efficient Heightfield Water
-
Caustics from heightmaps
-
Bryce would love to know the detailed material properties of sand.
-
Since we are trying to make a real time simulation on a computer that a consumer could have access to, I think that at this point we do not need special access to any machine.
Goals and Deliverables
What we plan to achieve.
- 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.
- We will next transform our code from the 1d heightfield implementation to the 2d heightfield implementation.
- We will run our code and take baseline measurements for the performance of the naive algorithm.
- We will implement techniques for minimizing the amount of data that needs to be moved from the CPU to the GPU.
- 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.
- User interactivity. We want the user to be able to move sand.
- Implement Breaking waves.
- Implement Realtime heightfield based caustics on the underwater sand.
Demo
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.
Schedule
- 4/6/2015 : Implement 1d heightfield, get the basic display code running.
- 4/13/2015 : Implement 2d heightfields using CUDA
- 4/20/2015 : Profile the code and create initial measurement charts.
- 4/27/2015 : Speed up the computations by detecting what the bottlenecks are and finding ways to overcome them.
- 5/4/2015 : Implement Extra features as time allows.
- 5/11/2015 : Done with final project and ready to present.
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.