Search Unity

Tiny mesh not projecting shadows at certain distance above any surface

Discussion in 'General Graphics' started by yosefstudios, Jan 27, 2021.

  1. yosefstudios

    yosefstudios

    Joined:
    May 8, 2015
    Posts:
    129
    A relatively tiny object on my scene is not projecting any shadows at certain distance. I tried experimenting a bit with the bias of the lights but it didn't work. I also checked the lightning settings and they were at the default settings, no lower.

    This seems to be only happening with small objects. At first glance I thought that it maybe has something to do with my geometry, but the model by itself seems to be rendering fine on Blender (it project shadows correctly). Also, is not the only model with this issue. Some other objects have that problem too (in the screenshots below there's a flashlight model from the asset store that has that too).

    If I increase the size to an unrealistic proportion of the object, the shadows seem to be working.
     

    Attached Files:

  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    This is called Peter Panning, and is a shadow map artifact that is indeed caused by biasing. You can see the same issue showing up on the box in the background. Reducing the bias on your lights should improve it, but will potentially create other issues like shadow acne. If setting the bias to 0.0 isn’t working, well, point light shadows are a pain. I think they have a built in minimum bias, for which the only built in solution to is reduce the light radius. The bias is proportional to the light’s range.

    AAA games often solve the problem of very small object shadows with screen space shadows. Or more recently ray traced shadows like the HDRP has. If you’re using the built in rendering path might try this asset:
    http://u3d.as/1qNz
     
  3. yosefstudios

    yosefstudios

    Joined:
    May 8, 2015
    Posts:
    129
    Well that's...that's honestly really sad. Guess I'll try experimenting a lot with lightning (?). Unfortunately I can't afford anything right now, but thanks for the suggestion.