- Home /
(FIXED) How to remove Unity 5 shadow artifacts?
Hello fellow Unity3D developers,
Ever since we moved our game to Unity 5, we have been experiencing horrible shadow artifacts away from the center of the map, no matter what shadow setting we turn the game to, whether it's the resolution, or the cascading, or the hard/soft shadows, or the bias. The farther away from the center of the map, the more prominent the artifacts. Toning the normal bias down fixes the bug where the shadows show up inside houses, however it does not fix the main problem. The problem is demonstrated here at about 1km from the center of the map:
http://i.gyazo.com/b891964fdce9d923618bc9b6a5796848.mp4
However, the shadows are significantly more stable at the center of the map, shown here:
http://gyazo.com/2221cb72ce56a5b89c0e11e327cb0907
This is a major problem for our game, since we have only made one island, which is 2.5km by 2.5km, and we are planning to have around 10 islands in the future which will enable when the player is close enough to them. However, since the shadow becomes more bugged out as the player gets farther away from the center, the shadows will be completely messed up once the player reaches other islands.
If you have any suggestion on how to fix or improve the situation, please suggest an answer. Any help is greatly appreciated.
Thanks, William, Luton Studios
Answer by LutonStudios · Jul 17, 2015 at 07:34 PM
I managed to fix this by setting the near clip camera plane to a higher value. Previously it was set to 0.01, since we don't want the camera to clip through gun models when aiming.
Thanks, Luton Studios.
Answer by Zarod · May 24, 2017 at 01:43 PM
@LutonStudios a bit late but firstly, consider moving the entire scene as the player moves (if you don't want to load a different scene).
Don't make it a big single scene, do so only if you are going to use something like dynamic loadlevel, but for game design i would suggest to manage connected closed enviroments ( like windwaker) rather than big open world but that's my opinion i don't know your team or skills.
Secondly if those are going to be islands i would suggest to create a prefab to load in every scene with a low resolution terrain rapresenting every island and positioning it at the correct location. Without colliders, high quality textures eccetera, you will be able to see them from a distance with little to no impact on gpu and cpu. it can be positioned 10 units under your high quality island terrain you are on so you can see the others far away.
Good luck with your project.