Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    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

    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.