Segmented Dimming on New ML 5.3.2

I am now trying the new 5.3.2 fork of Unreal by Magic Leap.

I notice now the Segmented Dimming/Alpha through Tonemapper is hard coded to be the reverse intended alpha.

Just by it being on, without even having a post process volume, its reversed. (blank space is dimmed, and objects are not dimmed at all.)

If I add a post process volume, no matter how I configure it at all, this does not change. It's as if its being hardcoded and overwritten.

Wondering if the method has changed or if I am doing something wrong.

Also I am wondering does Segmented Dimming work on Standalone Unreal Apps yet? I have successfully gotten apps to build and run, which is great!

Thank you,

-Brandon

Hi Brandon,

Have you tried following along the guide Remote Rendering with Unreal Engine 5 | MagicLeap Developer Documentation to enable segmented dimmer with Unreal Engine? These instructions should work both on a "Stock" Unreal build as well as the Magic Leap fork.

Using Segmented dimmer for standalone Unreal apps currently has limitations (I'd prefer to let my colleagues speak to those as my specialty is Remote Rendering) but should be possible if you both disable HDR and use MSAA. Improvements for segmented dimming for on-device builds are planned in the future, but with Remote Rendering things should work in a straightforward fashion as detailed in the link.

Thanks,

Robbie

2 Likes

Oops, silly mistake on my end. My apologies.

My material was set to translucent. It must be set to opaque. I guess for the "Output Alpha" step, I assumed incorrectly that it needed to be set to Translucent. This is not the case.

MSAA allows the dimmer to work on Standalone, however its 100% opaque, not segmented.

I tried using Desktop Vulkan and Deferred Mobile Rendering and it works but its inverted like my original problem, but now my material setup is correct. I tried inverting the Opacity inputs using OneMinus and it didn't change.

Close! It's definitely possible at this point if I see it segmenting, just opposite.

Yes, it all depends on what your application submits as an alpha layer to our runtime for Remote Rendering. This is of course dependent upon post processing, shaders and other things. Our documentation I sent you covers a basic setup to get started but if you use any sort of advanced rendering features within Unreal you may have to take care of the alpha channel as well.

I have figured out remote rendering. I am talking about standalone now. It works but its reversed, like my original problem, however now my remote rendering setup is correct, but in standalone, it is reversed,

Has anyone managed to get a standalone Unreal app's segmented dimming to work properly yet? Your MSAA suggestion helped, as without it, it didn't work at all, but when I initially turned on MSAA, it activated the dimmer, but it made the entire dimmer opaque. Then I turned on Vulkan Desktop Renderer and Mobile Deferred Renderer (on Standalone!) and I see it segmenting now, but in the reverse manner. I tried to switch the alpha with OneMinus (opposite node) and I got the same result of it working, but in reverse.

After messing with an absolute treasure trove of all available Unreal mobile rendering settings, it certainly has come down to how the headset processes the segmented dimmer from Unreal.

Even if there is no post-process material at all, the segmented dimmer works in reverse. I have tried to find code in the plugins related to the segmented dimmer, in hopes to modify it myself, with no avail.

These seems to be a hardcoded problem, although hopefully an easy one? Somewhere the dimmer is told per pixel to go 0-1 and it really should 1-0 or vice versa.

Granted this would be a quick fix, I have a second post process material that adds a blue hue and slight dim to the world for the sake of a cool menu effect, and said quick fix would not work for this. Actually controlling the segmented dimmer from Post Process opacity is a different challenge to solve.

However, the quick fix would be more than enough for quite some time as its more of what is needed, opposed to wanted.

Hi Brandon,

Unfortunately, this is a known issue with no easy workaround that I'm aware of at this time. Our Unreal SDK team is aware of the problem and is tracking it internally. For all intents and purposes, segmented dimming is not supported for UE apps run natively on ML2 right now.

The issue is exactly as you describe, the alpha channel as rendered by Unreal Engine is inverted. As described in the article that Robbie mentioned, if you are using remote rendering, then you can use an infinite post processing volume to work around it by basically inverting alpha again.

However, afaik alpha is not output when post processing is enabled when packaging for Android by enabling the Mobile HDR option, so that workaround isn't an option when building an application to run natively. As you've discovered, you can get inverted alpha (and thus inverted dimming :sweat_smile:) by disabling Mobile HDR and enabling MSAA.

Best,
Adam

1 Like

I appreciate the update. Hopefully this can be solved! I am making an incredible demo!

Any chance that there is a way to screen record video with the footage and alpha/dimmer separately so I can invert it in post?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.