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

Proposal pull transforms and bones from accessor (partially possible through extensions) #462

Closed
ParticlePeter opened this issue Oct 26, 2015 · 6 comments

Comments

@ParticlePeter
Copy link

Motivation: Looking at glTf from the OpneGL standpoint, in respect to instanced drawing and MultiDrawInderect, its nice to have (a huge amount of) transforms available as a binary chunk, directly upload-able to a TBO/UBO/SSBO.

Changes possible via extension:

  • geometry, camera, light and skin pull data by index from an accessor
  • multiple indices for instanced drawing (in shader possibly accessible by DrawID and InstanceID)
  • works for global transforms, but local transforms must be resolved:

When local transformation is required (possible via extension):

  • RootNode has an accessor reference, index and child nodes
  • ChildNodes reference only accessor index and optional child nodes
  • No other data is stored in nodes

To evaluate the hierarchy:

  • apply animation to all (gloabl and local) transforms
  • traverse nodes, pull local transform data by index and compute global transforms
  • upload global transforms to a GPU buffer or access indexed to set a uniform variable

Required (minimal) changes to the Spec, supply alternatives via extensions (accessor and index):

  • animation.channel.target make 'id' and 'path' properties optional
  • skin make 'jointNames' optional

Interested in such an extension? Draft and example files can follow.

@pjcozzi
Copy link
Member

pjcozzi commented Oct 28, 2015

Thanks for the input, @ParticlePeter. Can you please provide a minimal JSON example?

@ParticlePeter
Copy link
Author

Yes, will do, need some time for this. Would be a cube mesh transformed by three matrices enough?

@pjcozzi
Copy link
Member

pjcozzi commented Oct 28, 2015

Sure, thanks!

@pjcozzi
Copy link
Member

pjcozzi commented Dec 23, 2017

@lexaknyazev any thoughts on this?

@ParticlePeter
Copy link
Author

ParticlePeter commented Dec 26, 2017

Sorry that the example never reached this place, it actually did in proposal/issue #889 which is an evolution of this one here. The flat_nodes_proposal.zip demonstrates the same concept but via spec changes.

Only addition would be that a node can have either transformation data or reference the data via accessor. In the case of global transforms meshes could directly source their data from accessors.

@pjcozzi
Copy link
Member

pjcozzi commented May 8, 2019

This is something we can consider for the next major glTF revision, but we are not currently actively discussing this.

@pjcozzi pjcozzi closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants