I was looking at the UDK app Epic Citadel and it seems like they are baking their normal map shadow information to their light-maps, as the lighting is static in the scene they don't have to render normal maps at run time but still get lovely bumped effects baked in.
Is this possible with Unity? Has any one managed to get this up and running? I was looking at the advanced Beast settings but could not see any setting for taking normal map information into account when rendering light-maps. If I can bake normal map shadow information into light-maps and at runtime only calculate specularity I think I could achieve a very hi-end looking game on ipad2/3.
Replies
http://unity3d.com/support/documentation/Manual/LightmappingInDepth.html
I have Unity Pro here, but haven't tried it on iOS.
My thinking is that a scene that has static lighting always has the same shadows generated by normal maps, so why not bake them into the light-maps and not generate them at run time?
Shadowgun uses a vertex specular + mask specular which creates a fake specular effect. I don't know if adding nmaps to it will decrease performance, probably.
They used nmaps + probes ONLY on their characters, so I imagine you can't (for an iOS game). I'm taking iPad3 out of consideration.
Every one is expecting the next few years of iOS games to look more like their console big brothers and sticking with diffuse and a bit of faked spec isn't going to cut it. I need to implement a decent set of shaders that can let me fake all types of believable materials.
In my mind the only reason not to do it is because no one knows how to do it! (including me!)
(Test it first maybe, but I seem to remember this being a problem for us.)
(And batching works great for stuff that uses only one lightmap, but it also creates a new "batched" instance of the meshes in memory, so you're effectively using up twice as much memory for your meshes. Which... may or may not be an issue, depending on your game.)
Anyway. Baking your normals into your lightmap sounds cool. From my experience, I just don't think it's practical.
Have you thought about baking this light information of your normal maps on the diffuse map? It's a matter of not rotating the textures. Might look cool!
If no one knows if it's possible in Unity then that's fair enough.
It's not in there as a default option, however.
Uploaded with ImageShack.us
It does seem to be baking to the lightmap, there are some directional lightmaps in the project, I'm not sure they are used at runtime? It's clever stuff any way! The citadel demo has a huge amount of lightmaps, not sure how they fit it all in to memory at runtime!
You know what's funny, I see some stains going on too, wow, im curious where those come from... thanks for showing.
Directional Lightmapping is already pretty cheap, and if you still want specular then you still "need" to do normal map texture sample and transform into tangent space, so your really not optimizing much by just baking normal map shading into a lightmap.