mixed baked shadows and realtime shadows problem..

Hi, guys!

Please help me with this stuipid problem I´ve got. I just can´t figure it out :expressionless:

I´ve got a test-simple scene with cube A, cube B and a flat “floor” cube C, all textures with a simple diffuse material. There is also a point light in the scene, shadows turned on.
The camera is fixed to one position, it doesn´t have to move around.

Cube A is my dummy-player which should be able to move around in the scene and cast real-time shadows.

Cube B is just a static object (i.e. a wall, things in a room, etc.), it should receive the real time shadow and cast a baked shadow, but not a realtime shadow for performance reasons.

Cube C is my floor, it should receive realtime shadows and display the baked cube-b shadow.

I hope you get the point. So I´ve got static objects which should cast baked shadows and a player-dummy which should cast realtime-shadows. No cam movement, just walking player cube.

Generated lightmap UVs are created, I turned “static” on for Cube B and C, light is set to “auto” and baked the dual lightmap. I can´t get the blending to work correctly. If the player dummy cuby A moves to far away, the realtime shadow disappears. Setting another distance lets the static object shadow disappear.

Very frustrating. I can´t get both shadow types to work at the same time.

I tried all night, but it still doesn´t work. Can anybody please help me out with some ideas, hints or a quick-n-dirty-demo scene? (Please don´t point me to the manual, I´ve read it 100 times :slight_smile: )

Thanks for time and help!
Oli

Right you can’t get both to work at the same time. Thats the point of dual lightmap.

in the dynamic range, the dynamic shadow calculation will handle it, with the baked AO being used along it, and outside the dynamic shadow range, static lightmaps will be doing it.

there is no area where both take place, if you want that you will have to use the legacy lightmap shaders

Hmm, there must be a way doing what I want to…it can´t be THAT difficult ?!..But how? I don´t need this switching, I just want to bake the static object shadows and have a light that creates real time shadows for my character.

Would a single lightmap be the right way?

Its not about difficult or not.

If you want the shadows to work nicely you want dual lightmap so you don’t get the problem of lightmaps and shadows boosting as the shadows will not take into account lightmaps at all.
If you go with something else where they coexist, you will have to render the lightmaps as well as setup the shadows accordingly to not see this problem in a too visible nature