Hi,
Using the built-in VR/SpatialMapping/Occlusion shader renders the mesh black when using the built-in video recorder. It looks and the occlusion works just fine within the application.
Similar to this post Occlusion shaders rendering black in video recordings, the difference is that I am using URP as recommended
Unity Editor version: 2022.3.7f1 ML2 OS version: v1.4.0-dev1 MLSDK version: v1.4.0-dev1 Host OS: Windows
Hi @etucker
Thanks for your reply.
Do you have any update on this issue? Recording is the only way of communicating our work to stakeholders, we need to fix this as soon as possible.
Thank you
Apologies for the inconvenience that this issue has caused. We are working on trying to find a workaround or fix for you as soon as possible. We cannot provide a concrete timeline for this though. I'll be sure to have more eyes on this issue as well.
Hi @petrebasura
A workaround I have found when recording videos on the ML is to use a transparent shader on the mesh material instead of the occlusion material. You lose the occlusion of course, so it won't work if that's what you're specifically trying to capture. But at least you get something without the large black mesh in the background.
The occlusion shader that you're using is a Unity shader? Is it URP?
It is possible to create a custom occlusion shader that will not have this issue. While we are working to provide a shader that does not cause this issue to occur while recording, we recommend creating an opaque shader that writes to the depth buffer as usual, writes black to the color buffer, and writes 0 for the alpha in the meantime.
A transparent material does not solve this bug. Unfortunately at the current state the Magic Leap 2 recording does not work for occlusion feature -- one of the most important features.
Please, keep us informed if there is any solution.
Update @kbabilinski shared with me the solution to this problem: adding the 'segmented dimmer' render feature to the URP settings
For this, follow the following: Segmented dimming - Unity Learn