Skip to main content
Skip table of contents

Manage asset living in both or moving between AR/XR

Doing more advanced composites in an AR/XR Setup where you have an element in both the AR scene and XR scene that overlap can be challenging. For opaque objects, but even more so for translucent ones.

To make the objects behave seamlessly we have added a set of tools. It will essentially hide any material in the XR world that is in front of a holdout.

Setup XRARTransferManager

  1. In the content browser navigate to Engine/Content/PixotopeTools/XRTransfer

    • you might need to check "Show Engine Content" to see it

  2. Drag an "XRARTransferManager” into the scene

    • it will automatically collect all XRHoldout actors for building the render mask

  3. To verify it is picking up the holdouts, you can enter PIE mode and look at the "XRWallDepth" texture

    • it should show the mask of the holdouts as seen in the viewport

Add GetXRARTransferOpacity to material

  1. Now that the mask is being generated, you can use the material function “GetXRARTransferOpacity” in any material and it should update automatically

    • we recommend using either masked or translucent materials

    • an example implementation can be found in the TestXRARTransferActor (it shows a cube with the XRARTransferDraw example material applied)

Test the setup

  1. Enable XR

  2. Place your own material or the test actor in the scene in front of the holdout

    It should now look something like this. The included example has one actor in front of the holdout and one behind.

Run the level in Live, Preview Live or WYSIWYG mode for this to look correct. Learn more about how to Run levels in Edit, Preview Live and LIVE mode

The XR option "Disable Custom Depth" must be disabled, as this is using custom depth. The XRARTransferManager disables this automatically.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.