Search Unity

How to light objects correctly in 360 photo/video skybox scenes so they look real?

Discussion in 'AR/VR (XR) Discussion' started by MaxXR, Jul 24, 2018.

  1. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Hey all
    How does one setup lighting etc in Unity so that virtually added objects to a 360 photo or video scene look like they're really there – because this is super important for a POC we're trying to build?

    For eg – how can we make the sphere look like it was there in the sky when the 360 photo/video was taken?

    ARCore & ARKit api's provide Light Estimation which is great for real-time apps. Is there something similar for a Unity scene - i.e. light estimation from a skybox to correctly light objects? Played around with a sun/directional light for a while and am unable to get anything that looks real so your advice would be super appreciated ;)

    Many thanks
    M

    PS. am using assets from for the purposes of this qn (unable to show actual assets as client agreement) https://blogs.unity3d.com/2018/01/1...active-360-video-download-our-sample-project/
     
  2. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    It should be integrated by default as long as you have a skybox material/map equivalent to the background photo,
    and make sure Realtime Ambient is turned on in Lighting settings.
    (And Lighting source and Reflection source is set to skybox)

    (and also that the material is checked off for realtimeGI, if it is a custom shader)

    I don't think the GI approximation is "super good" by default, but it's okay'ish.

    A few tricks is to set turn off specular highlights in the material (if under forward rendering(default)).
    And adjust the directional light to match the skybox color and direction and brightness.
    For overcast, you might as well not use any lights and leave the shadows to AO, and just increase the Intensity multiplier in Lighting tab.



    Post processing : https://github.com/Unity-Technologies/PostProcessing
    Matte Shadow : https://github.com/keijiro/ShadowDrawer
     
    JoeStrout likes this.
  3. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Awesome thanks @Kemonono for your helpful response!
    That's much better.

    Do you also perchance know if there's a way to add custom effects to part of the 360 texture feeding the material that feeds your cubemap skybox?
    For example, let's say upon an event you wanted to make all your grass in your image flash blue?
    Many thanks
    M
     
    Last edited: Jul 25, 2018
  4. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    No, not that I know of.

    If I was tasked with that challenge, I would probably make a sphere with inverted normals in 3dsmax to import in unity and use a backdrop. And make a custom shader for that object with something like Amplify Shader or Shader Graph (last one is available under Window -> Package Manger .. or something like that), where I could feed inn a custom mask for effects or key out a channel.