Today I implemented parallax occlusion mapping in Skeleton Cave. It’s long overdue to be completely honest. As I made the game I was relying on normal maps to give the rocks depth. This looks fine if you view the materials straight ahead but as soon as you look forward you can instantly tell that the texture is actually flat.
I’m working on a game that needs a lot of rocks. It takes place in a cave afterall! So I figured it was time to put in Parallax Occlusion Mapping.
The easiest way I can describe it is that it does a depth offset based on a heightmap. It gives the illusion of using a very high poly model but is really just displacing. It’s a bit expensive, but Skeleton Cave is being built to run on high end machines. I will probably put an option in the settings to toggle it on or off if performance takes a hefty hit.
Before and after
It’s a bit subtle, but does give the rocks more depth without having to scatter tons of meshes around. It is of course a material instance which means all of the attributes can be modified with new textures at no extra expense to the material draw calls. It’s a win win!