question

antonchernov-8553 avatar image
0 Votes"
antonchernov-8553 asked 89893990 answered

How enable Hololens 2 Spatial mapping occlusion in Unreal Engine

Hello everyone!

I studied webinar working with unreal engine and hololens 2. This is a great lesson. And I understood how UxtTapToPlace works. But I can’t turn on the function of spatial mapping for occlusion of my Hologram. That is, so that the hologram is not visible behind real objects in my room.
I can set a solid mesh to the material for the spatial mesh, and then the holograms hide behind it, but when I hide this mesh, my hologram is always visible. Please help me!

hololens-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

HernandoRen-MSFT avatar image
0 Votes"
HernandoRen-MSFT answered HernandoRen-MSFT commented

Hello, Welcome to Microsoft Q&A,


You need to use an ARSessionConfig data asset for Spatial mapping occlusion, it is recommended to follow this step-by-step guide to add ARSessionConfig data asset first: Adding a session asset, and then, try the following steps to make the AR system render the mesh data as occlusion meshes:

  1. Open the ARSessionConfig and expand the ARSettings > World Mapping section.

  2. Check Use Mesh Data for Occlusion.




If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello!

I'm sorry! I did everything according to your instructions, but the occlusion does not work. I put on glasses and see my hologram always, through all the objects in my room.

Then I took from the MsftOpenXRGame example the blueprint spatial mapping, but it did not help either.

0 Votes 0 ·

So, you added the ARSessionConfig asset upon the official sample MsftOpenXRGame, but it still not works. Have you enabled Spatial Mapping capability by following this doc:Spatial Mapping in Unreal? If you can still reproduce the same issue with the official sample, please provide your detailed reproduce steps.

0 Votes 0 ·
89893990 avatar image
0 Votes"
89893990 answered

Hello!
Can I ask you have you fixed this issue? I met this as well and tried much times configurations. I completely follow the guidelines of the official doc.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.