Scaling armature from smaller size to scale 1 results in broken animations (IPO not updated?) and non-connected bones is pose is not rest one. #41699

Closed
opened 2014-09-03 15:25:01 +02:00 by Joey Ferwerda · 26 comments
Member

System Information
Ubuntu 14.04 Gnome Edition on Intel HD 4000 and
Debian Sid (updated to latest packages) with Nvidia GTS 8600

Blender Version
Broken: All (Tested on 2.71 and 2.69)
Worked: Never

Short description of error
Somewhere between missing functionality and a Bug, it seems that if your armature is scaled to negative values (not tested with positive but should give the same result) and apply the scale in object mode (back to 1,1,1), the animation keyframes do not get scaled accordingly.
It seems the IPO information is not translated, and the functionality to convert that seems to be missing.

This has been a issue for quite a long time, exporting models to other formats (ie, game engines requiring scale 1 for things like parent relations), and multiple reports could be found on the Blenderartists forum (example of matching description is http://blenderartists.org/forum/archive/index.php/t-195566.html)

Exact steps for others to reproduce the error
Take any model with Armature and animations, scale in object mode (to get big visual results scale to 0.019 or something like that), apply the scale in object mode, play a animation in pose mode.

**System Information** Ubuntu 14.04 Gnome Edition on Intel HD 4000 and Debian Sid (updated to latest packages) with Nvidia GTS 8600 **Blender Version** Broken: All (Tested on 2.71 and 2.69) Worked: Never **Short description of error** Somewhere between missing functionality and a Bug, it seems that if your armature is scaled to negative values (not tested with positive but should give the same result) and apply the scale in object mode (back to 1,1,1), the animation keyframes do not get scaled accordingly. It seems the IPO information is not translated, and the functionality to convert that seems to be missing. This has been a issue for quite a long time, exporting models to other formats (ie, game engines requiring scale 1 for things like parent relations), and multiple reports could be found on the Blenderartists forum (example of matching description is http://blenderartists.org/forum/archive/index.php/t-195566.html) **Exact steps for others to reproduce the error** Take any model with Armature and animations, scale in object mode (to get big visual results scale to 0.019 or something like that), apply the scale in object mode, play a animation in pose mode.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @TheOnlyJoey

Added subscriber: @TheOnlyJoey

#41743 was marked as duplicate of this issue

#41743 was marked as duplicate of this issue
Author
Member

Someone on IRC pointed out that my description was not quite clear on the values.
I did not try with negative values, just with values below 1 (so 0.019)

Someone on IRC pointed out that my description was not quite clear on the values. I did not try with negative values, just with values below 1 (so 0.019)

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Please attach a simple file with the armature and sample animation. This is all time that can be spared from the developer that can look at it.

Please attach a simple file with the armature and sample animation. This is all time that can be spared from the developer that can look at it.
Author
Member

http://www.pasteall.org/blend/31368 example blend
To reproduce a simple case:
First check the walk animation, then apply the scale of the armature in object mode, then play animation again.

http://www.pasteall.org/blend/31368 example blend To reproduce a simple case: First check the walk animation, then apply the scale of the armature in object mode, then play animation again.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2014-09-03 17:00:24 +02:00

Thanks for the report, but there is no bug here, this was never intended to work - when you apply transforms, you move them from object level to "data" level - animation remains on object level, so it is now applied over a new "data" base, you can't expect this to work.

Thanks for the report, but there is no bug here, this was never intended to work - when you apply transforms, you move them from object level to "data" level - animation remains on object level, so it is now applied over a new "data" base, you can't expect this to work.
Author
Member

Added subscriber: @mont29

Added subscriber: @mont29
Author
Member

@mont29: I disagree about this not being a bug, although I can accept from a developers point of view that this is not intended to work originally. It is unexpected behaviour and I think this should be addressed.

This is a big problem though, since this basically produced garbage and the fastest way of achieving this is using a external modeller (export, import in other tool, scale, export, import back in blender), which is not ideal.
Some external (game) engines require the scale of your objects to be 1,1,1 upon import, or otherwise rescale or ignore your model, or in some cases use the scale for setting parent relations (which results in even more unexpected behaviour).

@mont29: I disagree about this not being a bug, although I can accept from a developers point of view that this is not intended to work originally. It is unexpected behaviour and I think this should be addressed. This is a big problem though, since this basically produced garbage and the fastest way of achieving this is using a external modeller (export, import in other tool, scale, export, import back in blender), which is not ideal. Some external (game) engines require the scale of your objects to be 1,1,1 upon import, or otherwise rescale or ignore your model, or in some cases use the scale for setting parent relations (which results in even more unexpected behaviour).

Added subscriber: @PeteX-2

Added subscriber: @PeteX-2

◀ Merged tasks: #41743.

◀ Merged tasks: #41743.

@mont29 As you say, applying a transform pushes it down one level. However, even in the current implementation, I don't think it just pushes it from the object to the data layer. The scale of child objects seems to be changed, so they don't unexpectedly grow or shrink when the parent's scale is applied.

Bearing this in mind, isn't it most logical to say that applying a transform moves it from the object to everything that is one level below? It already pushes it from the object to the object's child objects and underlying data block. Wouldn't it be reasonable to say that it should be pushed to the underlying animation strip as well?

It's also hard to think of a case where the current behaviour is helpful. (Note that if there are multiple copies of the armature, you can't apply the scale anyway. You couldn't have a problem where you apply the scale to one copy of an armature and break the other copies.) On the other hand, as @TheOnlyJoey pointed out, there are certainly uses for the other behaviour.

(Of course I respect your decision not to change this behaviour. In an open source project, the person who writes the code has to be the one who makes the decisions! And thank you for the time you have spent writing code, by the way.)

@mont29 As you say, applying a transform pushes it down one level. However, even in the current implementation, I don't think it *just* pushes it from the object to the data layer. The scale of child objects seems to be changed, so they don't unexpectedly grow or shrink when the parent's scale is applied. Bearing this in mind, isn't it most logical to say that applying a transform moves it from the object to everything that is one level below? It already pushes it from the object to the object's child objects and underlying data block. Wouldn't it be reasonable to say that it should be pushed to the underlying animation strip as well? It's also hard to think of a case where the current behaviour is helpful. (Note that if there are multiple copies of the armature, you can't apply the scale anyway. You couldn't have a problem where you apply the scale to one copy of an armature and break the other copies.) On the other hand, as @TheOnlyJoey pointed out, there are certainly uses for the other behaviour. (Of course I respect your decision not to change this behaviour. In an open source project, the person who writes the code has to be the one who makes the decisions! And thank you for the time you have spent writing code, by the way.)

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

OK, so checked a bit more on this, and compared with what happens when applying scale to an object having children:

  • Static position of children is updated to keep same 'visual transform'
  • But with animation, fcurves are not updated, so result looks broken.

I maintain anim part is not a bug, at most a TODO/feature request, but rather hard to make it working ok in all cases imho.

Static issue regarding armatures however should be handled I think - applying transform on animated object is calling for issues, but doing so on non-animated one should work as expected.

Will try to handle this…

OK, so checked a bit more on this, and compared with what happens when applying scale to an object having children: * Static position of children is updated to keep same 'visual transform' * But with animation, fcurves are not updated, so result looks broken. I maintain anim part is not a bug, at most a TODO/feature request, but rather hard to make it working ok in all cases imho. Static issue regarding armatures however should be handled I think - applying transform on animated object is calling for issues, but doing so on non-animated one should work as expected. Will try to handle this…
Bastien Montagne changed title from Scaling armature from smaller size to scale 1 results in broken animations (IPO not updated?) to Scaling armature from smaller size to scale 1 results in broken animations (IPO not updated?) and non-connected bones is pose is not rest one. 2014-09-07 18:04:18 +02:00

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung

Hrmm… further testing, in rest pose apply scale works perfect, it breaks only if you edit pose first… so not really sure whether we want to support that…

Let’s see whether Joshua has some advice here.

Hrmm… further testing, in rest pose apply scale works perfect, it breaks only if you edit pose first… so not really sure whether we want to support that… Let’s see whether Joshua has some advice here.
Author
Member

Good to see this has been reopened.

gaia (on irc) has created a python script which allowed for this functionality to work, with a option to set the scale of a skeleton and re-scaling a single or all actions with it.
If this would not work out as default functionality (which is fine), it would be nice to have a optional scale function.
The way fill's are handled (grid fill/beauty fill etc) is a good example of allowing for multiple 'default' functionality.

Good to see this has been reopened. gaia (on irc) has created a python script which allowed for this functionality to work, with a option to set the scale of a skeleton and re-scaling a single or all actions with it. If this would not work out as default functionality (which is fine), it would be nice to have a optional scale function. The way fill's are handled (grid fill/beauty fill etc) is a good example of allowing for multiple 'default' functionality.

I was forgetting that there might be multiple actions associated with a particular armature. Would it be unexpected or undesirable if they all got scaled when the armature scale was applied? All child objects get their scale changed, and that seems like an analogous case.

In any case, I agree with @TheOnlyJoey; I don't really care about the default behaviour, as long as I have the option of scaling the animations.

(I suspect this may be a slight culture clash between people doing games and people doing pre-rendered animations. If you're doing an animation, it probably doesn't matter if objects are scaled. Game engines, for some reason, are incredibly picky about this sort of thing. You might ask why they don't just apply the scale when you import the object—I've certainly wondered that—but they never seem to. To avoid problems you always want to make the character as simple as possible, and applying the scale is part of that.)

I was forgetting that there might be multiple actions associated with a particular armature. Would it be unexpected or undesirable if they *all* got scaled when the armature scale was applied? All child objects get their scale changed, and that seems like an analogous case. In any case, I agree with @TheOnlyJoey; I don't really care about the default behaviour, as long as I have the *option* of scaling the animations. (I suspect this may be a slight culture clash between people doing games and people doing pre-rendered animations. If you're doing an animation, it probably doesn't matter if objects are scaled. Game engines, for some reason, are incredibly picky about this sort of thing. You might ask why they don't just apply the scale when you import the object—I've certainly wondered that—but they never seem to. To avoid problems you always want to make the character as simple as possible, and applying the scale is part of that.)

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

So, talked with Joshua on IRC, wa agreed that even though this would be great from a user PoV, there is no bug here, it's a mix of TODO and design task. Added a note in our TODO list.

Time to archive.

So, talked with Joshua on IRC, wa agreed that even though this would be great from a user PoV, there is no bug here, it's a mix of TODO and design task. Added a note in [our TODO list](http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Armature). Time to archive.

Added subscriber: @Cwiiis

Added subscriber: @Cwiiis

In #41699#255333, @TheOnlyJoey wrote:
Good to see this has been reopened.

gaia (on irc) has created a python script which allowed for this functionality to work, with a option to set the scale of a skeleton and re-scaling a single or all actions with it.
If this would not work out as default functionality (which is fine), it would be nice to have a optional scale function.
The way fill's are handled (grid fill/beauty fill etc) is a good example of allowing for multiple 'default' functionality.

Sorry to bump such an old topic, but I've hit this recently and much searching doesn't really provide an answer that works for me. I have an animated model with an armature at 0.01x scale and external requirements that the armature be untransformed, but I've not found a way in Blender to accomplish this without breaking the animations. It would appear Blender hasn't gained this ability in the interim, and the script mentioned in this comment is the most promising lead... Does anyone know where this script is, or know of another work-around to accomplish this?

> In #41699#255333, @TheOnlyJoey wrote: > Good to see this has been reopened. > > gaia (on irc) has created a python script which allowed for this functionality to work, with a option to set the scale of a skeleton and re-scaling a single or all actions with it. > If this would not work out as default functionality (which is fine), it would be nice to have a optional scale function. > The way fill's are handled (grid fill/beauty fill etc) is a good example of allowing for multiple 'default' functionality. Sorry to bump such an old topic, but I've hit this recently and much searching doesn't really provide an answer that works for me. I have an animated model with an armature at 0.01x scale and external requirements that the armature be untransformed, but I've not found a way in Blender to accomplish this without breaking the animations. It would appear Blender hasn't gained this ability in the interim, and the script mentioned in this comment is the most promising lead... Does anyone know where this script is, or know of another work-around to accomplish this?

For anyone else that gets stuck on this, this very cheap add-on has the ability to apply scale to both the armature and actions of a model - https://blendermarket.com/products/godot

For anyone else that gets stuck on this, this very cheap add-on has the ability to apply scale to both the armature and actions of a model - https://blendermarket.com/products/godot

For anyone else that is stuck on this, you can go and scale the keyframes manually (keyframes of location + scale, not rotation.) from within the action-editor (scale the graphs on the Y axis) (else google "Fixing animation with scaled armature". eg. https://youtu.be/QuY2-M_mVsA)
Writing a plugin to automate these steps can also be done and is quite easy.

For anyone else that is stuck on this, you can go and scale the keyframes manually (keyframes of location + scale, not rotation.) from within the action-editor (scale the graphs on the Y axis) (else google "Fixing animation with scaled armature". eg. https://youtu.be/QuY2-M_mVsA) Writing a plugin to automate these steps can also be done and is quite easy.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
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#41699
No description provided.