lights, shadows and lightmaps

Hi all,

I read many times that we should use lightmaps as much as possible for static objects. I made a big test scene to test performance with and without lightmaps. First I didn´t really noticed a difference but it also was quite obvious that although using a lightmapped material, the meshes where still affected by lights in the scene. Putting meshes in different layers and adjusting the culling maks of the light sources did solve this and fps jumped up quite a lot while the scene still looked great because of the lightmaps.

But I found that objects that are not affected by lights cannot cast and, much more important, receive shadows!! This thread, http://forum.unity3d.com/viewtopic.php?t=9333&highlight=lights+shadows+lightmaps confirmed it more or less.

So, just for clarification, (for a scene with only 1 light source) in order to have dynamic shadows on objects they must be affected by the light source and therefor lightmapping these objects and using a lightmapped shader will not increase performance, correct? Or is there a workaround to cast shadows on objects not affected by light sources?

Thanks,
Raoul

correct, i had the same idea at last years unite and if i remember correctly its because how the shadows are set up they are subtracting from light so if no light, nothing to subtract from.

IMO there should be a ‘dynamic fake shadow’ option - one that casts an additive shadow so you could utilize the lightmap performance benefits but can have the dynamic niceness instead of a blob effect. also this would work better with terrains as you don’t have to have the huge performance hit of everything shadowing and just dynamic shadow your avatar.

Thanks drJones. I agree. In a game things move around which is why we need dynamic shadows, I cant think of a modern game that does not have dynamic shadows. Lightmaps are one of the main keys for good performance, now it turns out hat the two don´t go together. :frowning: