Transparency issue with virtual objects 3D objects become black at zero transparency

Unity Editor version:2022.3.11f1
ML2 OS version:1.11.0

■Issue
・We are developing an application using Unity that overlays virtual 3D objects onto real-world structures.

・When we decrease the transparency of these 3D objects, it becomes difficult to see the real-world objects clearly behind them.

・Additionally, when we set the transparency to zero, the 3D objects turn completely black.

■Ideal behavior
・When transparency is set to 0, the 3D objects should become completely invisible.

・When transparency is set to a small value (e.g., 0.1), both the real-world objects and the virtual 3D objects should be visible clearly.

・This behavior was working correctly on HoloLens 2 using the same code.

Is there any recommended method or workaround to achieve the same behavior on Magic Leap 2?

■Current findings and considerations:
・We’ve identified that the issue is related to the DepthBuffer and ZWrite settings. How
ever, turning these off requires manually controlling the rendering order of complex 3D model materials, which we’d like to avoid.

・Is there a way or recommended workaround to achieve the desired transparency behavior without manually adjusting rendering orders?

I’m not sure I understand the issue. Is the issue that the segmented dimmer remains enabled even when the transparency is disabled? Are you seeing the same behavior in the headset as you are in the Mixed Reality capture?

What Render Pipeline do you use? (Build in, URP)

Which Shader do you use for the materials? If you use a custom shader, what did you set “Blend”, ZWrite, and the Tags (Queue,RenderType) to?

Which Rendering Mode do you use in the material (Transparent or Fade)? If its a lit material, do you have a directional Light?

Do you use the MRTK CameraSettingsManager, and if so how did you configure it (same for Camera Background)?

Does the Transparency work in the UnityEditor?

I had no issues with transparency so far :sweat_smile:

1 Like