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

Inconsistent Realtime Shadows

Discussion in 'General Graphics' started by FlyingMollusk_Team, Sep 1, 2015.

  1. FlyingMollusk_Team

    FlyingMollusk_Team

    Joined:
    Mar 16, 2015
    Posts:
    21
    We're experiencing this odd visual inconsistency between builds of our game run on our local machines and builds of our game run on lower end graphics cards. Normally this is not an issue. Though our game runs slower at higher quality levels on lower end machines, the visuals themselves have, for the most part, been what we expected.

    Someone looking over the game for us, however, found this very odd situation which you can see in the two attached images. First, take a look at a similar camera angle from within editor. The shadows scene in this picture are real time.
    InEditor.PNG


    Now, take a look at the picture that was sent to us by the person testing our game.
    OnBuild.jpg


    As you can hopefully see from these two images, the shadows around the chess table are different between the two renders. I believe this was happening in another part of our game, but it's drifted over to this specific situation in recent days. For some reason the chest board and the white chest pieces are not casting realtime shadows. If the chess board was casting a shadow correctly, we'd of course see it's shadow on the wall. If the white chess pieces were casting their shadows correctly, we'd see a second row of shadows below the first row of shadows, which are being cast by the black pieces.

    Thus, I would like to ask this. Has anyone else experienced this where some objects in a scene decide not to cast shadows? Is this some optimization of Unity's or perhaps a limitation of the rendering? I will also note, there is no baked shadow data in the unity scene in question.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Not sure if I can help here or not, but I seem to remember another post similar to this with a similar issue.
    The problem with the other scene (memory) was the models had some odd pivots. They were not centered on the mesh, which caused the shadows to cast incorrectly.
    May want to check that.
     
  3. goonter

    goonter

    Joined:
    Aug 31, 2015
    Posts:
    89
    Does the chess table use a nonstandard shader? On low end hardware it might be falling back to a shader that doesn't cast shadows.
     
  4. FlyingMollusk_Team

    FlyingMollusk_Team

    Joined:
    Mar 16, 2015
    Posts:
    21
    Thanks for the suggestion, Goonter. The same shader is being used on the chessboard as well as the neighboring chair, and now that I look a bit more closely at the picture above, I can see that the wooden parts of the chair are also failing to cast their shadows correctly. That seems to be address the issue in this particular situation, at the very least, and gives us something to look out for in other areas.