KhronosGroup / glTF

glTF – Runtime 3D Asset Delivery
Other
7.02k stars 1.13k forks source link

Merge of KHR_collision_shapes extension #2370

Open eoineoineoin opened 3 months ago

eoineoineoin commented 3 months ago

Draft of an extension which describes generic, non-renderable shapes suitable for collision detection.

As discussed, we may want to add a skin property to the convex and trimesh shapes; realistically, this functionality would likely come with a performance penalty, but there are valid use-cases which would want this ability.

EricGriffith commented 1 month ago
  1. It would be great to include example usage of the schemas in the spec.

  2. both seems to be a typo here:

    As both the mesh shape

  3. The convex property name is confusing. To me, it implies that the mesh is required to be convex. I prefer the previous version where convex and mesh were separate shapes. If momentum means it they must stay combined, please use a more descriptive name like convexHull.

  4. The skin and weights properties should probably be disallowed when a mesh shape is used together with a node that uses the same mesh for rendering. Otherwise, every extension using these shapes will need to repeat the same normative text explaining the precedence of the two (node + shape) skin properties and the three (node + mesh + shape) weights properties.

npolys commented 2 weeks ago

note that in X3D

Collision for navigation can be a property on Grouping Node types

https://web3d.org/documents/specifications/19775-1/V4.0/Part01/components/navigation.html#Collision

and then there is a whole Rigid Body Physics Component for other object-object collisions https://web3d.org/documents/specifications/19775-1/V4.0/Part01/components/rigidBodyPhysics.html


From: Aaron Franke @.> Sent: Thursday, May 30, 2024 6:17 PM To: KhronosGroup/glTF @.> Cc: Subscribed @.***> Subject: Re: [KhronosGroup/glTF] Merge of KHR_collision_shapes extension (PR #2370)

@aaronfranke commented on this pull request.

The contents of this PR do not match the repo in which the extension was developed: https://github.com/eoineoineoin/glTF_Physics/tree/master/extensions/2.0/Khronos/KHR_collision_shapes/schema


In extensions/2.0/Khronos/KHR_collision_shapes/schema/glTF.KHR_collision_shapes.shape.mesh.schema.jsonhttps://github.com/KhronosGroup/glTF/pull/2370#discussion_r1621478845:

  • "skin": {
  • "description": "The index of a skin with which to deform the mesh.",
  • "allOf": [ { "$ref": "glTFid.schema.json" } ]
  • },
  • "weights": {
  • "type": "array",
  • "description": "The weights of the instantiated morph target.",
  • "minItems": 1,
  • "items": {
  • "type": "number"
  • }
  • },

I'm confused, why are skins and weights used for collision meshes? Where was the discussion on this? What is the use case?

— Reply to this email directly, view it on GitHubhttps://github.com/KhronosGroup/glTF/pull/2370#pullrequestreview-2089452159, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB2TSM72PNKRZZVZHCH2ZF3ZE6QOZAVCNFSM6AAAAABE5T5AW6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAOBZGQ2TEMJVHE. You are receiving this because you are subscribed to this thread.Message ID: @.***>