Forum Discussion

Thormj's avatar
Thormj
Explorer
13 days ago

Make GameObjects translucent to the Passthru?

For debugging and for a few specific bits (I want to make a Leia hologram in my scene), I'd love to have the gameobjects be translucent (alpha fine) to the passthru images.

If I "just set alpha," the gameobjects are transparent to themselves... but they still block all of the passthru...

So... is there a way to make a hologram in your living room that works?

3 Replies

  • Degly's avatar
    Degly
    Start Partner

    Well, in Unity on Quest 3 you can’t make a mesh literally transparent to passthrough if Passthrough is in Overlay mode; regular alpha transparency still blocks the camera feed because of how the compositor orders layers.

    If you want a “hologram in your room” effect that blends with passthrough you have to:

    • Set your OVR Passthrough Layer to Underlay
    • Use a transparent/additive shader with ZWrite off on your Leia hologram mesh

    That way your object will blend into the passthrough instead of occluding it. If you need more information let us know!

  • Okay, the Passthru Building Block seems to have done the Underlay bit (though it says that that is "deprecated").

    I altered the shader Meta/Lit to Off with

            _ZWrite("__zw", Float) = 3.0 // auto | force enabled | force disabled -- was 1.0

    And that works well!

    Is there a reason not to do that for "the shader" (and let the material color translucency be "applicable to both in-game and reality" [keep it at opaque for things that should be opaque -- to both in-game and reality]), or should I make a special shader "Meta-Lit-Holo" and tell the material on the holo to use that?

     

  • Err... weird.  It's only translucent if you have a UI Overlay screen in front of it (looking through a debug screen or a menu).  Otherwise it's solid.

    I tried putting the object on Layer 1 [TransparentFX] and no change.

    I tried putting the object on Layer 5 [UI Overlay] to match the menu...
    and it went invisible, so I change the opacity to 160 still completely invisible...
    changed opacity to 255...still invisible.

    So... I'm still lost...

→ Find helpful resources to begin your development journey in Getting Started

→ Get the latest information about HorizonOS development in News & Announcements.

→ Access Start program mentor videos and share knowledge, tutorials, and videos in Community Resources.

→ Get support or provide help in Questions & Discussions.

→ Show off your work in What I’m Building to get feedback and find playtesters.

→ Looking for documentation?  Developer Docs

→ Looking for account support?  Support Center

→ Looking for the previous forum?  Forum Archive

→ Looking to join the Start program? Apply here.

 

Recent Discussions