- Home /
Strange shadow problem
I am having a problem with shadows in my scene. Sometimes when i zoom in or out some strange shadows appear. It's like a shadow clipping, and it's REALLY annoying. I am trying to make a city model and this is ruining my work =( I think it's a rendering bug. My terrain is 1500x1500 (Really big) and i think that's the problem. The rendering limit of the camera is a lot wide too. Is there an option that could help or something ?
I uploaded an image, maybe it can help you guys to understand.
Seriously, when i get more experience,i will NEVER help you guys '-'
Answer by HHammerite · Aug 19, 2016 at 11:18 PM
Hello Zitoox,
I've has similar problems with large terrains. My project will be using a terrain which is larger than yours. In testing I've encountered strange shadow problems much like in your screenshot. How far from the centre of the world (0, 0, 0) is this screenshot? From what I can gather with my own testing, the further away you get the worst the problem becomes. Unity have responded to this problem or something similar and plan to improve shadow accuracy in a later version of Unity. Take a look at the Unity roadmap. They've added it to their 'to-do' list. As of now the only solution I've found is too adjust the clipping planes on the camera in use. Although this isn't a solution for me as it interferes with my gameplay. I'd like to see some official response to this to be honest, seems to be affecting a fair number of people using large worlds.
Thanks, the two answers seems to work :D
I am going to test it. I can't remember, i will reply this later with all the info, but the screenshot was taken far from the terrain. I disabled the shadows of the terrain and it helped, but i still have problems with the shadow clipping in other objects. Anyway, thanks for the answer ^.^
Answer by Jessespike · Aug 19, 2016 at 08:53 PM
Looks like a shadow depth problem or perspective aliasing. I think a lot games just fade out or cull shadows after a certain distance, it's a common problem, due to software or hardware limitations. Unity has a Shadow Distance option in Quality Settings. Try increasing the shadow resolution or using shadow distances.
If you need faraway shadows to be visible while zooming, then maybe a solution is to move the camera closer instead of relying only on zooming.
Thanks, the two answers seems to work :D
I am going to test it. I don't need the shadows faraway,because they just don't appear.. I disabled the shadows of the terrain and it helped, but i still have problems with the shadow clipping in other objects. I will try to change the shadow resolution as you said. Anyway, thanks for the answer ^.^
Answer by Laiken · Feb 22, 2019 at 06:11 AM
Screenshot is not working anymore. If it's the problem I think it is, you can solve it by playing with the shadow cascade settings (project settings > quality)
Answer by not_herobrine · Jan 10, 2021 at 10:41 AM
For me, the problem was easiliy fixed in unity 2020.2 by bumping up the "shadow near plane offset" to a higher number. This option can be acessed by going into preferences -> project settings -> quality.
If there is a better solution, please do correct me.
Your answer
Follow this Question
Related Questions
Calling DispatchCompute from a command buffer removes its render target? 0 Answers
Shadow Issues, Light going through walls slightly 3 Answers
Screen.SetResolution causes a glitch for 1 frame, any way to avoid it? 4 Answers
Changing Font rendering causes font not to render 0 Answers
How do i change the Alphasorting Center to the Pivot in Meshrenderers? 0 Answers