Hey guys, I always had a question that like other game engines, can we change the sun so that EVERY object no matter how far is it from the sun casts and recieve shadows? Because i hate the current box shadow system
That would probably be too expensive.
What you could do is bake the shadows into a texture.
Don’t know if there are other ways to do it though…
Yes I definetly know about baking, but I need those shadows as realtime, because my main focus are car games and some nice physics, so static shadows are not for me, IDK if there is any other way, thats why I created this thread
the sun lamp has to always follow the camera.
copy location, vertex parent…
It’s non sense to have a lamp that project shadows on every object even if you can’t see it. The solution is as Murillo_Hilas said, but with some other lights.
You can have a hemi lamp for the entire level, and only the sun lamp (projecting only shadows, maybe) parented (with vertex parent) to some player’s geometry object.
The procedure is as follow:
- Select the Sun Lamp
- Select any player geometry objec, for example a cube parented to the camera.
- Press TAB to enter EditMode in the cube.
- Select only one vertex
- Press Control+P
- Select “Make Vertex Parent”
And that’s all, make a WSAD control with logic bricks and see how the sun lamp follows the player, and as you rotate, the sun keeps the original orientation.
even the most cutting edge game engines do this very same thing. but take it one step further.
shadow cascades are and have been in games since modern shading. basically the shadow resolution decreases as it gets further away, allowing for seemingly vast shadows while remaining sharp near the camera.
it wasnt until eevee that we finally got cascades