Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Shadows not working as they should at real world scale, burry or inaccurate shadows

Discussion in 'Global Illumination' started by Renderluz, Apr 15, 2016.

?

Do you usually work at a world scale where a UnityDef cube of 1unit is the equivalent of 1 meter?

  1. Yes

    10 vote(s)
    100.0%
  2. No

    0 vote(s)
    0.0%
  1. Renderluz

    Renderluz

    Joined:
    Dec 4, 2015
    Posts:
    3
    Hello I'm creating this thread because while I have seen several threads around that sort of look into this problem, It seems they don't track that much attention from the devs, or the rest of the the community so I'm chipping in for this to gather attention since at least I'm concerned about this issue.

    Most of the answers I read are vague, very short and extremely technical, so that a non programmer is unable to follow why is that this works the way it does, since it seem its some what counter intuitive.

    Just to clarify, on the image I attached the character is firmly placed on the ground, its the shadow that is not starting at the right place, and its blockiness that makes it look as if he is not making contact with the ground, trust me I triple checked for this, also the character is 1.80 meters of height, and hes been lit by a point light on that part of the level, the point light is a torch.

    So the problem is, that if I create a scene where the scale is governed by world scale units (that is a default cube created in unity is my unit to measure things, one cube means 1 meter) the shadows of objects of 2 meters or less look extremely bad, now I don't need the shadows to be super awesome I just need them to at least start at the right place and end at a some what acceptable length, this is not the case currently, the thing that I don't quite grasp is that I would image most people would work with this scale to create a game, yet the shadows do not work unless the scale of the objects are at least 10 times as big, this means Unity is forcing you in a round about way to work on non world scale to get the shadows looking proper, but a the same time the fly mode of the camera will move painfully slow if you are traversing thought a scene with objects this big, I actually wouldn't mind having to scale all the meshes up as much, but if I do, moving around the scene becomes very cumbersome.

    I also have tried changing and re arranging all the options on the quality settings to the best of best qualities to no avail, 4 cascades, full resolution, shadow distance, shadow bias, all that has been tried, nothing works, the only thing that affects the shadow quality is how big is the mesh.

    If some one can explain to me why this is the way it is, I would be very grateful, I had been having a lot of fun using Unity, and learning a lot of interesting things, until I got this impenetrable road block,
    please let me know how to get pass it.

    Thanks for you time.
    -Luis

    shadow.jpg
     
    Last edited: Apr 15, 2016
    KWaldt likes this.
  2. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Man, I wish there was a good answer to this. Unity 5 shadows are pretty terrible and there is no real way around this issue at the moment. If you have 4 cascades on, have the first three cascades occur extremely close to the player and use 'soft shadows', in theory they shouldn't be all that gross. If you're in dire need of good shadows the best option is to simply code your own shadow renderer though.

    This guy though: http://forum.unity3d.com/threads/dynamic-volumetric-lighting-replacement.379041/page-3 is supposed to be coming out with something soon that should solve most of our problems. Pretty ridiculous though how much they're relying on the community to patch their program though.
     
  3. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,886
    It just looks like the point light is too far away. It looks like it's 20+ units away with a 20+ range. The further the point light is away, the worse the effect gets. Maybe you can try a different light setup with more torches with a smaller range.

    This is nothing special to Unity - https://forums.unrealengine.com/showthread.php?59630-Dynamic-Lighting-Shadow-Bias-problems

    Scaling the scene isn't a huge deal. I know Surgeon Simulator did this to help with thin object physics. I believe they scaled 7x bigger.