Ambient Occlusion and UDK

April 19th, 2011

4 walls and now a box! I’m making such progress.

UDK 2011-04-18 17-59-01-49

Actually, I’m testing some post-processing effects with UDK and trying to discover an effective look with the easiest texturing pipeline. I’m working with with very basic texturing at the moment, literally just colours. In the image above, I’m specifically testing the ambient occlusion features of Lightmass (UDK’s lightmap utility). Ambient occlusion adds these shadows to the corners and seams. I really love the warmth that it gives, but there’s an issue. See this other example:

UDK 2011-04-19 18-59-40-90

This is the same scene with the texture compression turned on. I’m sure if my walls had more detail it may still look good, but with the clean simple colours I have here, you can clearly see the compression artifacts. It looks muddy, pixelated and just a mess.

Unfortunately, UDK doesn’t seem to have controls over how much compression is applied for lightmaps. It’s either on or off. There are other quality-related settings, but so far from the ones I’ve tried, there’s been little difference. Edit: Higher resolutions on the lightmaps helps, but when it gets close to the same quality, the filesize is even greater than uncompressed @ 32.

I do know of a possible solution: Bake in ambient occlusion at the mesh (model) level within 3D software (which would be Blender in my case). That’s quite a lot more work than clicking “build” for Lightmass. Plus I’m worried about the consistency between meshes, since I plan on piecing a lot of my architecture together with modular parts. Re-exporting out many meshes for each combination sounds not only time-consuming, but also problematic for making changes down the road.

I’ll keep fiddling of course, until I get a happy compromise. Having huge lightmap files is probably not a good solution, but it sure does look pretty.

(Update: Problem solved. See discussion comments).