Ambient occlusion problem finally solved
I have been working with this problem for a long time now but I have finally found a solution that works. The problem began when we decided to but the ambient occlusion on the buildings in a separate UV-set. This resulted in zeroed out tangents in the shader. I thought I had found the solution to this when we exported the meshes with built in tangents, but something was not right with these tangents, weird artifacts appeared. I abandoned this and tried another solution which was to render the occlusion in another rendering pass. This seemed to work in my prototype but when I implemented it in the game z-fighting appeared between the rendering passes. We finally decided to abandon this and bake the occlusion in to the diffuse maps. But I couldn’t let this go and fortunately I found out that the z-fighting was caused by a bad mix between the fixed function pipeline and the programmable pipeline. This was easily solved by using a second shader to render the occlusion pass, which I previously rendered using the fixed function pipeline.
Last week I worked with the life bars and selection markers on the characters.
This week I have been working with special effects for the rocket launcher and desert eagle, I will upload a clip of this tomorrow.
/Martin A