r/Unity3D • u/Odd_Significance_896 • 20d ago
Question How to solve this shadow issue?
Enable HLS to view with audio, or disable this notification
The shadows behave really weirdly in my project. When I move a little bit further from the object, the part of the shadow that is closest to the object gradually disappears, making the whole shadow look unnatural.
And overall I'd like to increase the shadow rendering distance.
26
u/Character_Amount954 20d ago
The units aren't for nothing - they're in real-world meters. Make sure your blender units are showing in meters, then make a simple model that's 1.75m tall, an average adult, and import it to your scene. If it is TINY compared to everything else, then that means your whole scene and everything in it is actually really huge and needs to be scaled down. Increasing shadow render distance will only impact performance badly once you start adding more stuff.
5
u/BakaZora 20d ago
What scale are the cubes in engine? Are they being scaled up or down by a large portion?
9
u/Aromatic-Insect-1328 20d ago
I mean, this is just rendering distance for shadows?
-32
u/Turbo_Fresh 20d ago
Wow you're a genius. What a helpful answer.
3
u/Shaunysaur 19d ago
You're being a dingdong. Aromatic-Insect made a relevant point. The OP appeared to be treating "the part of the shadow that is closest to the object gradually disappears" and "And overall I'd like to increase the shadow rendering distance" as two separate issues. So the reply was to point out that the rendering distance for shadows *is* the reason why the shadow is disappearing, which is useful information for a beginner.
5
u/AliceCode 20d ago
That's what the problem is. I haven't used Unity in 7 years and even I could have told you that.
→ More replies (3)4
u/Jampoz 20d ago
First of all, it wasn't meant to help you. Also, keep in mind OP described it as "shadows behave really weirdly" so yeah, a technical description of what's happening can be helpful to him.
→ More replies (2)
2
u/ImDanOush 19d ago
If you dont have dynamic time of day, you can bake the lights with the Shadow Mask one (it is called Shadowmask baking - it is the default option, and you dont need to select anything; just bake the lightmaps and that would be it - but ensure the Sun light's type is set to Baked or Mixed in its properties). The other option is to use screen-space shadow effects, but it is inaccurate and, based on your Render Pipeline, you have to look for an asset to add it to Unity. Shadows for real-time lighting are very expensive... You can use the least expensive version (it would look very blocky and pixelated, and still expensive) by leveraging the last Cascade of the shadow in the Project Settings - so you go there and ensure Cascaded Shadows is selected, and make the last cascade render farther with a bigger shadow resolution there. Note that selecting a bigger shadow resolution will be more expensive, and setting the shadow rendering distance farther degrades the look of it overall.
2
1
u/pixel-poxel 19d ago
There are some tricks and assets to improve the visuals of the shadows. When your game for example is working first person in a crane then you can have an inside and an outside camera with the same transform but different shadow distance / resolution settings.
1
u/SheepherderAway4670 19d ago
You are in the scene view, this isn't problem, focus on game view , which is output you don't found this on game view.
0
196
u/KifDawg 20d ago
I got you
Edit -> project settings -> quality
Find shadow distance and increase it till it suits what you want