playcanvas / playcanvas/editor

Importing a FBX animation with 0 scaled nodes/bones will cause loss of rotational data

Open
#571 2 comments 0 reactions 1 assignee View on GitHub

@slimbuck is already working on this.

Since Oct 12, 2021.

area: animation area: asset import area: gltf bug
Dominant language
TypeScript
Stars
1.3k
Forks
215
Avg merge
1d 29m
Merged PRs (30d)
30

Description

Test Files: test files 20211012-115419.zip

In test02.fbx, the node RootNode/root/local/paper_unrolled/ is scaled 0>0>0>1>1 over 5 keyframes. However, it doesn't rotate (Adobe FBX preview on the left, PlayCanvas GLB on the right)

https://user-images.githubusercontent.com/16639049/136946448-6ff0530f-4d91-41cb-930a-c4eb49106c15.mp4

Looking at the animation data for that node, we have:

Time XYZ (Eulers)
0 '0.001, 0.001, -180.000, 0.000'
0.06666667014360428 '0.001, 0.001, -180.000, 0.000'
0.10000000149011612 '0.001, 0.001, 0.000, 0.000'
0.13333334028720856 '0.001, 0.001, 0.000, 0.000'

With test03.fbx, the node is given a scale of 0.001 instead of 0. ie 0.001>0.001.>0.001>1>1 over 5 frames

This gives the following rotational data:

Time XYZ (Eulers)
0 '-179.999, -0.001, 179.999, 0.000'
0.03333333507180214 '-180.000, 0.000, -180.000, 0.000'
0.06666667014360428 '-180.000, 0.000, -180.000, 0.000'
0.10000000149011612 '-119.160, 0.000, -180.000, 0.000'
0.13333334028720856 '81.986, 0.000, 180.000, 0.000'

I believe there's an issue with our FBX Importer that is potentially doing something when the bones are scaled to 0?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.