… but have a problem with the lightmap shadows that i already had on the scene … when the player walk on the building shadows , its shadow is still appear and that dosn’t give a reality look … did anyone have an idea to fix this problem ??
the simplest solution is what torque and games back too Quake 2 do: use a vertical raycast and check the lightmap color at the position below you. if it is smaller than a given value, disable shadow casting.
also on the lower quality settings (with low amount of lights and vertex lights only) you might want to tint the character according the lightmap color, so he “fits into the environment”
i tried this solution but it didn’t give me a reality look too … cause when u standing on the light near the shadow of the bulding the character shadow will appear on the building shadow like the picture above … so the ray cast approach is not an approach for me
i didn’t got this solution !!! any more details about it ???
Well you will not get any “reality alike look” with precalculated lightmaps.
If reality is what you are looking for then you must use realtime shadows only.
The solutions described help to minimize the visual impact of different things, but they won’t replicate the reality.
As for the low quality solution: you would use the lightmap color as color on the mesh (ambient color), for example the base color on the material if you use the diffuse material for example
Is the shadow a render to texture effect and if so could you combine it with a precalculated map before it is applied to the diffusetextures? been thinking about different ways of combining realtime lighting with lightmaps. the shadow part is kinda tricky though. combining the realtime illumination should work. I tried that with a shader in guest some time ago. don’t know how the shadows work in unity though.