Buggy distortion when two NLA Strips overlap #36496

Closed
opened 2013-08-17 19:26:59 +02:00 by David Brennan · 30 comments

Relates to: #37276

%%%--- Operating System, Graphics card ---
Windows 7.
Intel integrated graphics. (No GPU.)

- Blender version with error, and version that worked ---

Blender 2.68.
The Bug reportedly does not occur in 2.67.

- Short description of error ---

When two NLA Strips overlap, there is a bizarre problem in which some of the values become distorted. In this case, the Scale and Location of a character's Root Bone suddenly explode when the two strips overlap.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

Simply check out the attached .Blend and hit play.

%%%

**Relates to**: #37276 %%%--- Operating System, Graphics card --- Windows 7. Intel integrated graphics. (No GPU.) - Blender version with error, and version that worked --- Blender 2.68. The Bug reportedly does not occur in 2.67. - Short description of error --- When two NLA Strips overlap, there is a bizarre problem in which some of the values become distorted. In this case, the Scale and Location of a character's Root Bone suddenly explode when the two strips overlap. - Steps for others to reproduce the error (preferably based on attached .blend file) --- Simply check out the attached .Blend and hit play. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

#37455 was marked as duplicate of this issue

#37455 was marked as duplicate of this issue
Member

%%%I don't think strips in NLA were meant to overlap even? Joshua can tell more though.%%%

%%%I don't think strips in NLA were meant to overlap even? Joshua can tell more though.%%%
Author

%%%Yeah, NLA strips are definitely intended to overlap. That is one of their biggest attributes: the blending between two overlapping strips!

Has anybody diagnosed or further investigated this?%%%

%%%Yeah, NLA strips are definitely intended to overlap. That is one of their biggest attributes: the blending between two overlapping strips! Has anybody diagnosed or further investigated this?%%%
Member

%%%Hi,

Apologies for the delay in getting around to investigating this further. It's been a hectic few months on my end, so any non-work commitments have had to take a bit of a backseat for a while.

Before I started getting busy, I had a poke around trying to figure out why exactly the problem was arising in this particular case. The specific problem appears to have something to do with how small scale values interact with the influence setting and/or the "base" values used when there are no strips. I'm still not sure why exactly these end up bugging out yet, but I'll keep investigating (perhaps plotting out some more detailed charts of what's going on to get a better picture).

In the meantime, the workaround here is to ensure that you've got a strip at the bottom of your NLA stack which includes the "default" values for all channels animated in your NLA strips, and make it so that this strip has full influence over the entire range of the animation frame range. Specifically, make sure that you've got keyframes for the 0.054 scale you've set on the root bone within this action/strip at the bottom of the stack. Once you've done this, you don't really need to have the scale in the tracks above, though it doesn't hurt to keep it there either, as everything should behave once you do this.

Note: I've been pondering about ways to automate this process for having a "base" strip created/updated automatically. It seems increasingly likely that it will be necessary to have something like this to avoid some other weird quirks the can arise (most notably those seen in your other report). %%%

%%%Hi, Apologies for the delay in getting around to investigating this further. It's been a hectic few months on my end, so any non-work commitments have had to take a bit of a backseat for a while. Before I started getting busy, I had a poke around trying to figure out why exactly the problem was arising in this particular case. The specific problem appears to have something to do with how small scale values interact with the influence setting and/or the "base" values used when there are no strips. I'm still not sure why exactly these end up bugging out yet, but I'll keep investigating (perhaps plotting out some more detailed charts of what's going on to get a better picture). In the meantime, the workaround here is to ensure that you've got a strip at the bottom of your NLA stack which includes the "default" values for all channels animated in your NLA strips, and make it so that this strip has full influence over the entire range of the animation frame range. Specifically, make sure that you've got keyframes for the 0.054 scale you've set on the root bone within this action/strip at the bottom of the stack. Once you've done this, you don't really need to have the scale in the tracks above, though it doesn't hurt to keep it there either, as everything should behave once you do this. Note: I've been pondering about ways to automate this process for having a "base" strip created/updated automatically. It seems increasingly likely that it will be necessary to have something like this to avoid some other weird quirks the can arise (most notably those seen in your other report). %%%
Author

%%%Joshua,

I will test out this "base strip" work-around, which I think I will have to experiment with to fully comprehend.

I appreciate the time and effort (I'm sure many other silently seething animators will, too.) I'll be on the lookout for updates, and if you need other .Blend samples, just say so.%%%

%%%Joshua, I will test out this "base strip" work-around, which I think I will have to experiment with to fully comprehend. I appreciate the time and effort (I'm sure many other silently seething animators will, too.) I'll be on the lookout for updates, and if you need other .Blend samples, just say so.%%%
Member

%%%I've just done a few more tests of the blending formulas: from the looks of things, an easer workaround would be to simply disable the blend-out on the lower strip (by disabling "auto-blends"). However, for reasons of preventing weird errors on some channels only being keyed in some strips, I'd still recommend the base strip workaround for now as the more comprehensive solution.

I've attached a little spreadsheet of the current blending method to illustrate/investigate this problem. It's probably better to have this inline here for good measure.%%%

%%%I've just done a few more tests of the blending formulas: from the looks of things, an easer workaround would be to simply disable the blend-out on the lower strip (by disabling "auto-blends"). However, for reasons of preventing weird errors on some channels only being keyed in some strips, I'd still recommend the base strip workaround for now as the more comprehensive solution. I've attached a little spreadsheet of the current blending method to illustrate/investigate this problem. It's probably better to have this inline here for good measure.%%%
Author

%%%Unfortunately, I don't know any programming. However, wouldn't it be possible to simply cut-and-paste the NLA code from 2.67 (where it worked fine) to 2.69? Alternately, I think document programs can identify differences automatically, so you could immediately spot any changes that were made and deduce the problem that way.

Also, for any lurkers, I tried the latter work-around (disabling the blending of the strips altogether) and that did not work immediately. I first had to push the higher NLA Strip up to a new track (so that it is not directly overlapping the one we want to blend with). After doing this once, I could then put the NLA Strip back to the lower track, and then the wonkiness did not occur (although, then there was no blending of the values).

Your works are appreciated, Joshua.%%%

%%%Unfortunately, I don't know any programming. However, wouldn't it be possible to simply cut-and-paste the NLA code from 2.67 (where it worked fine) to 2.69? Alternately, I think document programs can identify differences automatically, so you could immediately spot any changes that were made and deduce the problem that way. Also, for any lurkers, I tried the latter work-around (disabling the blending of the strips altogether) and that did not work immediately. I first had to push the higher NLA Strip up to a new track (so that it is not directly overlapping the one we want to blend with). After doing this once, I could then put the NLA Strip back to the lower track, and then the wonkiness did not occur (although, then there was no blending of the values). Your works are appreciated, Joshua.%%%
Author

%%%Joshua,

Has there been any progress with this? I'm again at a point where the Bug is absolutely preventing further work on an animation of mine: http://www.pasteall.org/pic/show.php?id=62237

(I can't understand how this isn't causing problems for tons and tons and tons of users. Virtually all my animations use the NLA setup.)%%%

%%%Joshua, Has there been any progress with this? I'm again at a point where the Bug is absolutely preventing further work on an animation of mine: http://www.pasteall.org/pic/show.php?id=62237 (I can't understand how this isn't causing problems for tons and tons and tons of users. Virtually all my animations use the NLA setup.)%%%
Author

%%%Joshua,

Here are a few facts which could aid in the effort to solve this Bug.

Antont at the BlenderCoders IRC channel found this discussion of the Bug from back in July (in a conversation you participated in):

fdf38b56c3

There it is noted that this apparently first popped up in "r.57333". %%%

%%%Joshua, Here are a few facts which could aid in the effort to solve this Bug. Antont at the BlenderCoders IRC channel found this discussion of the Bug from back in July (in a conversation you participated in): https://github.com/antont/blender/commit/fdf38b56c3f31a418d02171eefd2b92c242aaeca There it is noted that this apparently first popped up in "r.57333". %%%
Author

%%%Here is a link to a different .Blend for testing and diagnosing:

http://www.pasteall.org/blend/25112%%%

%%%Here is a link to a different .Blend for testing and diagnosing: http://www.pasteall.org/blend/25112%%%

%%%I tried to revert that commit to test - it did not work automatically, so I just disabled it manually by commenting out the call to nlaevalchan_value_init(ned)

that seemed to fix the case in the original untitled.blend here (if the walk anim is supposed to move the char away from the cam) -- the zoom jump at least went away.

the code structure here had changed a bit so this revert-attempt can be broken otherwise, anyhow just for info this is how i tried it:
b6b7674952

this is probably nothing new for Aligorith who has worked on the code and analysed the issue already etc but reporting just in case there's something useful.%%%

%%%I tried to revert that commit to test - it did not work automatically, so I just disabled it manually by commenting out the call to nlaevalchan_value_init(ned) that seemed to fix the case in the original untitled.blend here (if the walk anim is supposed to move the char away from the cam) -- the zoom jump at least went away. the code structure here had changed a bit so this revert-attempt can be broken otherwise, anyhow just for info this is how i tried it: https://github.com/antont/blender/commit/b6b7674952703ebcd352aeb82f944b4a082bff83 this is probably nothing new for Aligorith who has worked on the code and analysed the issue already etc but reporting just in case there's something useful.%%%
Author

%%%Great thanks, Toni. This will probably contribute to the eventual fixing of this all.%%%

%%%Great thanks, Toni. This will probably contribute to the eventual fixing of this all.%%%

◀ Merged tasks: #37455.

◀ Merged tasks: #37455.
Author

Has there been any progress towards a fix?

Has there been any progress towards a fix?
Author

This Bug - which, for me, makes extensive character animation virtually impossible (I am still using 2.67) - has not been fixed as of "blender-2.69-cc7cfd6" (the latest build as of February 17).

Because the 2.70 release is at BCon4 and, therefore, is now dedicated solely to Bug fixing, and because this is such a HUGE Bug (as I said, it makes character animation nearly impossible), I would be very appreciative if somebody would actually fix it.

In addition to all the other .Blend samples, I've attached a new example of this with Batman running and then jumping between two NLA Strips.

(As a side note, the Grease Pencil was not working, but I'll file a separate Bug Report for that.)

NLA-StripOverlapProblem.blend

This Bug - which, for me, makes extensive character animation virtually impossible (I am still using 2.67) - has not been fixed as of "blender-2.69-cc7cfd6" (the latest build as of February 17). Because the 2.70 release is at BCon4 and, therefore, is now dedicated solely to Bug fixing, and because this is such a HUGE Bug (as I said, it makes character animation nearly impossible), I would be very appreciative if somebody would actually fix it. In addition to all the other .Blend samples, I've attached a new example of this with Batman running and then jumping between two NLA Strips. (As a side note, the Grease Pencil was not working, but I'll file a separate Bug Report for that.) [NLA-StripOverlapProblem.blend](https://archive.blender.org/developer/F77697/NLA-StripOverlapProblem.blend)

Added subscriber: @Sergey

Added subscriber: @Sergey

@JoshuaLeung, any luck into this report?

@JoshuaLeung, any luck into this report?
Author

Is there anybody besides Aligorith who can look at this? I don't know what his timeline is, but it wasn't before 2.69, and now it's clearly not before 2.70.

Again, it worked fine in 2.67, and so a simple comparison between that and 2.68 should help greatly in identifying the source of the glitching.

Is there anybody besides Aligorith who can look at this? I don't know what his timeline is, but it wasn't before 2.69, and now it's clearly not before 2.70. Again, it worked fine in 2.67, and so a simple comparison between that and 2.68 should help greatly in identifying the source of the glitching.
Author

Is there ANY way that this critical bug could be fixed for 2.70?

Is there ANY way that this critical bug could be fixed for 2.70?

Added subscriber: @brecht

Added subscriber: @brecht

From what I can tell this issue was first introduced with {27d792fa9ca103a4f669ab6e26bbb7f2c89f064c}, which fixed bugs #35263 and #35382. Reverting that commit makes those bugs appear again, so that alone is not a good solution.

Those other bugs were with blend mode Add, while this file is using blend mode Replace. So to fix both cases, here's a patch that reverts to the old behavior for Replace mode, but keeps the new behavior for Add mode: fix_T36496.diff

What this does is that to not do any blending for the first strip, rather than blending the first strip with the default value for the channels (e.g. 0,0,0 for locations and 1,1,1 for scale). This seems more useful to me, and if someone actually wants the old behavior they can still make an action with the default pose and use that as the first strip.

@JoshuaLeung, do you think this fix would be ok to commit?

From what I can tell this issue was first introduced with {27d792fa9ca103a4f669ab6e26bbb7f2c89f064c}, which fixed bugs #35263 and #35382. Reverting that commit makes those bugs appear again, so that alone is not a good solution. Those other bugs were with blend mode Add, while this file is using blend mode Replace. So to fix both cases, here's a patch that reverts to the old behavior for Replace mode, but keeps the new behavior for Add mode: [fix_T36496.diff](https://archive.blender.org/developer/F79182/fix_T36496.diff) What this does is that to not do any blending for the first strip, rather than blending the first strip with the default value for the channels (e.g. 0,0,0 for locations and 1,1,1 for scale). This seems more useful to me, and if someone actually wants the old behavior they can still make an action with the default pose and use that as the first strip. @JoshuaLeung, do you think this fix would be ok to commit?
Author

brecht,

I greatly appreciate your work on this. Greatly. (I continue to be surprised that more people are not reporting this. Perhaps others just don't use the NLA as much as I do.)

However, I downloaded the nightly build (from February 28) and did not notice any changes. Is the patch included in that? I don't know how to plug the patch in, on my own.

brecht, I greatly appreciate your work on this. *Greatly*. (I continue to be surprised that more people are not reporting this. Perhaps others just don't use the NLA as much as I do.) However, I downloaded the nightly build (from February 28) and did not notice any changes. Is the patch included in that? I don't know how to plug the patch in, on my own.

There's no build yet with this fix, I'm waiting for feedback from @JoshuaLeung since I'm not so familiar with this code. But if he doesn't have time before the release I can still commit it I think, I'm pretty sure the fix is ok.

There's no build yet with this fix, I'm waiting for feedback from @JoshuaLeung since I'm not so familiar with this code. But if he doesn't have time before the release I can still commit it I think, I'm pretty sure the fix is ok.
Member

@brecht: Thanks for looking into this. It looks like a workable solution :)

@brecht: Thanks for looking into this. It looks like a workable solution :)

This issue was referenced by blender/blender-addons-contrib@53b03eff96

This issue was referenced by blender/blender-addons-contrib@53b03eff965d6bd82dfb2db01d77a599c367d187

This issue was referenced by 53b03eff96

This issue was referenced by 53b03eff965d6bd82dfb2db01d77a599c367d187

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 53b03eff96.

Closed by commit 53b03eff96.
Author

Whew! Just downloaded the Daily Build and, at last, I can delete my old 2.67 version that I was using for character animations!

Thanks so much, brecht! And, of course, great thanks as always to everybodyat Blender. God bless!

Whew! Just downloaded the Daily Build and, at last, I can delete my old 2.67 version that I was using for character animations! Thanks so much, brecht! And, of course, great thanks as always to *everybody*at Blender. God bless!
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#36496
No description provided.