Examples / usd-stage

usd-stage.json

targets v1.0.0 9 entities 12 schemas

A composed OpenUSD stage as ordinary scene entities: a world vertex, a cube mesh with a PreviewSurface material, a camera, a distant light, a dome, an internal instance of the cube, a hidden locator, and an asset_ref (kind model) for the source .usda. Layers, variants, and references stay in that file - docs/usd.md.

Speaks

rig.geometry.mesh · rig.media.asset_ref · rig.meta.named · rig.render.environment · rig.render.light · rig.render.material · rig.render.visibility · rig.spatial.camera · rig.spatial.instance · rig.spatial.relationship · rig.spatial.transform · rig.spatial.vertex

Document

Validates under npm run check — raw file · open in RigPlayer — drop it in, press play, remix it, share the link.

{
  "rig": "1.0.0",
  "document": {
    "title": "USD stage",
    "defaultUnit": "cm"
  },
  "entities": [
    {
      "id": "world",
      "components": {
        "rig.meta.named": {
          "name": "World",
          "stableId": "World"
        },
        "rig.spatial.vertex": {}
      }
    },
    {
      "id": "body",
      "components": {
        "rig.meta.named": {
          "name": "Body",
          "stableId": "World/Body"
        },
        "rig.spatial.relationship": {
          "parent": "world"
        },
        "rig.spatial.transform": {
          "position": [
            0,
            50,
            0
          ]
        },
        "rig.geometry.mesh": {
          "positions": [
            -50,
            -50,
            -50,
            50,
            -50,
            -50,
            50,
            50,
            -50,
            -50,
            50,
            -50,
            -50,
            -50,
            50,
            50,
            -50,
            50,
            50,
            50,
            50,
            -50,
            50,
            50
          ],
          "indices": [
            0,
            1,
            2,
            0,
            2,
            3,
            4,
            7,
            6,
            4,
            6,
            5,
            0,
            4,
            5,
            0,
            5,
            1,
            1,
            5,
            6,
            1,
            6,
            2,
            2,
            6,
            7,
            2,
            7,
            3,
            3,
            7,
            4,
            3,
            4,
            0
          ],
          "loops": [
            0,
            1,
            2,
            3,
            4,
            7,
            6,
            5,
            0,
            4,
            5,
            1,
            1,
            5,
            6,
            2,
            2,
            6,
            7,
            3,
            3,
            7,
            4,
            0
          ],
          "loopSizes": [
            4,
            4,
            4,
            4,
            4,
            4
          ],
          "mode": "triangles"
        },
        "rig.render.material": {
          "albedoRgb": [
            0.82,
            0.78,
            0.72
          ],
          "roughness": 0.45
        }
      }
    },
    {
      "id": "camera",
      "components": {
        "rig.meta.named": {
          "name": "Camera",
          "stableId": "World/Camera"
        },
        "rig.spatial.relationship": {
          "parent": "world"
        },
        "rig.spatial.transform": {
          "position": [
            0,
            80,
            250
          ]
        },
        "rig.spatial.camera": {
          "fovYDegrees": 45,
          "nearClip": 1,
          "farClip": 1000
        }
      }
    },
    {
      "id": "sun",
      "components": {
        "rig.meta.named": {
          "name": "Sun",
          "stableId": "World/Sun"
        },
        "rig.spatial.relationship": {
          "parent": "world"
        },
        "rig.spatial.transform": {
          "rotation": [
            0.3827,
            0,
            0,
            0.9239
          ]
        },
        "rig.render.light": {
          "type": "directional",
          "intensity": 1
        }
      }
    },
    {
      "id": "sky",
      "components": {
        "rig.meta.named": {
          "name": "Sky",
          "stableId": "World/Sky"
        },
        "rig.spatial.relationship": {
          "parent": "world"
        },
        "rig.render.environment": {
          "hdri": "sky-hdr"
        }
      }
    },
    {
      "id": "sky-hdr",
      "components": {
        "rig.meta.named": {
          "name": "sky-hdr",
          "stableId": "sky-hdr"
        },
        "rig.media.asset_ref": {
          "kind": "image",
          "path": "env/sky.hdr"
        }
      }
    },
    {
      "id": "body-copy",
      "components": {
        "rig.meta.named": {
          "name": "BodyCopy",
          "stableId": "World/BodyCopy"
        },
        "rig.spatial.relationship": {
          "parent": "world"
        },
        "rig.spatial.transform": {
          "position": [
            150,
            50,
            0
          ]
        },
        "rig.spatial.instance": {
          "source": "body"
        }
      }
    },
    {
      "id": "guide",
      "components": {
        "rig.meta.named": {
          "name": "Guide",
          "stableId": "World/Guide"
        },
        "rig.spatial.relationship": {
          "parent": "world"
        },
        "rig.spatial.transform": {
          "position": [
            0,
            0,
            0
          ]
        },
        "rig.spatial.vertex": {},
        "rig.render.visibility": {
          "visible": false
        }
      }
    },
    {
      "id": "source",
      "components": {
        "rig.media.asset_ref": {
          "kind": "model",
          "path": "set.usda"
        }
      }
    }
  ]
}