-
Notifications
You must be signed in to change notification settings - Fork 1.2k
MAXAR_collision_geometry #2087
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
Closed
erikdahlstrom
wants to merge
4
commits into
KhronosGroup:main
from
erikdahlstrom:MAXAR_collision_geometry
Closed
MAXAR_collision_geometry #2087
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # MAXAR_collision_geometry | ||
|
|
||
| ## Contributors | ||
|
|
||
| * Erik Dahlström, Maxar, [@erikdahlstrom](https://github.com/erikdahlstrom) | ||
| * Sam Suhag, Cesium, [@sanjeetsuhag](https://github.com/sanjeetsuhag) | ||
|
|
||
| ## Status | ||
|
|
||
| Draft | ||
|
|
||
| ## Dependencies | ||
|
|
||
| Written against the glTF 2.0 spec. | ||
|
|
||
| ## Overview | ||
|
|
||
| In gaming and simulation engines, high resolution 3D models are often paired with decimated versions of the model that are optimized for use in rigid-body physics. These collision volumes are the union of a set of convex polyhedra. This extension to glTF enables designating meshes as collision volumes for other meshes. | ||
|
|
||
| ## Adding Collision Meshes | ||
|
|
||
| The following example illustrates how a mesh can designate another mesh as its collision volume: | ||
|
|
||
| ```json | ||
| "meshes": [ | ||
| { | ||
| "name": "Detailed Car Mesh", | ||
| "primitives": [ | ||
| { | ||
| "attributes": { | ||
| "POSITION": 0, | ||
| "NORMAL": 1 | ||
| }, | ||
| "indices": 2 | ||
| } | ||
| ], | ||
| "extensions": { | ||
| "MAXAR_collision_geometry": { | ||
| "mesh": 1 | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "name": "Box Collision Mesh", | ||
| "primitives": [ | ||
| { | ||
| "attributes": { | ||
| "POSITION": 3, | ||
| }, | ||
| "indices": 4 | ||
| } | ||
| ] | ||
| }, | ||
| ] | ||
| ``` | ||
|
|
||
| ### Mesh Requirements | ||
|
|
||
| This extension enforces the following rules on the relationships between meshes: | ||
|
|
||
| 1. Two or more meshes may use the same mesh as a collision mesh. | ||
| 2. A mesh may not designate itself as its collision mesh. | ||
| 3. A mesh with a collision mesh must not have morph targets. | ||
| 4. A collision mesh must not have morph targets. | ||
| 5. At runtime, the node transformation of a mesh must be applied to its collision mesh. | ||
|
|
||
| ### Primitive Requirements | ||
|
|
||
| This extension enforces the following rules on the primitives inside a collision mesh: | ||
|
|
||
| 1. Primitives in a collision mesh must have the POSITION attribute. | ||
| 2. Primitives in a collision mesh must use the TRIANGLES primitive mode. | ||
| 3. Each primitive inside a collision mesh must represent a convex polyhedron. | ||
|
|
||
| ## Optional vs. Required | ||
|
|
||
| This extension is considered optional, meaning it should be placed in the glTF root's `extensionsUsed` list, but not in the `extensionsRequired` list. | ||
|
|
||
| ## Schema Updates | ||
|
|
||
| - **glTF mesh extension JSON schema**: [mesh.MAXAR_collision_geometry.schema.json](schema/mesh.MAXAR_collision_geometry.schema.json) | ||
26 changes: 26 additions & 0 deletions
26
...ions/2.0/Vendor/MAXAR_collision_geometry/schema/mesh.MAXAR_collision_geometry.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-04/schema", | ||
| "title": "MAXAR_collision_geometry mesh extension", | ||
| "type": "object", | ||
| "description": "Collision volumes for a mesh.", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "glTFProperty.schema.json" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "mesh": { | ||
| "allOf": [ | ||
| { | ||
| "$ref": "glTFid.schema.json" | ||
| } | ||
| ], | ||
| "description": "The index of the mesh to use as a collision volume." | ||
| }, | ||
| "extensions": {}, | ||
| "extras": {} | ||
| }, | ||
| "required": [ | ||
| "mesh" | ||
| ] | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.