Lightmapping - Realtime + Baked Question

Heya,

This was probably mentioned by someone already but I was unable to find it. I’m trying to do something dead simple, but I can’t! I have an already complex scene with lots of objects and one light source. I want to bake one static object which would receive shadows from other static objects. Although I’ve read the manual, I still haven’t been able to figure out what I’m doing wrong. The object will be baked, and it will receive shadows from it’s own geometry, but no matter what I do, I can’t make it to receive shadows from other static objects. The light is set as ‘auto’ since it’s suppose to cast realtime shadows from movable objects (also included in the scene). Could someone help me with this please?

Thanks!

So you are baking just one item?

Are you doing bake selected or baking the whole scene?

Ah! I was pressing ‘Bake Selected’ without setting other objects as static and thus, only got a bit of the lightning baked instead of considering the whole environment.

But, now I’ve got a new problem:
Lets say I’ve baked the shadow of a wall casting on the floor. The shadow looks great. But as soon as my character approaches the wall, he won’t pick any shadow from the wall (as if the wall wouldn’t be taken into consideration by the realtime light anymore). Any thoughts?

Thanks!

either unity pro and dynamic shadows or you need some routine that checks the color of the lightmap beneath it to change the color on its material as it has been done in games for over a decade :slight_smile:

Got Pro :slight_smile:

But I don’t understand why a mesh would stop casting shadows on movable objects after I’ve baked a lightmap on it…

did you ensure that the light is not set to be a bake only light? :slight_smile:
and that you are in deferred rendering (cause with forward only a single directional light per scene will cast dynamic shadows at all)

Lights are on Auto (I guess if I set them as realtime only, they won’t bake any shadows on lightmaps).

Can’t find the ‘deferred rendering’ option… But in my scene, I only use one single dynamic light (which is the one used for baking and later for realtime light.)

single dynamic light is not enough, it must be a directional light, point lights don’t cast shadows in forward.

as for deferred rendering: its where all important stuff is, the mythical Player Settings :wink:

Beautiful!!! Deferred Rendering was what I needed. Wouldn’t have found it on my own! Thanks dreamora!