Game
StaudSoft's Synthetic World
10 years ago

Development Blog #13 - Parallax Occlusion Mapping, Shadow Mapping and Configuration Dialog


In the last days we did a lot. Let’s start with the configuration dialog:

Configuration Dialog

As mentioned last time we want to add an in-game configuration dialog. With the exception of the screen resolution every settings appears now in our new dialog. Check out the screenshots:

This dialog was created from annotated source code. So it should not happen again that some of these settings are not accessable. We also updated the icon for the check box and added new settings. If you want to see the dialog in “live” check out the video below.

The old configuration dialog which appears when you start the game has been deleted!

Shadow rendering

As we now have moving plants we thought that it would be nice if the shadow map is also animated. In the past it was so that the shadow map was only updated every 25 frame or when necessary. So it couldn’t follow the movement of the plants. So we added now a setting which allows you to enable this feature if you have a good computer. You can see it in action in the video!

And the grass does not cast a shadow any more. This only produced unrealistic artifacts.

Parallax Occlusion Mapping

Ok implementing this was really crazy. I also thought about naming this post “What the heck is going on? In which coordinate system am I?”. The general parallax mapping (not parallax occlusion mapping) algorithm is relative easy but you have to check in which coordinate system you are and in which coordinate system you interpolate your values. For example the view direction is essential for this method. I originally interpolated the normalized view direction which produced strange results. Then I realised that I had to interpolate the view position, then in the pixel shader create the view direction and then normalize this vector. Everything else produces strange results. But I still feel a little uncomfortable about this algorithm. There is a minus sign where it shouldn’t be, but it doesn’t work without it. Hmm, I feel like a guy who builds something and then realises that some screws are remaining.

Then I had the parallax mapping algorithm implemented. But it was not really noticeable and when I increased the effect it distorted the texture. The main problem was that the height map contained small details and this did not work very well. So I implemented a gaussian blur algorithm to smooth the height map which is used for parallax occlusion. It looked better but I still wasn’t satisfied. So I decided let’s do it all and implemented Steep Parallax Mapping, Parallax Occlusion Mapping and Relief Parallax Mapping. These algorithms perform a raycast in the tangent space of the texture. This creates the illusion that the texture has depth. Just look at the screenshots:

This will be enabled for the blocky voxels. I also tested in on the trees but it didn’t look good. The next thing what we have to do is to adapt the height maps so that we even get better rendering result. Check out the video:

https://www.youtube.com/watch?v=beXNdvrP1eQ&feature=youtu.be



0 comments

Loading...

Next up

Merry Christmas!

New Dungeons with shy zombie (he does not attack the player because of a bug)

Finished Voxel Background Landscape

Yes! The first village generated by the AI!

This is only a debug view. When it is finished these buildings will actually be placed in the landscape!

Another house i made long time ago.

Hi everyone! I started to create some environment props for my new video game, here is a cozy house in the forest. I'm planning to switch from Unity to Unreal... Let's see what new challenges I have to face. Made in Blender and Substance Painter.

Why walk when you can jump?

"Day to Day" (also check spud out here he's a great guy and writer: https://soundcloud.com/spudward)

Levels' maps.

If you’ve played the Vault demo and enjoyed it, please consider ‘liking’ the game page here on Gamejolt and/or leave a comment!

Also please consider tossing Vault on your Wishlist, I really appreciate your support!

https://store.steampowered.com/app/1251800