How can you use both baked and non-baked shadows

Hi,

how do I create objects that either cast baked or real-time shadows without using too many light sources?

Thanks in advance

Hi @SayHiToMePls and welcome,

A single light source can affect both lightmapped and non lightmapped models, just enable the respected flags:

Then you can control on a per model base how each objects is rendered:

image

But why aren’t there any shadows?

Right, can you provide a sample project link to troubleshoot that?

Unfortunately, I don’t have one. This one is just like theoratically

And how can I only use one light source (directional light) to have like 2 cubes where one moves around and hence has real-time shadow and a static cube that just needs a lightmap?

Check the screengrabs I’ve sent above:

  • First one is a single light source affecting both dynamic/lightmapped objects
  • Second shows the flags to use for models with either dynamic or lightmapped lighting (the lightmapped flags are labeled accordingly)

The best way to learn how to do this, just create an empty project and play with the settings yourself.

I still don’t get it nailed. Could you give me an example project, please?