KhronosGroup / glTF-InteractivityGraph-AuthoringTool

A React based DCC for viewing and authoring KHR_interactivity models
17 stars 3 forks source link

Implicit properties for nodes #7

Open hybridherbst opened 3 months ago

hybridherbst commented 3 months ago

Not sure if this should rather go into the spec readme, or here, please let me know. I find it confusing that currently, nodes must declare all their properties, and there are no default properties.

For example, this doesn't seem to be valid:

image

Is the consensus here that graphs need to be so tightly coupled to the scene that they even contain info regarding, for example, the duration of each animation as part of the nodes? (e.g. would have to set "startTime" to 0 and "endTime" to "specific value for different files").

Some questions around this:

lexaknyazev commented 3 months ago

The interactivity extension will add a few virtual helper properties to the glTF asset object model. So the endTime input socket could be connected to pointer/get pointing to something like /animations/0/endTime.

hybridherbst commented 3 months ago

Thank you! Is there a preliminary list of those somewhere?

Is the ability to bind graphs with assets at runtime considered a design goal of KHR_interactivity?

lexaknyazev commented 3 months ago

The graphs are stored inside glTF assets and use JSON pointers that make sense only within the same asset.

hybridherbst commented 2 months ago

Thanks. To translate this into a concrete answer, that means it's not a design goal for graphs to be transferrable between assets. They always need to be exported from some generator for the final asset.

(Note the pointers in the example in my original post are chosen so that they would be transferrable between animated assets, I understand that won't work in a general case.)

lexaknyazev commented 2 months ago

It's possible that some future interactivity revision would add support for truly separable graphs but it's not a goal for now.

That said, graphs could be generic enough to work with different assets even with the current design in some cases. For example, a graph could query the total number of animations, find the one with a specific duration, store its index in a custom variable, and then start the animation using that index.