Search Unity

Daydream Renderer Looks Great in Editor, Black/Dark in Build

Discussion in 'Daydream' started by duncangroberts, May 23, 2017.

  1. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Hi there,

    I'm trying to use the daydream renderer tool to try and get performance improvements in a project and whilst it all looks great in the editor, I'm just seeing wither black or very very dark materials in a build on my pixel. Is there something I'm doing that's obviously wrong? I'm not quite sure how daydream renderer should work in conjunction with standard unity lighting settings, so if there's an obvious reason it would be great to know.

    If you need any more information please do let me know and I'll get screengrabs, details etc.

    Thanks,

    Duncan
     
  2. Dirly

    Dirly

    Joined:
    Mar 24, 2013
    Posts:
    19

    Don't suppose you could provide a screen shot. If its black, your shader might just be supporting directx instead of GL. If you're using shaderforge that isn't turned on as default with new shaders.
     
  3. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    First, thanks for trying out the Daydream Renderer!
    Now it sounds like there is a problem with the lighting system - did your version of DDR come from https://github.com/googlevr/daydream-renderer-for-unity?

    If you can open the inspector of a render-able object, expand the materials, and capture a screen grab that would helpful.
    If you have an asset you can post or describe how you produced the problem that also be very helpful.
     
    Last edited: May 24, 2017
  4. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Hi there,

    Thanks so much for getting back to me! I'm really enjoying using daydream renderer and the performance improvements it's giving me in the editor are great so with this problem resolved I'll be over the moon with it!

    Please be aware, I'm fairly new to developing so there is a high chance I have made a rookie error!

    I did download the daydream renderer from the github link you provided.

    I'm attaching various screengrabs:

    Some console errors I am receiving that may be part of the issue:

    Console.JPG

    The Directional Light I have in the scene:

    Dlight.JPG

    One single GameObject in my scene that uses a daydream renderer material and shader:

    InspectorObjectfirsthalf.JPG InspoectorObjectsecondhalf.JPG

    The Lighting Window:
    Lighting Window.JPG

    Need a new post for the rest of the images!
     
  5. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    And now a view of the game window in the editor:

    Game.JPG

    And the same view as a screengrab from my Pixel XL:

    Screenshot_20170524-081424.png

    Any help you can provide is very much appreciated!

    Would it be beneficial to export the project in a unity package for you to have a look at? I'm more than happy to do this as I'm a simple hobbyist having a bit of fun!

    Thanks so much,

    Duncan
     
  6. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    I'm happy to hear you find the Daydream Renderer useful, the performance improvements should translate to device as well :)
    Yes those are some interesting errors, since it is possible, exporting a unity package would really help to resolve this quickly
    Also, are you on Mac or Windows?
     
  7. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    After some testing I think the solution for you may be to turn on the 'Normal Map' option. Even though you don't have a normal map a default value will be assumed. It seems there may be a permutation issue which I'm tracking down but I think this will get you working with minimal impact.
     
  8. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
  9. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Hi @tirichards

    You're a legend. Turning on normal map has worked and it looks great now. Let me know if there's anything arising from looking at the unity package that you want me to try out or anything else I can do.

    Thanks so much for your help.

    Duncan
     
  10. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    That's great! And thanks for the package, at this point I think I understand the problem and will be working to release a fix, thanks for reporting this issue :)
     
  11. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Thanks @tirichards , happy to help and let me know if there's anything else I can do!
     
  12. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    So just a quick update, a patch was recently released to fix this issue. Again, thanks for the feedback!
     
  13. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
  14. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Hi, I see the new commit on Master about this thread, but where can we download the patch/new release? There is just the original release at: https://github.com/googlevr/daydream-renderer-for-unity/releases.
     
  15. mat9054

    mat9054

    Joined:
    Nov 14, 2015
    Posts:
    42
    I have a few issues with daydream renderer. I looks great but I am unable to build apk. When I try to build, I get :

    http://imgur.com/a/egYaA
    Note that first error is always printing in console but I am still able to enter play mode.

    Second, I cannot bake lighting with vertex. I made sure to convert my materials both the static and dynamic, daydream vertex lighting is also enabled. I gut stuck on baking meshes

    http://imgur.com/a/RqDT5
     
  16. mat9054

    mat9054

    Joined:
    Nov 14, 2015
    Posts:
    42
  17. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    Since it was a hotfix it should have just updated the original release, so downloading that should include the patch. Please let me know if there is a problem.
     
  18. tirichards

    tirichards

    Joined:
    Aug 2, 2016
    Posts:
    10
    Hi thanks for your interest in the Daydream Renderer! The first error makes me think there is a shader permutation issue going on, and the static lighting issue is a bit mysterious at this point. Is there a particular mesh that it may be hanging on that you can share? Or perhaps even a test scene? Also a quick rundown of system specs would be helpful are you on Mac/PC are you testing on a Pixel phone or something else? I will try to duplicate based on your provided screen shots but I will probably need some more information, thanks!