Combining Baked and Realtime Lighting

I have a scene with lots of baked lighting, but I’d like the player character to cast and receive shadows when they move around in the environment. Is there a good way to do this? I’ve tried setting my light to Mixed, I’ve tried having multiple light sources (Baked and Realtime) and it seems like I can only ever get Baked or Realtime lighting.

Have a few lights as realtime and other lights as baked.

Mixed mode would be what you want but it’s not working properly yet.

1 Like

Is it still advisable to use layers in this context? Ie bake the environment lighting and have realtime lights only effect characters for eg on a set layer?

This used to be the advised approach but with everything being reinvented I have no idea.

1 Like

Then the character wouldn’t receive/cast shadows though, right?

Also… I haven’t tried that in 5, it will probably work, but I don’t know if it’s a good idea or not.

What the OP wants is exactly mixed mode. But that doesn’t work properly yet.

In the meantime, I think having the bulk of the lights as baked, and a few, strategically placed, realtime lights will have good enough results. Just make sure you don’t move those lights so the GI isn’t updating, if you’re going for performance :slight_smile:

1 Like

From my trial and error experiences, so far, I agree with AcidArrow. While the layer approach with using baked and realtime lights is possible, it seems to be very limited. While you can bake the static geometry lighting and use realtime light for let’s say characters with a specific layer, from my tests the realtime light does not create shadows on the baked ground surface for the characters (it just lights them).

At the end of the day, in my opinion, the current lighting options still somehow feel unsatisfying. I really hope that the Unity team improves on the mixed mode so that it works nicely in future (and also supports point lights).

2 Likes

Like moco2k mentioned, when I bake the static geometry lighting and use realtime lights as a secondary light source for characters, the characters don’t cast shadows on the baked landscape. Pretty pointless.