This is a group for all developers using the Unreal Developer's Kit. Open for all commercial, non-commercial and personal projects!
Create a copy of the UTPostProcess_Console and have an editable ambient occlusion that can be viewed within the UDK viewport.
Posted by JonathanArmstrong on Nov 15th, 2010
The new addition of SSAO to UDK is an intriguing new feature, one that has not had much documentation since it's release. I have spent some time toying with level design and hacking the Unreal Engine all sorts of ways, so in this tutorial I bring you a hack that I have created to create custom ambient occlusion settings that you can view real time in the viewport before test playing in the game. Other tutorials I have seen out there say that Lightmass bakes the AO and would prompt you to bake lighting before the new ambient occlusion takes effect. I have found that this is not the case and it is much easier to handle the AO real-time.
Make sure you save this to a package other than FX_HitEffects, because you can't save over default Unreal Engine packages (I have created a simple "MyPackage"). I like to add "PostProcess" as a group, that way it will be separate from you level content (if you are adding this to your existing level's package).
Right click the copy of the UTPostProcess_Console and Copy Full Name to Clipboard. This will copy the full directory in UDK for the next step (mine is PostProcessChain'MyPackage.PostProcess.UTPostProcess.Console'). Save the package and close UDK.
Open UTEngine.ini in C:\UDK\UDKGame\Config\UDKEngine.ini. Find DefaultPostProcessName and replace what is there with what you have copied from step 2. There are two versions of DefaultPostProcessName, so be sure to replace both of them.
You will only need to keep the part inside of the quotes ('MyPackage.PostProcess.UTPostProcess.Console'). Save UTEngine.ini. and open UDK again. Load your level and/or new package.
Navigate in the Content Browser to your custom PostProcessChain and double click it to open (the pink box that we created in step 2). Click on the AmbientOcclusionEffect. From here you can fine-tune the ambient occlusion to your desired effect. Believe me, the subtler the better -- it will also be useful to check how it affects your level in lit mode, because lighting only may look good but then completely wash our your materials when fully textured. Make sure that Show In Editor is checked, or you may have no AO at all in the viewport.
Occlusion Power and Occlusion Scale will be the most important settings. Occlusion Bias should be left at 0. Here are some examples of what can be achieved with changing the Occlusion Power and Occlusion Scale settings: Power will effect the darkness and Scale will effect the range that it takes for the ao gradient to completely fade off. Setting Angle Based SSAO is desireable because it doesn't darken the scene completely. It will not shade flat surfaces, but only where two surfaces meet at sharp angles.
Here are some examples of what can be achieved with changin the UTPostProcess_Console settings:
I have found that there is a Tonemapper, which was added recently I believe. You access this by clicking on UberPostProccessEffect in the Post Process Editor. Setting it to anything other than off with darken everything, and you'll also want to change your AO settings to compensate. Save the package when the desired result is achieved.
I hope this tutorial was helpful and you can also view it at Jonarm.com