Spline IK 'Fit Curve' scaling incorrect on FBX export
#73863
Open
opened 3 years ago by Frizzil
·
13 comments
No Branch/Tag Specified
main
asset-shelf
brush-assets-project
blender-v2.93-release
blender-v3.3-release
blender-v3.4-release
xr-dev
blender-v3.2-release
blender-v3.1-release
screenshots-manual
gltf_vtree
blender-v2.83-release
blender-v3.0-release
xr-controller-support
studio-sprite-fright
asset-browser-poselib
blender-v2.92-release
blender-v2.91-release
blender-v2.90-release
greasepencil-addon
xr-world-navigation
soc-2019-openxr
blender-v2.82-release
blender-v2.81-release
filebrowser_redesign
blender-v2.80-release
blender2.7
blender-v2.79b-release
blender-v2.79a-release
blender-v2.79-release
fbx_experiments
blender-v2.78b-release
collada-2
blender-v2.78-release
rigify_fixes
fbx_io_export_ignore_parents
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76a
v2.76
v2.76-rc3
v2.76-rc1
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72
v2.72-rc1
v2.71
v2.71-rc1
v2.70a
v2.70
v2.70-rc
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.62
v2.61
v2.60a
v2.53
v2.54
v2.55
v2.56
v2.56a
v2.57
v2.57a
v2.57b
v2.58
v2.58a
v2.59
v2.60
v2.69
Labels
Apply labels
Clear labels
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/User Interface
legacy module/VFX & Video
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.92
legacy project/2.93
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.4
legacy project/Add-ons (BF-Blender)
legacy project/Add-ons (Community)
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Cloud
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Documentation
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Physics
legacy project/Game Python
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/Grease Pencil
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Blender Buildbot
legacy project/Infrastructure: Blender Web Assets
legacy project/Infrastructure: Websites
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Physics
legacy project/Pillar
legacy project/Pipeline, Assets & I/O
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Sculpt, Paint & Texture
legacy project/Straightforward Issue
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
papercut
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
straightforward issue
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
No Label
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/User Interface
legacy module/VFX & Video
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.92
legacy project/2.93
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.4
legacy project/Add-ons (BF-Blender)
legacy project/Add-ons (Community)
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Cloud
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Documentation
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Physics
legacy project/Game Python
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/Grease Pencil
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Blender Buildbot
legacy project/Infrastructure: Blender Web Assets
legacy project/Infrastructure: Websites
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Physics
legacy project/Pillar
legacy project/Pipeline, Assets & I/O
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Sculpt, Paint & Texture
legacy project/Straightforward Issue
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
papercut
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
straightforward issue
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#73863
Reference in new issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00
Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash:
blender/blender@77d23b0bd7Short description of error
FBX export of a typical Spline IK with non-uniform scaling options (e.g. Fit Curve) gives incorrect results. Baking via F3 -> Bake Action did NOT reproduce the issue.
Problem has apparently been bugging people for a while (see [this thread ]] and [ https:*www.youtube.com/watch?v=VIEfzo7iqjo | this video for an example.) A suggested fix is to duplicate the bone chain, remove all parenting and constraints from the new chain and add "Copy Transform" constraints from each new bone to the original. Due to animation baking, I can confirm this does initially appear to work, however: it removes parenting information in the final export, meaning that even with baking, blending between multiple animations will fail completely.
Exact steps for others to reproduce the error
Notice incorrect animated noodle poses.
Blend File: AnimBakeInheritScaleIgnored.blend
Broken FBX: AnimBakeInheritScaleIgnored.fbx
Expected poses: {F8342553}
Result poses: {F8342558}
Comments
I'm not familiar with the source, but in the FBX exporter plugin, a place to look may be in file fbx_utils.py , function
fbx_object_matrix, possibly not accounting for the Inherit Scale option. It's pretty hard to decipher without knowing the plugin well, however.Thanks for your time.
Added subscriber: @Frizzil
#71449 was marked as duplicate of this issue
Changed status from 'Needs Triage' to: 'Confirmed'
Thanks for acknowledging this issue, hopefully someone takes a look at it soon! If I get some time, I might see if I can get involved, though I'd specifically want to work on this problem.
Also, I haven't tested this, but I suspect it may be affecting non-uniform scale in exported animations unrelated to the Spline IK. If true, I imagine that would affect priority.
As to evaluating importance: as a game dev, this is completely blocking my ability to have "squash and stretch" animations on my main character model (which if you're Disney, is an important feature!) Anyone modeling a creature or humanoid with a tail may also be blocked by this, as evidenced by discussion of this issue on other platforms. And if it's blocking all non-uniform scale, then that's a huge feature that both UE4 and Unity support, and game developers would be missing out on.
Godspeed, Blender devs!
Added subscriber: @hufeng
I should give an update, this may help in decision-making:
I went through the trouble of cloning the Blender repo and trying to fix this issue, which turned out to involve "Non-Uniform Scale Inheritance." As it just so happens, FBXNode has an attribute for this, "TransformInheritType", that can be set to one of three values, RrSs = 0, RSrs = 1, Rrs = 2. (See here, but search for "Transformation Propagation") In the current build, it's always set to RSrs, and the output transforms implicitly assume this inheritance type as they're computed. When I modified the code to output the correct inheritance type, and compute the transform accordingly, something interesting happened. I opened it up in Unity and got this warning:
It was also very, very incorrect. I got much better results in Windows 3D Viewer, however, but still incorrect. (Ultimately I have no idea if my transforms were actually correct, but I don't know of a way to verify besides heavily modifying my game engine, which is not independently reproducible.) This leads me to believe that scale compensation is not a well supported feature, and an effort to add it to Blender might also necessitate an effort to add it to other software packages.
The best approach? We could add it to Blender but leave a checkbox to "Disable Scale Compensation", checked by default. Then everyone's happy - if some software package or game developer (like yours truly) wants to use Scale Inheritance as documented by FBX, they can; and other packages can stay the same, or migrate to the "correct" method over time.
Now, we could do nothing... but like I said before, that's a major feature that these engines claim to support, and it would be great to have for "toon-like" animation. In any case, Disney thought it was important enough to invent and publish their own algorithm for visualizing it in real-time, for artists working on Frozen .
More research should probably be done on this. Also, I can post my source changes and/or exported models with "Scale Compensation" if needed. Thanks for reading.
Added subscriber: @viadvena
Looks like Blender has big problem with scale. SplineIK, Stretch To - completely unusable and useless for export. No controlled ropes, no controlled tails. Rigify due this issue is also damaging bones and corrupt animation. It's sad that fundamental issues does not resolving for so long time. Where is Animation 2020?)
Blender can not handle standard animation tricks. I think there is no place for new features until so big issues will be resolved.
Added subscriber: @chuderluuri
I can confirm, that the Spline IK Baking is broken.
I had a fairly long chain ofbones (~30) and when baking the animation, the tip of the cian was just everso slightly off to not match with other animations.
I managed to solve it in the end by creating a second chain of bones, then clearing all the parents, and then constraining the with a "copy transform ocnstriant" to the corresponding bone in the spline ik chain.
Its an ugly hack, but it works.
Is is possible that when baking rotation (or saving it to fbx in that matter) somehow reduces accuracy in the numbers that store rotation? if so this would make sense, as small inaccuracies woul acumulate through the bone chain. but i am no expert, just a guess
Is there some hope for 3.0? This constraint doesn't work for game engines and this is big deal...
Added subscriber: @AM-1
This is not only a FBX-Export (Add-On) Problem, but also a Object > Animation > Bake Action Problem. ("Bastien Montagne (mont29) moved this task from Backlog to Long Term on the Add-ons (BF-Blender) board.")
wich is very unfortunate, because with this issue, spline IK is only usable with y-scale = original bone scale and nothing else.
Personally i need it for a game engine workflow and didnt expect it to fail at that stage.