Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update interactivity and anchoring extensions (schemas and readme files) #21

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 190 additions & 6 deletions extensions/2.0/Vendor/MPEG_node_anchor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,199 @@ Written against the glTF 2.0 spec.

## Overview

MPEG_node_anchor provides ...
---------------------------------------
<a name="reference-mpeg_anchors_extension"></a>
### MPEG_node_anchors_extension

**`MPEG_node_anchor` Properties**
MPEG scene and node anchor is used to anchor a scene/node to the viewer's real-world environment.

* **JSON schema**:
**`MPEG_node_anchors_extension` Properties**

| |Type|Description|Required|
|---|---|---|---|
|**trackables**|`trackable` `[1-*]`|Contains a list of trackable used in the scene| &#10003; Yes|
|**anchors**|`anchor` `[1-*]`|Provides a list of anchors for a scene or for root nodes to enable AR anchoring| &#10003; Yes|

Additional properties are allowed.

* **JSON schema**: [MPEG_node_anchor.schema.json](./schema/MPEG_node_anchor.schema.json)

#### MPEG_anchors_extension.trackables

Contains a list of trackable used in the scene

* **Type**: `trackable` `[1-*]`
* **Required**: &#10003; Yes

#### MPEG_anchors_extension.anchors

Provides a list of anchors for a scene or for root nodes to enable AR anchoring

* **Type**: `anchor` `[1-*]`
* **Required**: &#10003; Yes



---------------------------------------
<a name="reference-trackable"></a>
### MPEG_node_anchor.trackable object

Trackable schema

**`MPEG_node_anchor.trackables object` Properties**

| |Type|Description|Required|
|---|---|---|---|
|**type**|`integer`|the type flag may take one of the following values: TRACKABLE_FLOOR=0, TRACKABLE_VIEWER=1, TRACKABLE_CONTROLLER=2, TRACKABLE_GEOMETRIC=3, TRACKABLE_MARKER_2D=4, TRACKABLE_MARKER_3D=5, TRACKABLE_MARKER_GEO=6, TRACKABLE_APPLICATION=7| &#10003; Yes|
|**path**|`string`|a path that describes the action space as specified by OpenXR. <br/>Required if type is 2.|No, default: |
|**geometricConstraint**|`integer`|the geometricConstraint flag may take one of the following values: HORIZONTAL_PLANE=0, VERTICAL_PLANE=1. <br/>Required if type is 3.|No|
|**markerNode**|`number`|Index to the node in the nodes array in which the marker geometry and texture are described. <br/>Required if type is 4 or 5|No|
|**geoCoordinate**|`number`|index to geo coordinate item in array in MPEG_GEO_COORDINATES extension. <br/>Required if type is 6.|No|
|**trackable_id**|`string`|An application-defined trackable id, that is known to the application.<br/>Required if type is 7|No|

Additional properties are allowed.

* **JSON schema**: [MPEG_node_anchor.trackable.schema.json](./schema/MPEG_node_anchor.trackable.schema.json)

#### trackable.type

the type flag may take one of the following values: TRACKABLE_FLOOR=0, TRACKABLE_VIEWER=1, TRACKABLE_CONTROLLER=2, TRACKABLE_GEOMETRIC=3, TRACKABLE_MARKER_2D=4, TRACKABLE_MARKER_3D=5, TRACKABLE_MARKER_GEO=6, TRACKABLE_APPLICATION=7

* **Type**: `integer`
* **Required**: &#10003; Yes
* **Allowed values**:
* `0`
* `1`
* `2`
* `3`
* `4`
* `5`
* `6`
* `7`

#### trackable.path

a path that describes the action space as specified by OpenXR

* **Type**: `string`
* **Required**: No, default:

#### trackable.geometricConstraint

the geometricConstraint flag may take one of the following values: HORIZONTAL_PLANE=0, VERTICAL_PLANE=1

* **Type**: `integer`
* **Required**: No
* **Allowed values**:
* `0`
* `1`

#### trackable.markerNode

Index to the node in the nodes array in which the marker geometry and texture are described

* **Type**: `number`
* **Required**: No

#### trackable.geoCoordinate

index to geo coordinate item in array in MPEG_GEO_COORDINATES extension

* **Type**: `number`
* **Required**: No

#### trackable.trackable_id

An application-defined trackable id, that is known to the application.

* **Type**: `string`
* **Required**: No
---------------------------------------
<a name="reference-anchor"></a>
### MPEG_node_anchor.anchor object

Anchor schema

**`MPEG_node_anchor.anchor object` Properties**

| |Type|Description|Required|
|---|---|---|---|
|**trackable**|`number`|Index of the trackable in the trackables array that will be used for this anchor| &#10003; Yes|
|**requiresAnchoring**|`boolean`|if TRUE, the application shall skip the virtual assets attached to this anchor until the pose of this anchor in the real world is known. If FALSE, the application shall process the virtual assets attached to this anchor.| &#10003; Yes|
|**minimumRequiredSpace**|`array[]`|Space required to anchor the AR asset (x, y, z in meters). This space corresponds to an axis-aligned bounding box expressed in the trackable local space. This value shall be compared to the bounding box of the real available space determined by the application.|No, default: `[0,0,0]`|
|**aligned**|`integer`|the aligned flag may take one of the following values: NOT_USED=0, ALIGNED_NOTSCALED=1, ALIGNED_SCALED=2. If ALIGNED_SCALED is set, the bounding box of the virtual assets attached to that anchor is aligned and scaled to match the bounding box of the real available space determined by the application.|No, default: `0`|
|**actions**|`array[]`|Indices of the actions in the actions array of the interactivity extension to be executed once the pose of this anchor is determined. An example is a setTransform action to place the virtual assets attached to that anchor.|No|
|**light**|`integer`|Reference to an item in the lights array of the MPEG_lights_texture_based extension.|No|
|**extensions**|`extension`|JSON object with extension-specific objects.|No|
|**extras**|`extras`|Application-specific data.|No|

Additional properties are allowed.

* **JSON schema**: [MPEG_node_anchor.anchor.schema.json](./schema/MPEG_node_anchor.anchor.schema.json)

### anchor.trackable

Index of the trackable in the trackables array that will be used for this anchor

* **Type**: `number`
* **Required**: &#10003; Yes

### anchor.requiresAnchoring

if TRUE, the application shall skip the virtual assets attached to this anchor until the pose of this anchor in the real world is known. If FALSE, the application shall process the virtual assets attached to this anchor.

* **Type**: `boolean`
* **Required**: &#10003; Yes

### anchor.minimumRequiredSpace

Space required to anchor the AR asset (x, y, z in meters). This space corresponds to an axis-aligned bounding box expressed in the trackable local space. This value shall be compared to the bounding box of the real available space determined by the application.

* **Type**: `array[]`
* **Required**: No, default: `[0,0,0]`

### anchor.aligned

the aligned flag may take one of the following values: NOT_USED=0, ALIGNED_NOTSCALED=1, ALIGNED_SCALED=2. If ALIGNED_SCALED is set, the bounding box of the virtual assets attached to that anchor is aligned and scaled to match the bounding box of the real available space determined by the application.

* **Type**: `integer`
* **Required**: No, default: `0`
* **Allowed values**:
* `0`
* `1`
* `2`
* `3`
* `4`

### anchor.actions

Indices of the actions in the actions array of the interactivity extension to be executed once the pose of this anchor is determined. An example is a setTransform action to place the virtual assets attached to that anchor.

* **Type**: `array[]`
* **Required**: No

### anchor.light

Reference to an item in the lights array of the MPEG_lights_video_based extension.

* **Type**: `integer`
* **Required**: No

### anchor.extensions

JSON object with extension-specific objects.

* **Type**: `extension`
* **Required**: No
* **Type of each property**: Extension

### anchor.extras

Application-specific data.

* **Type**: `extras`
* **Required**: No

* [MPEG_scenenode_anchor.anchor.schema.json](./schema/MPEG_scenenode_anchor.anchor.schema.json)
* [MPEG_scenenode_anchor.schema.json](./schema/MPEG_scenenode_anchor.schema.json)
* [MPEG_scenenode_anchor.trackable.schema.json](./schema/MPEG_scenenode_anchor.trackable.schema.json)

## Known Implementations

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"title": "MPEG_node_anchor.anchor object",
"type": "object",
"description": "Anchor schema",
"properties": {
"trackable": {
"description": "Index of the trackable in the trackables array that will be used for this anchor",
"type": "number"
},
"requiresAnchoring": {
"description": "if TRUE, the application shall skip the virtual assets attached to this anchor until the pose of this anchor in the real world is known. If FALSE, the application shall process the virtual assets attached to this anchor.",
"type": "boolean"
},
"minimumRequiredSpace": {
"description": "Space required to anchor the AR asset (x, y, z in meters). This space corresponds to an axis-aligned bounding box expressed in the trackable local space. This value shall be compared to the bounding box of the real available space determined by the application.",
"type": "array",
"default": [
0, 0, 0
]
},
"aligned": {
"description": "the aligned flag may take one of the following values: NOT_USED=0, ALIGNED_NOTSCALED=1, ALIGNED_SCALED=2. If ALIGNED_SCALED is set, the bounding box of the virtual assets attached to that anchor is aligned and scaled to match the bounding box of the real available space determined by the application.",
"type": "integer",
"enum": [
0, 1, 2, 3, 4
],
"default": 0
},
"actions": {
"description": "Indices of the actions in the actions array of the interactivity extension to be executed once the pose of this anchor is determined. An example is a setTransform action to place the virtual assets attached to that anchor.",
"type": "array"
},
"light": {
"description": "Reference to an item in the lights array of the MPEG_lights_texture_based extension.",
"type": "integer"
},
"extensions": {},
"extras": {}
},
"allOf": [{ "$ref" : "glTFProperty.schema.json" }],
"required": [
"trackable",
"requiresAnchoring"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"title": "MPEG_node_anchor_extension",
"type": "object",
"description": "Scene anchor",
"properties": {
"trackables": {
"type": "array",
"description": "Contains a list of trackable used in the scene",
"items": {
"type": "object",
"$ref": "MPEG_node_anchor.trackable.schema.json"
},
"minItems": 1
},
"anchors": {
"type": "array",
"description": "Provides a list of anchors for a scene or for root nodes to enable AR anchoring",
"items": {
"type": "object",
"$ref": "MPEG_node_anchor.anchor.schema.json"
},
"minItems": 1
}
},
"required": ["trackables","anchors"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"title": "MPEG_node_anchor.trackable object",
"type": "object",
"description": "Trackable schema",
"properties": {
"type": {
"type": "integer",
"enum": [ 0, 1, 2, 3, 4, 5, 6, 7],
"description": "the type flag may take one of the following values: TRACKABLE_FLOOR=0, TRACKABLE_VIEWER=1, TRACKABLE_CONTROLLER=2, TRACKABLE_GEOMETRIC=3, TRACKABLE_MARKER_2D=4, TRACKABLE_MARKER_3D=5, TRACKABLE_MARKER_GEO=6, TRACKABLE_APPLICATION=7",
"default": 0
},
"path": {
"type": "string",
"description":"a path that describes the action space as specified by OpenXR",
"default": ""
},
"geometricConstraint": {
"type": "integer",
"enum": [0, 1],
"description": "the geometricConstraint flag may take one of the following values: HORIZONTAL_PLANE=0, VERTICAL_PLANE=1"
},
"markerNode": {
"description": "Index to the node in the nodes array in which the marker geometry and texture are described",
"type": "number"
},
"geoCoordinate": {
"description": "index to geo coordinate item in array in MPEG_GEO_COORDINATES extension",
"type": "number"
},
"trackable_id": {
"description": "An application-defined trackable id, that is known to the application.",
"type": "string"
}
},
"allOf": [
{
"if": { "properties": {"type" : {"const": 2} } },
"then": { "required": ["path"] }
},
{
"if": { "properties": {"type" : {"const": 3} } },
"then": { "required": ["geometricConstraint"] }
},
{
"oneOf": [
{
"if": { "properties": {"type" : {"const": 4} } },
"then": { "required": ["markerNode"] }
},
{
"if": { "properties": {"type" : {"const": 5} } },
"then": { "required": ["markerNode"] }

}
]
},
{
"if": { "properties": {"type" : {"const": 6} } },
"then": { "required": ["geoCoordinate"] }
},
{
"if": { "properties": {"type" : {"const": 7} } },
"then": { "required": ["trackable_id"] }
}
],
"required": ["type"]
}

This file was deleted.

Loading