Home

Awesome

HeightmapOnTheGPU

This was the result of further exploration on programming on the GPU. Similarly to the last project this was built in Unity using a combination of C# to handle the camera, motion of the object, and Data management; combined with HLSL to run most of the actual deformation on the GPU. Also involved with this one was CgFx to actually render the shader with height deformation, a simple and primitive ambient occlusion algorithm, and dynamic tessellation to increase the poly count the closer you get to the object. I wanted to explore how I could put something like this to even better use, so I developed this heightmap system that basically tests objects at each pixel to see if they intersect and then displaces it as it seems fit. The hardest part again was figuring out how to pass information back and forth, especially trying to figure out how to test the height for collision purposes. Right now it’s kinda primitive, and not easily scalable beyond the set amount of objects here. I also wound up programming a shader for the surface so it looks like you are actually digging into the dirt when you make depressions, and I added dynamic geometry tessellation (basically means that the closer you get to the object the smoother and more detailed the object gets).