Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Problem lighting shader in game

Discussion in 'Unity MARS' started by Spaekz, Aug 11, 2020.

  1. Spaekz

    Spaekz

    Joined:
    Jun 17, 2020
    Posts:
    12
    Hello, I'm facing a problem with Unity MARS and the built-in pipeline. I've created a shader using Amplify, this shader uses World Position and Vertex Normal Node. I applied it on the sample of the MARS NavMesh, the material works well on Scene, Device View, Simulation View but not on the game view. All of the white color became transparent except the differents stains. Is there any solution solution for this kind of texture ?

    Software versions :
    Unity MARS 1.0.2
    Unity 2019.3.15f1
     

    Attached Files:

  2. Spaekz

    Spaekz

    Joined:
    Jun 17, 2020
    Posts:
    12
    The problem was about the lighting in the game, is there a solution to handle lights across the camera of the smartphone?
     
  3. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    Lighting answer: "GameObject > MARS > Visualizers > Light Estimation Visualizer"
    (configures a MARSLightEstimationVisualizer onto your directional light, and respects the AR lighting configuration. FYI, works way better if you update ARF to 4.0).

    The particular issue you are having looks to be related to "Z fighting", the "vertex normal mode" offset seems to be offsetting into the floor, try offseting it above the floor.
     
  4. Spaekz

    Spaekz

    Joined:
    Jun 17, 2020
    Posts:
    12
    Thanks a lot for your answer. I will update ARF in my project. Before installing it, is there any known issues with the newest version of ARF because MARS dependency seems to be ARF 2.1.8 ?
     

    Attached Files:

  5. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
  6. Spaekz

    Spaekz

    Joined:
    Jun 17, 2020
    Posts:
    12
    Hello, unfortunaly after few tries the app of the camera doesn't work (just a black screen) and the settings appears to be the same.
     
  7. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297