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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Shadow pattern made with light through transparent texture

Discussion in 'General Graphics' started by GFFG, Aug 25, 2016.

  1. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Hi,

    I made a model of a spaceship in Maya and imported it into unity as an .fbx. It has windows and in my scene I have a directional light.

    My problem is that when the light comes through the windows, it leaves a prefect pattern of what seems to be tiny 'x' shaped shadows on the floor. (windows are in the ceiling and the directional light comes down through the windows and hits the floor).

    I've read about shadow acne but I believe this is something different because it only happens when the light has to shine through windows. How can I make these strange shadows disappear without turning off shadows altogether?

    The windows are a standard shader set to transparent.

    with soft shadows it's less visible but still strange looking. Does anybody know what the problem is?
     
    Sludgemonster likes this.
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,248
    This is a property of Unity's standard shader. Real time shadows from semi-transparent objects are hard to do well, so Unity tries to do stippled shadows with the standard shader. There's not a way to turn it off on the shader or material apart from using a different shader, but you can just turn off shadow casting on the renderer assuming the windows are a separate object from the rest of the model.
     
    Last edited: Aug 26, 2016
    Sludgemonster likes this.
  3. GFFG

    GFFG

    Joined:
    Nov 13, 2014
    Posts:
    224
    Thanks for clarifying this. Unfortunately the windows aren't separate objects from the rest of the ship but I could make them become separate objects though.

    I hope these shadows will be better looking with Unity updates in the near future.

    Thanks again :)
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,248
    They won't be. Not trying to be an ass to Unity, but shadows are a difficult problem for which there is no perfect real time solution to. Unity's shadows could use a bit of updating, and I'm sure there's some work being done to polish some of the problems (like shadows on really large areas, and maybe transparencies receiving shadows), but shadows from transparent objects isn't likely to be one of the areas of improvement unless they choose to include much more expensive shadowing options.