I was wondering if anyone could provide some information on the benefits of lightmapping and whether or not it might be right for my project.
Right now we’re having some trouble running the Unity web player on machines with integrated graphics cards (often running below 2FPS, the project seems to work reasonably well around 8FPS). I checked out:
Which indicates that a lightmapped environment could run 2-3 times faster for a scene with 2 lights.
Currently I have 3 directional lights. I have about 1700 objects, all of which use the VertexLit shader. Most of these objects do not have maps, they just have different material colors. Does the fact that the objects do not have maps limit the effectiveness of the lightmapping?
Can I expect the lightmapped environment to run about as fast as my project would run now if I disable all of the lights? Is there any chance it could be faster?
If your light sources are static, it definitely would benefit from it. Hardware lights are very costly especially when you push through masses of polygons.
As a simple test, just disable the lights (compensate through higher ambient if needed) and test it. thats about the performance you will get with lightmaps
From the reverse perspective:
The performance disadvantages of lightmaps are minor. They will increase the size of the executable, and are an additional texture in the render process.
The second point is a moot point however when compared to the cost of dynamic lights.
The main problem with lightmaps is that they are not dynamic. Your light sources can not move. But there are ways to mix and match dynamic lighting for moving objects with lightmaps for static objects.
Advantages:
Superb visual quality. For example, you can color the shadows should you wish.
Terrains also greatly benefit aesthetically from high quality light maps. EG. You can establish a finer grain on the shadows than is possible with engine rendered lighting.
I’ve done some testing with all of the lights turned off and it seems like the lightmapping is worth looking into a bit further.
I did find that on the machines that were running the web player very slowly (under 2FPS) there was virtually no improvement; also machines that were running it very quickly (over 40FPS) exhibited no noticeable improvement. Most of the mid-range machines did show a decent improvement (i.e. 17FPS to 32FPS, 5FPS to 8FPS, 6FPS to 10FPS).
Can’t wait to see an extended version of the pixellightmapper script for Unity with features like radiosity, image based lighting and so on. Would pay for it.