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

Shadows are not being displayed

Discussion in 'AR/VR (XR) Discussion' started by Rafael-Barbosa, Jul 30, 2015.

  1. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    Hello, I just got my hands on the oculus rift, and the first thing I experienced is that in the editor the game runs with shadows very nicely. But as soon as I start the game, shadows go away and colors become crappy. I thought this was a oculus related thing, but when I donloaded a free oculus game I realized that it has something to do with my unity settings. I would say that oculus is ovewriting my current unity config. The game should be on "Fantastic" Quality but it turns into "Fastest" everytime I hit play. Builds do the same thing.

    Any help would be apreciated. Thanks

    - Rafael
     
  2. Kevin.Ferravanti

    Kevin.Ferravanti

    Joined:
    Aug 31, 2012
    Posts:
    18
    A screenshot of your quality settings would probably clear things up quickly.
    Some things to check:
    1. Make sure the default checkbox for your build type is set to "Fantastic"
    2. Make sure Shadows are enabled for that default setting
    3. Make sure the light in your scene has shadows enabled
    4. Make sure you're using the right light type for your render settings (i.e. Forward Rendering is only directional shadows, point lights will not cast shadows ... unless that changed)

    If all of that checks out perfectly, I'd recommend trying only 1 quality setting
     
  3. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    All of those options are correct.
    Here is the screenshot of my Quality settings :
    render.png
    And right beneath is a screenshot of the same scene without any changes in play mode.
    ingame.png

    Shadows do work, the problem is that when I press play, they go away and the scene just becomes ugly.
     
  4. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    I just found the solution, For some reason, oculus rift's Assets change the default resolution and Quality settings. I'm going to dig around and find the right script, if I find it, I'll post how to fix it here so anyone else who get's this issue can easely fix :)
     
  5. Kevin.Ferravanti

    Kevin.Ferravanti

    Joined:
    Aug 31, 2012
    Posts:
    18
    ahh you're using the plugin still; good luck with your fix!
     
  6. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    I had to, when I exported the game without it, it had no oculus support. Even thought it had "Virtual Reality" Enabled :/
     
  7. Kevin.Ferravanti

    Kevin.Ferravanti

    Joined:
    Aug 31, 2012
    Posts:
    18
    I see; well right now the only real benefit of using UnityVR is that it has shadow pass optimizations. Other than that it's lacking a lot of the features the plugin has, but they'll come over time.