Page MenuHome

2nd Mask (created after existing keyframe) gets broken handles
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows 64 bit
Graphics card: GTX1080

Blender Version
Broken: every 2.8 version I've tried (2.80 - 2.83), and back through 2.70

Description of the thing

  • Open blender,
  • Open a tracking/masking workspace
  • Load in a movie clip

now what works / doesnt work:

  • GOOD: insert first spline (Add > Circle), insert second spline (Add > Circle) on the same frame, change handle type on one point of second spline from Auto to Aligned, scub timeline
  • FAIL: insert first spline (Add > Circle), insert keyframe (I), insert second spline (Add > Circle) on the same frame, change handle type on one point of second spline from Auto to Aligned, scub timeline (handles on second spline go nuts)
  • GOOD: insert first spline (Add > Circle), insert keyframe (I), insert second spline (Add > Circle) on the same frame, change handle type on one point of second spline from Auto to Aligned, insert keyframe (I), scub timeline
  • FAIL: insert first spline (Add > Circle), insert keyframe (I), go to next frame, insert second spline (Add > Circle), change handle type on one point of second spline from Auto to Aligned, scub timeline (handles on second spline go nuts)
  • FAIL: insert first spline (Add > Circle), insert keyframe (I), go to next frame, insert second spline (Add > Circle), change handle type on one point of second spline from Auto to Aligned, insert keyframe (I), scub timeline (handles on second spline go nuts)
My assumption here is that inserting a shapekey with only the first spline present fills data in MaskLayerShape for that frame [but only data for points of the first spline].
Now if you add a second spline, data for its points are "missing" from MaskLayerShape.
BKE_mask_layer_evaluate_animation / BKE_mask_layer_shape_to_mask / mask_layer_shape_to_mask_point will just use random garbage in that case?

Original report (but this can be reproduced without autokeying, see above):

Hello! This is regarding auto-keyframing with masking :)

So, if you turn on auto keyframing in the masking workspace, and create your first mask, everything behaves as you'd expect (although you have to double click to "apply" the keyframe, which is admittedly unexpected).

But if you then create a SECOND mask with auto keyframing enabled, at some point all the points will warble into a weird shape (even though you haven't added keyframes), and it'll become mostly useless.

It's always the second mask created after "auto-keyframing" is turned on

Here's a quick video showing it:
https://youtu.be/OWEEhA_3njA

I attached a blend file and a small video file (the video file doesn't matter though- it happens with all I've tried- but they can't be packed into the .blend file)

Thank you!!

Exact steps for others to reproduce the error
Open blender,
Open a tracking/masking workspace
Load in a movie clip
Turn on "Auto Keyframing"
Create a mask, animate it.
Create another mask, and scrub through the timeline- it'll get all tangled.

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.May 19 2020, 11:44 AM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

Confirming on first sight.

Could it be that there is just an update missing?

What I mean is I think I can get it to be reliable if

  • I move points [keyframe is inserted, but some update is missing -- if I start using the timeline and move points again then this will end up getting unpredictable (probably inserting keys in places which dont correspond to what is displayed on screen)]
  • dont move the timeline yet
  • do something that properly tags updates [e.g. select some other points]
  • select my original points again, move timeline/points etc...

Looking into this.
@Ian Hubert (mrdodobird) : in the meantime: can you confirm this is more reliable for you if you change selection after the autokeyframe has been inserted?

AH! Cool hey, thanks, Philipp!

So- I thought I had my head wrapped around this (this is my first bug, so I checked everything like crazy), but I found a couple things out.

1.) it doesn't have anything to do with auto-keyframing. After you add a mask with keyframes, the next mask will get the weird warbles.
2.) I can avoid the issue if I create a new mask layer and add the mask to that, (which is honestly a pretty reasonable workaround for most instances)

But also- if I'm understanding your suggestion right, I've done a few tests with it, in every order I can think of, and it doesn't seem like changing the selection makes any difference.

Youtube video seems to be private.

Ah, I think I can properly reproduce now (I was using the mask primitives and not using the handles)
If you add another shape and use the handles, these indeed are mangled.

Not sure if this is properly supported after all? [makes me thing of meshes/curves -- where adding geometry after doing shapekeys is not such a good idea as well...]

maybe @Sergey Sharybin (sergey) can comment?

Anyways, D7786: Fix autokeyframing masks not updating properly should still make masking experience with auto-keyframing more pleasant?

AH! Cool hey, thanks, Philipp!

So- I thought I had my head wrapped around this (this is my first bug, so I checked everything like crazy), but I found a couple things out.

1.) it doesn't have anything to do with auto-keyframing. After you add a mask with keyframes, the next mask will get the weird warbles.
2.) I can avoid the issue if I create a new mask layer and add the mask to that, (which is honestly a pretty reasonable workaround for most instances)

But also- if I'm understanding your suggestion right, I've done a few tests with it, in every order I can think of, and it doesn't seem like changing the selection makes any difference.

Hi, we were typing at the same time:

  • yes, your issue is not related to autokeyframing, adding anything to a mask after it has keyframes will show this
  • changing selection would just make the mask update properly after the auto-keyframe has been inserted, so it doesnt hop into other places when scrubbing...

Oh! sorry about that- the video is public now, though it sounds like you've already seen what it shows.

The additional "phantom keyframes" that appear on the second mask do appear to match up somewhat to the keyframes possessed by the first mask.

And yes! This would definitely make auto keyframing more pleasant!

Although on the subject of a pleasant rotoscoping experience (which can be a bit of a slog at the best of times), Sergey (hello! :) ) do you know why you still have to double click to add the keyframe if auto-keyframing is enabled? That's different from auto-keyframing behavior everywhere else in blender, and it's fairly confusing when you first start masking.

Philipp Oeser (lichtwerk) changed the subtype of this task from "Bug" to "Report".May 19 2020, 2:48 PM

Changing back to Report from Bug until we know if this is supposed to be supported...

@Philipp Oeser (lichtwerk) mask surely shouldn't be mangled after modifying it.
Could be missing DEG_id_update_tag call. How do i reproduce the issue with the attached file?

I have this on the list for tomorrow to look at again

Changing the handle type seems to play an important part, animation of just the point positions seems to be fine.

@Sergey Sharybin (sergey): To recap how this can be reproduced:

  • Open blender,
  • Open a tracking/masking workspace
  • Load in a movie clip

now what works / doesnt work:

  • GOOD: insert first spline (Add > Circle), insert second spline (Add > Circle) on the same frame, change handle type on one point of second spline from Auto to Aligned, scub timeline
  • FAIL: insert first spline (Add > Circle), insert keyframe (I), insert second spline (Add > Circle) on the same frame, change handle type on one point of second spline from Auto to Aligned, scub timeline (handles on second spline go nuts)
  • GOOD: insert first spline (Add > Circle), insert keyframe (I), insert second spline (Add > Circle) on the same frame, change handle type on one point of second spline from Auto to Aligned, insert keyframe (I), scub timeline
  • FAIL: insert first spline (Add > Circle), insert keyframe (I), go to next frame, insert second spline (Add > Circle), change handle type on one point of second spline from Auto to Aligned, scub timeline (handles on second spline go nuts)
  • FAIL: insert first spline (Add > Circle), insert keyframe (I), go to next frame, insert second spline (Add > Circle), change handle type on one point of second spline from Auto to Aligned, insert keyframe (I), scub timeline (handles on second spline go nuts)

My assumption here is that inserting a shapekey with only the first spline present fills data in MaskLayerShape for that frame [but only data for points of the first spline].
Now if you add a second spline, data for its points are "missing" from MaskLayerShape.
BKE_mask_layer_evaluate_animation / BKE_mask_layer_shape_to_mask / mask_layer_shape_to_mask_point will just use random garbage in that case?

Not exactly sure why this is only a problem with handles (but maybe my analysis is also wrong).
This also seems to happen when adding a second spline (using CTRL+LMB), changing the handle type is not even necessary in that case.

Philipp Oeser (lichtwerk) renamed this task from 2nd Mask Created After Auto-Keyframing Enabled gets Mystery Keyframes to 2nd Mask (created after existing keyframe) gets broken handles.Thu, Jun 25, 12:13 PM
Philipp Oeser (lichtwerk) updated the task description. (Show Details)
Philipp Oeser (lichtwerk) updated the task description. (Show Details)
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

Will classify as bug for now.