sun shadows - help me

Hey i have i problem with the shadows in the blender game engine sun. if i press “shadows” the sun simply leaves a shadow… but it only leaves a shadow in a specific square?

If my character walks to far away from the actual sun empty thre are no shadows. even if i try to bake shadow it only bakes in this actual sqaure. i can try to increase the square but the more i increase the more the shadows starts to build up corners for some reason…

Help me plz.

Vertex Parent the sun to the camera/player, so it follows him around (select the sun lamp, select the player (so shift click), go into edit mode of the player, select a vertex, and hit ctrl+p)

Just for some further explanation, the way shadows work in games is via a texture projected from the light source- if you increase the area the texture covers without increasing the texture resolution you will get more and more blocky shadows (as each pixel grows in size). Increasing the resolution of course introduces a greater performance impact. Even in top-tier professional games you can often see, generally not too far away from the camera, where they step down to a lower-resolution texture and then not much further than that the shadows disappear entirely.

Note that variance shadows mitigate this effect by having softer edges on the shadows, but you’ll get more fidelity still by having a larger buffer size for the shadows.

I also recommend parenting the sun to the player in some fashion. If you need to adjust the size of the box in which you get shadows, look for the frustum size options in the sun lamp’s clipping settings.

okay ty, ill check the parent to player function! :slight_smile: