Over the past couple of weeks I’ve been working on a new graphical feature: some sort of fake, mostly physically incorrect, but (hopefully) ambience-enhancing, indirect illumination.
For this I’m mixing in 2 approaches at indirect illumination. The first one is the well known Color Bleeding, a SSAO of sorts acts at at neighboring pixels with semi-facing normals, but spreads colors at those areas instead of just darkening them.
This Color Bleeding approach was the most challenging one because UDK does not offer a Normal Scene Buffer, so I had to reconstruct it from the Depth Buffer.
The second approach was an idea of my own, which involves creating a special camera that saves the scene to a RenderTarget, except it does it from a top-down view and with enough clipping to not capture anything above the player. Then a PointLight is created below the player, and it projects that captured scene upwards mapped to match the scene. Graphically the result is that any colors below the player will be projected back upwards, giving the effect that the light is rebounding with the colors from the objects in the ground.
Then the same thing happens but upside down so that I also project down anything above the player, this time without clipping so that even the sky will be projected back downwards.
But talk without pics is usually a waste of time so here is one. Left is with my cheap fake Indirect Illumination enabled (notice the big blue ball’s colors are projected upwards to the player).
Of course the effect here is quite visible because there’s a big blue ball below the player, but in a regular outdoor environment (with all terrain, rocks and trees) the effect is quite subtle. I figure the effect will show its best in indoor and/or night scenes where there is much more contrast between lit and unlit parts.
And as with anything at first, it needs optimizing. Specially the Color Bleeding part which cuts down performance by ~20%.
Edit: Ok I’m adding a better comparison picture:




