Implement KHR_node_visibility in the GLTF module#93722
Implement KHR_node_visibility in the GLTF module#93722Repiteo merged 1 commit intogodotengine:masterfrom
KHR_node_visibility in the GLTF module#93722Conversation
fire
left a comment
There was a problem hiding this comment.
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
7c9901f to
266c520
Compare
|
My thinking at this time is we should add this to 4.5 and if KHR_mode_visibility is not released we ship it in Godot Engine 4.5. Any arguments? |
266c520 to
5b244f2
Compare
5b244f2 to
373103c
Compare
|
I think the fact that BabylonJS added visibility should be a good argument that Godot could add it as well. Is there a reason to wait for ratification? |
|
@lyuma I would be happy to go through with this. Can you give it a review/approval? |
373103c to
8459f4c
Compare
lyuma
left a comment
There was a problem hiding this comment.
Looks good.
If there is a place to write documentation, it might be good to document a bit more clearly what "Include & Required" means.
Perhaps instead of visibility mode, some terminology like "hidden nodes" might be easier for users to understand since the visibility mode only affects nodes which are hidden.
|
Thanks! |


Implements
KHR_node_visibilityKhronosGroup/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.
Test file: cube_visibility_example.zip