owl-project / NVISII

Apache License 2.0
330 stars 28 forks source link

Get Bone positions from FBX file #102

Closed JBVAkshaya closed 3 years ago

JBVAkshaya commented 3 years ago

Is there a way to extract bone positions from a skeletal mesh FDX file using this library? I am trying to create a dataset for a robotic arm as done in the DREAM project using NDDS.

natevm commented 3 years ago

Hey @JBVAkshaya,

We don’t natively support bones or skin weights at the moment. TBH, I’m not entirely sure what a FBX skeletal mesh is. We do have that data importing internally, but I don’t use it yet in nvisii.

Do skeletal meshes require skin weights? Or does the skeleton just define a hierarchy of meshes and corresponding transforms?

JBVAkshaya commented 3 years ago

Hi @n8vm,

I just defined the bone hierarchy in Blender and exported the file to a skeletal mesh. Hence, I don't really know how it looks programatically. Theoretically, there may be some default skin weights exported in the file I guess.

I was wondering if there is a way we can export the json for each joint present in the robotic arm like the json exported in https://github.com/owl-project/NVISII/blob/master/examples/21.ndds_export.py for a cuboid.

natevm commented 3 years ago

Ah, yeah, a bone hierarchy in Blender defines a mechanism to deform a triangular mesh using corresponding skinned weight masks per joint. Bone hierarchies by themselves cannot be rendered directly, since they do not define geometry by themselves. If a bone hierarchy is being used to deform different parts of a mesh, that would imply there's some skinning going on, which we unfortunately don't support at the moment.

Your later question is orthogonal to the question on support for FBX joints. @jontremblay can probably help you out if you open a separate issue that's specific to NDDS.