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

Add physics materials and filtering similar to KHR/MSFT physics #226

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

aaronfranke
Copy link
Member

Preview: https://github.com/aaronfranke/gltf-extensions/tree/msft-style-mat-filter/extensions/2.0/OMI_physics_body

These changes add physics materials and filtering very similar to Eoin's Microsoft/KHR physics repo here: https://github.com/eoineoineoin/glTF_Physics

I did not include any example files for these. However, this is not so important because the goal here is alignment with the other spec. Also, these are not easy to implement in Godot Engine, since it uses per-body filtering instead of per-shape (which is worse btw), and its physics materials work differently (worse), so it's difficult to support these features there. For both it can still be done, but not so cleanly, and I haven't had time yet to do it.

As part of alignment, this PR also adds a new "gravityFactor" property to motion. This was discussed as desired and added to MSFT physics a long time ago, but I guess we missed that before now.

I also did some minor formatting changes, such as changing * unordered lists to - to match Khronos style, and reordering properties to match the contents of Eoin's repo.

@eoineoineoin
Copy link

Aaron brought my attention to this from a PR in KHR_physics_rigid_bodies and I'd like to drop in a comment to say I'm a little disappointed to see this.

While it's great that this specification is converging on KHR_physics_rigid_bodies, this repo now contains large chunks which have been copied verbatim from KHR_physics_rigid_bodies.

I think having two identical-but-different specifications results in unnecessary user confusion, fragmentation, and interoperability problems, which ultimately hurts users and the glTF ecosystem. I'd ask you to please reconsider where energy is best expended.

@aaronfranke aaronfranke force-pushed the msft-style-mat-filter branch 2 times, most recently from 6b86b4c to da6c49a Compare August 1, 2024 22:33
@aaronfranke aaronfranke requested review from fire and antpb August 22, 2024 22:17
@antpb
Copy link
Contributor

antpb commented Aug 22, 2024

Hey @eoineoineoin ! I just want to be clear that our efforts here are not in an attempt to be a KHR spec or conflict with one, we are experimenting within the OMI vendor extension and aligning on the needs we have in our implementations. While, it is nice whenever an extension we rally behind works for wider groups and can be ratified at the KHR level, it is not our focus. I don't think its fair to ask that we reconsider working on this. We work within the OMI space to move fast and learn from implementations of our specs.

@aaronfranke aaronfranke force-pushed the msft-style-mat-filter branch from da6c49a to ef7a655 Compare October 31, 2024 03:07
@yankscally yankscally self-requested a review November 5, 2024 23:52
Copy link

@yankscally yankscally left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so, I'm working on this blender level editor addon, bless. I use OMI extensions for physics for the level geometry.

I am well up to scratch with OMI_physics_body so any new changes are obvious to me, and I read through the collision filters and physics materials here. On a technical level its all sound, and I would be happy using this.

About collision filters and physics materials being in the body extension: I am quite torn, they are good ideas to have them as accessible data, but one or both could be a separate extension. They both have busy systems, and they are both optional in many cases. They both also hold lots of complex data also. These days I'm really against super monolithic extensions like KHR_interactivity.

Modular components seem way more attractive. What if you want collision filters and physics materials without the body for some reason?
I disagree with MSFT decision to have these properties in the body extension anyway. I made a issue over there in that repository.

For the sake of progress, I agree with and approve of this review, but I would like to keep working and perfecting the physics extensions to make them more modular and well-rounded for all applications.

@aaronfranke aaronfranke merged commit b5c4de1 into omigroup:main Nov 29, 2024
2 checks passed
@aaronfranke aaronfranke deleted the msft-style-mat-filter branch November 29, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants