Prefabs casting shadows only for Lightmapping?

Hi, I need some help with shadow casters :wink:

  • I have the static part of the scene lit by static lights which are “Baked Only”
  • I want my dynamic objects in the scene lit only by “Realtime Only” lights and I want to cast shadows of dynamic objects
    onto my static objects
  • I want my static objects to cast shadows only from my “Baked Only” lights, and never cast shadows from “Realtime Only” lights, but at the same time be able to recieve shadows from the “Realtime Only” lights.

Is there any possibility to tell an object to be a shadow caster only for lightmapping and not cast any shadows from dynamic lights?

I will be very thankful for your help guys! :slight_smile:

Hello,

Dont take my word as gospel here but i do believe shadow properties can only be set in the properties of affecting lights. Maybe you could disable the “cast shadows” option within the mesh renderer (for statics) once light maps have been baked? I imagine in this case, the light maps would remain unaffected yet would ultimately stop real time shadowing? Its a dirty work around but may just do the trick…

Is it a performance concern or a particular effect you are trying to achieve for other reasons?

Thank you for your reply :slight_smile:

Yes, that method that you pointed out came to my mind but as you said - I found it quite “dirty”.

It is indeed a performance concern - it generates too many shadow casters and drops my fps too low.
I think I might use the “dirty” method until I find a better solution.

Thanks for the advice :wink: