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

Consider allowing edits to glTF skin definitions #3075

Open
verma-akash opened this issue Sep 12, 2020 · 5 comments
Open

Consider allowing edits to glTF skin definitions #3075

verma-akash opened this issue Sep 12, 2020 · 5 comments

Comments

@verma-akash
Copy link

@verma-akash verma-akash commented Sep 12, 2020

Hi,
Sorry for asking sceneform related bug here but since the repo is archived didn't have other options.
This is related to the sceneform related bug google-ar/sceneform-android-sdk#1039

My question is there a way to directly use filament to find the bones position that are exported in the model and attach a another Model at that position.
Using FilamentAsset from sceneform i was able to check the entity names which included the Bones present in the model, but is there a way to attach nodes to this bone.

@DylanYasen
Copy link
Contributor

@DylanYasen DylanYasen commented Sep 12, 2020

I've never tried it. but can you getChildren() and look for your node. and then SetParent() to attach things to it?

@verma-akash
Copy link
Author

@verma-akash verma-akash commented Sep 12, 2020

The Bones are not the child nodes of Renderable. So it is not possible. In Sceneform the renderable could be set on a SkeletonNode which provide with the bone information as well and using setAttachment we could connect a different renderable to that bone position.

@prideout
Copy link
Member

@prideout prideout commented Sep 12, 2020

In the gltfio library, the mapping from joint nodes to renderables is only used in Animator::updateBoneMatrices(), and yes this mapping is immutable right now, and not exposed to Java clients. (C++ clients can peek at the raw cgltf structs.)

Note that the use of gltfio::Animator is optional; if desired you could call RenderableManager::setBones() and manually pass in any matrices you wish.

To summarize, this sounds like this is a feature request that would allow SkinVector to be readable and modifiable, both for gltfio::FilamentInstance and for gltfio::FilamentAsset.

@prideout
Copy link
Member

@prideout prideout commented Sep 21, 2020

@verma-akash are you still blocked by this? Did my summary make sense?

@verma-akash
Copy link
Author

@verma-akash verma-akash commented Sep 21, 2020

@prideout As you mentioned this is a feature request, i'll wait for the update. Thanks

@prideout prideout changed the title Missing Bones and Mesh Consider allowing edits to glTF skin definitions Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.