-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Implement KHR_node_visibility
in the GLTF module
#93722
base: master
Are you sure you want to change the base?
Implement KHR_node_visibility
in the GLTF module
#93722
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned this proposal at the gltf meeting so I agree with it. Did not test yet.
We had a lengthy discussion of the support of the visibility extension if we make it required.
|
b8c324c
to
37f1c31
Compare
37f1c31
to
f5914c3
Compare
f5914c3
to
4daccf4
Compare
4daccf4
to
aab1a20
Compare
KHR_node_visibility
in the GLTF module
Shouldn't we wait for Khronos to approve the draft proposal before merging its implementation? If they reject it, but we merge it, we'd be stuck maintaining a non-standard extension. |
@akien-mga Indeed, we can wait for approval. I doubt this will change but I cannot absolutely guarantee that. |
We discussed on Thursday that the moment Khronos ratifies the extension we are clear to merge. |
aab1a20
to
2549d1a
Compare
Marking as draft to prevent accidental merging before ratification. However, the code is complete and ready for review (well, it has already been reviewed, but more review is welcome too). |
2549d1a
to
754fb24
Compare
Honestly, it is only a single bool, its not that deep. and, it has a lot of value to godot when blender and godot share this eye icon in the same panel. I think it's worth supporting and then hotfixing later if Khronos happen to change their mind. |
754fb24
to
d4c1816
Compare
|
d4c1816
to
7c9901f
Compare
Implements
KHR_node_visibility
KhronosGroup/glTF#2410 in Godot, which allows glTF nodes to be marked as not visible. Both import and export are supported.Details: The glTF visibility system works the same as Godot's visibility system, only affecting visuals, which makes this really easy to implement. Since this extension was extremely simple, I decided to just implement it in GLTFDocument rather than writing a GLTFDocumentExtension class for it. I also made it a required extension on export, to ensure that user assets are always rendered correctly (EDIT: Required by default, but users can customize this on export). However most scenes don't contain invisible objects, so this won't impact most scenes.
Aside from the GLTF module changes, this PR also adds 2 lines to the general scene importer code to ensure visibility is preserved when converting ImporterMeshInstance3D nodes to MeshInstance3D nodes.
Test file: cube_visibility_example.zip