# Validating files for Reality Composer Pro

**URL:** <https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039>\
**Category:** USD\
**Tags:** realitykit, beginner\
**Created:** [December 10, 2023, 1:53pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039 "2023-12-10T13:53:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![CampbellMcG](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/campbellmcg/32/100_2.png) [@CampbellMcG](https://forum.aousd.org/u/CampbellMcG)\
**Post date:** [December 10, 2023, 1:53pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/1 "2023-12-10T13:53:51Z")

</div>

I’d like to make sure I’m validating all my USD Files, and I want to understand how to set these in Maya. The following USD asset appears to import and work well in Reality Composer Pro, but I wanted to check the following failures from running `usdchecker`

 ![Screenshot 2023-12-10 at 8.44.21 AM](https://us1.discourse-cdn.com/flex016/uploads/aousd/original/1X/37b799e20e62d2356525c3820cc27be941f18efe.jpeg)

```auto
> usdchecker shaderBall_2023_maya_v3.usdc --arkit                      
Stage does not specify an upAxis. (fails 'StageMetadataChecker')
Stage has missing or invalid defaultPrim. (fails 'StageMetadataChecker')
The stage uses 3 layers. It should contain a single usdc layer to be compatible with ARKit's implementation of usdz. (fails 'ARKitRootLayerChecker')
Failed!

```

- **upAxis** - this seems to be set when exporting from Blender, but not from Maya.
- **missing or invalid defaultPrim** - I’m not clean on what need to be done correct this
- **uses 3 layers** - how much of a concern is this? I imagine I’m doing to need multiple layers in my scenes.

I can edit the upAxis and probably others directly in the USD Files, but I wanted to see if there was something else I should considering when creating these assets in Maya.

Of note, I had another error when using a .usda file (“missing linear scale”, which is in one of the sub layers) but it went away when converting to a .usdc. I assume this is expected.

---

<div class="post-metadata">

**Author:** ![BigRoyNL](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/bigroynl/32/413_2.png) [@BigRoyNL](https://forum.aousd.org/u/BigRoyNL)\
**Post date:** [December 11, 2023, 12:08pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/2 "2023-12-11T12:08:11Z")

</div>

> [@CampbellMcG](#):
>
> **missing or invalid defaultPrim** - I’m not clean on what need to be done correct this

To set the stage’s default prim via the UI I believe you need MayaUSD 0.26.0 - see [this issue](https://github.com/Autodesk/maya-usd/issues/3335).

![image](https://us1.discourse-cdn.com/flex016/uploads/aousd/original/1X/a0aecb76f44712a818f7d444bd29be4eb7b5c302.png)

> [@CampbellMcG](#):
>
> **upAxis** - this seems to be set when exporting from Blender, but not from Maya.

Good question. I can’t seem to find how to set it through the UI - nor is there an existing MayaUSD Issue about it either. So it could be good to create one and request a way to set the up axis, (or force maya to set it on the root layer?)

For the time being you could set the stage’s up axis via e.g. this Python script. Select the stage shape (or one of its prims) and run this:

```python
from maya import cmds
import mayaUsd
from pxr import UsdGeom

def get_selected_stage():
    for path in cmds.ls(selection=True, ufeObjects=True, long=True):
        proxy = path.split(",", 1)[0]
        stage = mayaUsd.ufe.getStage("|world" + proxy)
        if stage:
            return stage
    raise RuntimeError("No proxy found in selection")

stage = get_selected_stage()
axis: UsdGeom.Tokens = UsdGeom.Tokens.y
print(f"Setting up axis for '{stage.GetRootLayer().GetDisplayName()}' to {axis}")
UsdGeom.SetStageUpAxis(stage, axis)

```

This only seems to be an issue with the proxy shape layers.  
Exporting just a geometry cube does include it, e.g. resulting in:

```usda
#usda 1.0
(
    defaultPrim = "pCube1"
    metersPerUnit = 0.01
    upAxis = "Y"
)

def Mesh "pCube1" (
    kind = "component"
)
{
    uniform bool doubleSided = 1
    float3[] extent = [(-0.5, -0.5, -0.5), (0.5, 0.5, 0.5)]
    int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
    int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4, 4, 5, 7, 6, 6, 7, 1, 0, 1, 7, 5, 3, 6, 0, 2, 4]
    point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)]
}

```

If you include a `mayaUsdProxyShape` in a “Export selected” in that way but interestingly enough that does not include the contents of the proxy shape by default at all - so isn’t a viable workaround either.

> [@CampbellMcG](#):
>
> **uses 3 layers** - how much of a concern is this? I imagine I’m doing to need multiple layers in my scenes.

This sounds workflow specific to USDZ files (and maybe even for Reality Composer Pro). I’m not sure what the recommendations are on that front.

---

<div class="post-metadata">

**Author:** ![CampbellMcG](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/campbellmcg/32/100_2.png) [@CampbellMcG](https://forum.aousd.org/u/CampbellMcG)\
**Post date:** [December 11, 2023, 1:23pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/3 "2023-12-11T13:23:19Z")

</div>

@BigRoyNL thanks for this, I’ll give these steps a try this week. I appreciate you sharing that script!

I’m not in front of Maya at the moment, but I have 2024.2 installed. I have been having issues getting MayaUSD running, and I’m blocked with building openUSD on a Silicon mac. I’ve posted a comment on their forums [here](https://github.com/PixarAnimationStudios/OpenUSD/issues/2854), but I’m not sure whether it’s a me thing, or a them thing.

---

<div class="post-metadata">

**Author:** ![BigRoyNL](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/bigroynl/32/413_2.png) [@BigRoyNL](https://forum.aousd.org/u/BigRoyNL)\
**Post date:** [December 11, 2023, 2:41pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/4 "2023-12-11T14:41:04Z")

</div>

Any reason you’re not just trying to use one of the releases: [Releases · Autodesk/maya-usd · GitHub](https://github.com/Autodesk/maya-usd/releases) ?

> I have been having issues getting MayaUSD running

Could you elaborate on these issues? Is it USD building issues? Or maya USD specific issues? If the latter, those issue reports can best go to the maya usd repository.

---

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [December 11, 2023, 5:51pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/5 "2023-12-11T17:51:53Z")

</div>

> [@BigRoyNL](#):
>
> This sounds workflow specific to USDZ files (and maybe even for Reality Composer Pro). I’m not sure what the recommendations are on that front.

This is actually an extraneous test today. I’ll put up a PR soonish to remove some of the older tests that aren’t relevant anymore.

---

<div class="post-metadata">

**Author:** ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)\
**Post date:** [December 11, 2023, 6:12pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/6 "2023-12-11T18:12:41Z")

</div>

Also, I’m sure the case where Maya is not authoring `upAxis` is just an oversight - would you report it on their UsdMaya developer forums?

---

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [December 11, 2023, 7:07pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/7 "2023-12-11T19:07:33Z")

</div>

PR to update the checker for ARKit is here [Cleanup arkit checks by dgovil · Pull Request #2863 · PixarAnimationStudios/OpenUSD · GitHub](https://github.com/PixarAnimationStudios/OpenUSD/pull/2863)

---

<div class="post-metadata">

**Author:** ![BigRoyNL](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/bigroynl/32/413_2.png) [@BigRoyNL](https://forum.aousd.org/u/BigRoyNL)\
**Post date:** [December 11, 2023, 8:09pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/8 "2023-12-11T20:09:23Z")

</div>

> [@spiff](#):
>
> Also, I’m sure the case where Maya is not authoring `upAxis` is just an oversight - would you report it on their UsdMaya developer forums?

Reported here: [Saving layers/stage from MayaUsdProxyShape does not author Up Axis · Issue #3510 · Autodesk/maya-usd · GitHub](https://github.com/Autodesk/maya-usd/issues/3510)

---

<div class="post-metadata">

**Author:** ![CampbellMcG](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/campbellmcg/32/100_2.png) [@CampbellMcG](https://forum.aousd.org/u/CampbellMcG)\
**Post date:** [December 12, 2023, 12:19pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/9 "2023-12-12T12:19:07Z")

</div>

@dhruvgovil Thanks for that quick update to the checker!

@BigRoyNL … the reason is that I did not know it was an option. Thank you! I’m still finding my way here. And thanks for reporting the `upAxis` issue.

However, I don’t see how to install this for 2024.2. I have run through the install process, and Maya looks to be still picking up 0.25. I can see 0.26 is installed for 2022. I don’t see any options in the installer, and I have never used Maya 2022 on this machine. I’ll post this also on the mayaUSD repo.

 ![Screenshot 2023-12-12 at 7.07.55 AM](https://us1.discourse-cdn.com/flex016/uploads/aousd/original/1X/db84c625d623e9062960e9db1e1872c467d96d51.jpeg)

---

<div class="post-metadata">

**Author:** ![BigRoyNL](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/bigroynl/32/413_2.png) [@BigRoyNL](https://forum.aousd.org/u/BigRoyNL)\
**Post date:** [December 12, 2023, 12:57pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/10 "2023-12-12T12:57:11Z")

</div>

@CampbellMcG that looks to me like you picked the highest/top Mac OS version from the release list - which is the installer for Maya 2022. You should pick the lower one (click “Show all assets”) and pick the one relevant for Maya 2024.2.

It should be [this one](https://github.com/Autodesk/maya-usd/releases/download/v0.26.0/MayaUSD_0.26.0_Maya2024.2_MacOS.dmg)

---

<div class="post-metadata">

**Author:** ![CampbellMcG](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/campbellmcg/32/100_2.png) [@CampbellMcG](https://forum.aousd.org/u/CampbellMcG)\
**Post date:** [December 12, 2023, 1:42pm UTC](https://forum.aousd.org/t/validating-files-for-reality-composer-pro/1039/11 "2023-12-12T13:42:24Z")

</div>

Yep. That’s exactly what I did 🤦🏻‍♂️  
Everything is working as it should. Thanks for your help and patience!
