- Home /
Realtime shadows on only player? Bake the rest.
Hello,
I've done a bit of googling but obviously not using the right keywords.
I'd like to have realtime shadows on my character and enemies only and have the rest of the scene with baked shadows.
Is this possible?
I'm running Unity 4.6 non Pro and my target platform is mobile.
Thanks!
Answer by MakeCodeNow · Feb 04, 2015 at 01:05 AM
You'll need to use the older, non-dual lightmap style lightmaps. You also need to make sure that things that case shadows but aren't the player or enemies are marked as static.
If you are targeting mobile, you may want to consider using blob/drop shadows for your enemies and possibly even player.
Just clarify the answer provided by $$anonymous$$akeCodeNow: I always place a Quad under the enemies / players on mobile with a black transparent texture. This is fairly cheap to render. Dont forget to use mobile shaders. See the texture down below
EDIT: Ofcourse the shadow texture could be any shape.
Cool thank you both! I've been using blob shadow and the performance has been very good on mobile. I just wanted to spice up the look a bit more. What I didn't think to try was simply turning on realtime shadows after baking. It works well! I assumed I would get realtime shadows on objects already baked but that doesn't appear to be the case which is awesome! So far I have about 5 enemies and it's ok. We shall see what happens when I put my intended 30 enemies with realtime shadows.