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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

ARKit Terrain Transparency

Discussion in 'AR' started by wrutkowski, Sep 19, 2017.

  1. wrutkowski

    wrutkowski

    Joined:
    Aug 9, 2017
    Posts:
    8
    Hi, question on a terrain occlusion. I applied MobileOcclusion shader to a material and the material to a cube to cut bridge prefab and sample cube I was testing with (as seen on the screen shot).
    I have a problem with terrain occlusion though. I tried DepthMask (http://wiki.unity3d.com/index.php?title=DepthMask) but it doesn't work with ARKit - terrain and objects are not cut.
    And directions how to solve it much appreciated. My idea is to simulate the "water" with real world surfaces.
     

    Attached Files:

  2. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    You might want to check into the rendering order of terrain vs rest of scene. You might want to render terrain after the occlusion plane has rendered.
     
    wrutkowski likes this.
  3. wrutkowski

    wrutkowski

    Joined:
    Aug 9, 2017
    Posts:
    8
    That was it, thank you! I added

    "Queue" = "Geometry-9"

    to my shader tags, all working:
    TowerAR-TerrainOcclusion.png
     
    jimmya likes this.