Skip to main content
Version: 12 Dec 2024

Tips for USD Composer

This guide provides details for how to get best results for scene origin and rendering quality when working with USD Composer and Magic Leap 2. Scene origin is used to place content in the space of the scene you are working with. Topics covered:

Physical World USD Anchor

This section goes over your options for how to place content from your scene in physical space to get your desired results when streaming with Magic Leap 2.

In the AR panel in USD Composer, navigate from Advanced Settings to Navigation Settings. From here, you can see the available options for setting up the USD world origin in space when streaming to the Magic Leap 2 headset.

Physical World USD Anchor

In the drop-down next to Physical World USD Anchor, you can select Active Camera, Scene Origin, or Custom USD Anchor.

Active Camera attempts to match the initial pose of the Magic Leap 2 headset's display to that of the scene viewport camera when you first click Start AR.

The Scene Origin mode positions the scene world origin at the initial location of the Magic Leap 2 headset. As with Active Camera, this is gravity-aligned and snaps to the floor. This mode results in the origin being positioned on the floor, but orientation is more difficult to control. If you connect to your Magic Leap 2 headset using adb, you can use the following adb command to quickly reset the orientation:

adb shell reset-headpose

Custom USD Anchor display the same behavior as Scene Origin, however Custom USD Anchor allows you to enter a prim path, the transform of which defines the location where the Magic Leap 2 headset is initially located relative to everything else in the scene (instead of assuming that the scene origin is located at the initial location of the Magic Leap 2 device).

note

For Active Camera, when the floor is detected, the origin snaps to the floor. For the user, they will perceive that they teleported upwards. You can counter this effect by posing the viewport camera so that it is positioned near y=0.

You can avoid this issue happening altogether by launching USD Composer from the command line with the following command line argument:

omni.create.bat --/xr/system/openxr/use_true_pose=true

Be aware that using this setting changes the behavior across all options, not just Active Camera. For example, if you use the Scene Origin option, content no longer snaps to the floor.

AR Rendering Quality Presets

If your rendering output looks different on Magic Leap 2 than in the view window for USD Composer, this section helps you fine tune settings to get the output to match.

If you notice that content is not rendered correctly, you can try adjusting the Quality Preset in the AR panel.

Quality Preset in AR Panel

Here is what the different quality types look like using a simple example featuring two reflective surfaces and a torus. You can compare and choose what works best for your project.

Stage Setting
Quality Setting
Balanced Setting
Performance Setting