# Brightness vs Transparency

**URL:** <https://forum.magicleap.cloud/t/brightness-vs-transparency/2910>\
**Category:** Unity Development\
**Tags:** unity\
**Created:** [November 23, 2023, 2:27am UTC](https://forum.magicleap.cloud/t/brightness-vs-transparency/2910 "2023-11-23T02:27:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhhqu0305](https://avatars.discourse-cdn.com/v4/letter/z/a9a28c/32.png) [@zhhqu0305](https://forum.magicleap.cloud/u/zhhqu0305)\
**Post date:** [November 23, 2023, 2:27am UTC](https://forum.magicleap.cloud/t/brightness-vs-transparency/2910/1 "2023-11-23T02:27:00Z")

</div>

I'm not sure whether it's appropriate to ask - but how is transparency implemented in Magic Leap 2? I have the following observations:

1. If set an `Lit` Material to be opaque, we are still able to see real-world objects behind it.
  - If using the "transparent" option, even if set alpha to be 255, still able to see the object behind

2. If disable "auto brightness" and manually adjust the brightness level, the object behind cannot be seen when using high enough brightness level.
  - When luminance level of the room is high, still will be able to see the object behind.
  - Auto brightness seems to decrease the brightness when room luminance level is decreased, and it kind of keep the object behind always visible to us as long as there's at least "some" light in the room.

Considering the nature of optical see through devices, I'm a bit confused of whether brightness adjustment is kind of doing the same thing as adjusting transparency level. For example, would it essentially be the same, as for ML2 implementation, when we (1) increase the value of the Alpha channel of a material and (2) increase the brightness of that virtual object, or the entire scene (if there's only one virtual object in the scene).

I'm referring to [this link](https://www.azooptics.com/Article.aspx?ArticleID=2165) when I try to model transparency implementation. s ML2 essentially decreasing the amount of light coming from the virtual object to a user when the object is made to be more transparent, which is similar to making it less bright?

If that kind of a question isn't appropriate, maybe my equivalent question is, would it be the same, when the environmental light is controlled at the same level, to (1) increase the brightness and (2) decrease the Alpha value of that material? I'm not very familiar with physics, but based on a conversation with a friend this seems to be possible. If would be very helpful if you could answer my question.

BTW, I have tried your segmented dimming feature and that's really cool. I can see how it blocks light from a certain location that we could control. Then maybe a "opaque" game object, given that it's not actually completely blocking my view to the real world, isn't really blocking light?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [November 27, 2023, 10:25pm UTC](https://forum.magicleap.cloud/t/brightness-vs-transparency/2910/2 "2023-11-27T22:25:50Z")

</div>

Hi @zhhqu0305,

> [@zhhqu0305](#):
>
> how is transparency implemented in Magic Leap 2?

Magic Leap devices have additive displays, which take the light within a user’s environment and add photon to the display, making it possible to render content.

> [@zhhqu0305](#):
>
> If set an `Lit` Material to be opaque, we are still able to see real-world objects behind it

It is not possible to completely obscure objects due to the see through implementation of the headset. If you want to get as close to fully obscuring the object as possible, we recommend using the [Global/Segmented Dimmer](https://developer-docs.magicleap.cloud/docs/guides/features/dimmer-feature/).

> [@zhhqu0305](#):
>
> Auto brightness seems to decrease the brightness when room luminance level is decreased, and it kind of keep the object behind always visible to us as long as there's at least "some" light in the room.

It is possible to [turn off auto-brightness](https://www.magicleap.care/hc/en-us/articles/8994136341005-Display-Settings#:~:text=Auto%2DBrightness%3A%20Toggling%20auto%2Dbrightness%20on%20allows%20the%20device%20to%20adjust%20brightness%20automatically%20based%20on%20the%20lighting%20in%20your%20current%20environment.) on the Magic Leap 2 Device.

> [@zhhqu0305](#):
>
> I'm a bit confused of whether brightness adjustment is kind of doing the same thing as adjusting transparency level.

This is correct. Decreasing the brightness of the headset lowers the maximum amount of light allowed to show on the device. Decreasing the alpha of an object decreases the amount of light that that object displays as a portion of the brightness level of the device.

> [@zhhqu0305](#):
>
> Then maybe a "opaque" game object, given that it's not actually completely blocking my view to the real world, isn't really blocking light?

The headset itself blocks some light when using the segmented dimmer, etc. Objects that are rendered add light to the headset which may obscure objects behind it slightly but not entirely.

Best,

El

---

<div class="post-metadata">

**Author:** ![zhhqu0305](https://avatars.discourse-cdn.com/v4/letter/z/a9a28c/32.png) [@zhhqu0305](https://forum.magicleap.cloud/u/zhhqu0305)\
**Post date:** [November 28, 2023, 5:48pm UTC](https://forum.magicleap.cloud/t/brightness-vs-transparency/2910/3 "2023-11-28T17:48:01Z")

</div>

Thanks so much for your clarification! It's interesting to know that transparency and brightness adjustment are kind of the same thing. I might have a follow up question though - if brightness does the same thing, what about the "emission" property of Unity materials? It seems that all materials are already a "source of light" in AR, then if we enable emission and set the "HDR color" to something like (255, 255, 255), is it more "opaque" compared to a (10, 10, 10) RGB color? Or equivalently, when we change this HDR color from (10, 10, 10) to (255, 255, 255), does it have the same effect as increasing the "Alpha" value?

Thanks!

---

<div class="post-metadata">

**Author:** ![etucker](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/etucker/32/842_2.png) [@etucker](https://forum.magicleap.cloud/u/etucker)\
**Post date:** [November 28, 2023, 9:45pm UTC](https://forum.magicleap.cloud/t/brightness-vs-transparency/2910/4 "2023-11-28T21:45:26Z")

</div>

[Emission](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterEmission.html#:~:text=Adding%20emission%20to,.) makes materials act as light sources. It does not cause the mesh to appear more or less opaque.
