playcanvas / playcanvas/editor
Importing a FBX animation with 0 scaled nodes/bones will cause loss of rotational data
@slimbuck is already working on this.
Since Oct 12, 2021.
- 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)
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.