-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enabling geometry variants in glTF #2005
Comments
Thanks for sharing @sanjeetsuhag @bghgary is this potentially interesting to you as a progression of MSFT_lod? |
Thanks for this proposal! One of the lingering issues I have with
Invariably, "None" ends up being the same as one of the other selections from the list, although which one is not immediately apparent to the user. It's guaranteed to be the one shown by viewers that don't support variants, however. Ideally, the extension's design would not allow for a third-wheel un-named option like this. Instead, it would ensure that one particular option was the default option, and exactly matched the selection shown by viewers that don't handle the extension. In the template glTF shown above, it looks like this proposal doesn't offer a fallback path at all. There's no default node to show when the viewer doesn't process the extension. I would think that the pristine car might be the one to show by default. If that can be added without duplicating my main issue with material variants, that would be great. One more thought: Is it easier for most engines to swap out part of the node tree? Or would it be simpler to swap out just the mesh attached to one node, allowing the node tree to remain static? Each node could have a standard mesh index and a list of variant mesh indices, perhaps. |
When using glTF models in a simulation or even on a e-commerce website, it may be useful to provide geometric variations inside a model. The KHR_materials_variants extension enables using variants in materials; this issue is for discussion on how to enable node/mesh variants in glTF.
The example I'm working with is of a car (and its components) that can have "damage states". These damage states may be:
Let's look at what could actually change between damage states, in increasing order of flexibility:
KHR_material_variants
and morph targets/animation/skinning (essentially pre-baking static poses).variants
of amesh
in anode
.variants
of anode
.Here's a snippet of a glTF where we use "switch nodes" with variants - using a simple extension inspired by
KHR_material_variants
. A "switch node" cannot have amesh
and its children can only be other switch nodes. When a variant is not selected, the0
th variant is the default.Here is a graphic for the schema above:
This is just an initial design and example. We're hoping to get some more insight on how to best achieve the functionality described. Also, discussions on other use cases for such functionality are welcome.
The text was updated successfully, but these errors were encountered: