Stabilize Masks Workflow Problem

Here's a problem with workflow I bump into all the time and I'm hoping there's a simple fix.

There's a clip that requires you to roto a section of it. Say a street with a mailbox and you have to make a matte for the mailbox as the camera dollies along. So I track the mailbox with a Stabilize node. Then I draw a mask for the mailbox and run the mask into the stabilize node. So far so good. The problem comes when you want to adjust the splines of the mask. So suppose you want to move the splines around your mailbox to account for a perspective shift. I select my Rotoshape node so I get my spline controls and click my image so I can see my results. But the splines don't line up with the mailbox because they don't take into account the Stabilize node one step down the flow!

My workaround is to put a mix node below the stabilize and mix it with my plate so I can see a white matte blob that moves with my Stabilize's keyframes.

Is there a better way?

And I might as well throw in the bug that if you put a Blur between the RotoShape and the Stabilize, the matte gets weirdly cropped off. It's a simple fix - put the blur after the Stabilize - but it is weird. Anyway...

Thanks again,

jon a

maybe i missunderstood something, but why dont you just try the following:

  • track the plate with a stabilize, activate the node and leave it in "stabilize" mode
  • load a roto into the control parameters and the stabilized plate into the viewer.
  • do your roto perspective shifts on the stabilized plate.
  • detach the stabilize node from the plate, hook it up to the roto and set it to match.

the roto should track your mailbox nicely now and the splines will move with your perspective corrections
(assuming you activated keyframes :wink:

hope that helped
++ christoph

Yes, for your first problem you could do what zem said, or simply add any node under your footage and attach your stabilized rotoshape to its mask input. That way you can see the actual footage while carrying all transformations for the rotoshape controls.

As for the blur 'bug' you're mentioning, try turning spread to "Outside Frame" instead of "In Frame Only". The cropping is probably due to the roto going beyond the rotoshape resolution, so that's why you need to set the blur to spread outside frame.

Hope that helps

I usually do this:

1) Note the expression link between the tracker and the stabilise (this can be achieved by right clicking on the track name in the stabilise node and chosing "link track" or "average tracks").

2) If you view the switchmatte while you do the roto, any transform will be taken into account.

FOOTAGE = ColorWheel(720, 576, 2, 0, 1, 1, 1);
ROTO = RotoShape(720, 576, 1, "v3.01", 0, 0, 0, 0.914077, 1,
xScale, width/2, height/2, 0, 0.5, 0, 388);
Stabilize1 = Stabilize(ROTO, 1, 1, "2 point", Tracker1.track1X,
Tracker1.track1Y, 1, 1, Tracker1.track2X, Tracker1.track2Y,
1, 1, 2*width/3, 2*height/3, width/3, 2*height/3, "default",
xFilter, "trsx", 0, 0.5, 0, 1, sqrt(((track2X-track1X)(track2X-track1X)) +((track2Y-track1Y)(track2Y-track1Y))) /sqrt(((track2X@@refFrame) -(track1X@@refFrame))((track2X@@refFrame) -(track1X@@refFrame))+((track2Y@@refFrame) -(track1Y@@refFrame))((track2Y@@refFrame) -(track1Y@@refFrame))),
atan2d((track2Y-track1Y),(track2X-track1X))-(atan2d(((track2Y@@refFrame)-(track1Y@@refFrame)),((track2X@@refFrame)-(track1X@@refFrame)))),
0.914077, "v2.0", 47, "1/64", "luminance", 0.3, 0.59, 0.11,
0.75, "use start frame", 0.5, "stop", 0, 0, 25, "track1",
360-height/25, 360+height/25, 288-height/25, 288+height/25,
360-height/15, 360+height/15, 288-height/15, 288+height/15,
"track2", 360-height/25, 360+height/25, 288-height/25, 288+height/25,
360-height/15, 360+height/15, 288-height/15, 288+height/15,
"track3", 2*width/3-height/30, 2*width/3+height/30, 2*height/3-height/30,
2*height/3+height/30, 2*width/3-height/15, 2*width/3+height/15,
2*height/3-height/15, 2*height/3+height/15, "track4", width/3-height/30,
width/3+height/30, 2*height/3-height/30, 2*height/3+height/30,
width/3-height/15, width/3+height/15, 2*height/3-height/15,
2*height/3+height/15);
Tracker1 = Tracker(FOOTAGE, "1-177", "1/64", "luminance", 0.75,
"use start frame", 0.5, "stop", 1, 1, "v2.0", 0.3, 0.59,
0.11, 0, 10, "track1", width/2, height/2, 1, width/2-height/30,
width/2+height/30, height/2-height/30, height/2+height/30,
width/2-height/15, width/2+height/15, height/2-height/15,
height/2+height/15, width/2, height/2, 1, 1, "track2", width/2,
height/2, 1, width/2-height/30, width/2+height/30, height/2-height/30,
height/2+height/30, width/2-height/15, width/2+height/15,
height/2-height/15, height/2+height/15, width/2, height/2,
1, 1);
SwitchMatte5 = SwitchMatte(Tracker1, Stabilize1, 1, "A", 1, 0);

that works very nicely indeed (although i have no idea why)

an animated example:

FOOTAGE = ColorWheel(720, 576, 2, 0, 1, 1, 1); Grad1 = Grad(720, 576, 1, 0.5,
0.5, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0); ROTO =
RotoShape(720, 576, 1, "v3.01", 0, 0, 0, 0.914077, 1, xScale, width/2, height/2,
0, 0.5, 0, 384,
"100W@
4C000VDhsuH9RYbMXHCo8dXAPgUb5iPad5QOeb9CRcL0hMP06O82b6aMQL7Z25eWPAO0WQeP9vPPMQwA
baVHw5blVvqEdJYv5bVEvfMQEEUcQgHQQgW1wWeWQA5DQ8GTP4gWDRJg9GgrK3AzBOtgFwnfROYmCbK3
vId4qf9dVRM7vGknTdj9eTYTh84cQ4XD6OeU680i1cyp0Timq03Cnn8pun0oC3rrt4pDrqKhCdot0pCI
FPy0t19cHmJWAAEgp5c1Hz58Gn0ZDu031O0X32tE8d0SzUQRJfGdhA08mJm@
iJo8PNDyTR6WlDKVAVKSBgZRTJ2M5ai5vjHZpkRv4aL55NuaBX1nmWToFW44SOAR2Xh00000L00000C7
"); Move2D1 = Move2D(FOOTAGE, -283.9144, -196.762146, 0, 1, 0.2613765,
0.2613765, 0, 0, width/2, height/2, "default", xFilter, "trsx", 0, 0, 0.5, 0, 0,
time); Move2D2 = Move2D(FOOTAGE, 19, 40, 0, 1, 0.3332883, 0.3332883, 0, 0,
width/2, height/2, "default", xFilter, "trsx", 0, 0, 0.5, 0, 0, time);
Stabilize1 = Stabilize(ROTO, 1, 1, "2 point", Tracker1.track1X,
Tracker1.track1Y, 1, 1,
Linear(0,561.75@1,551.328@2,539.609@3,526.391@4,515.531@5,503.188@6,489.969@7,
475.891@8,461.922@9,447.531@10,433.25@11,419@12,404.406@13,390.203@14,376.141@15
,362.234@16,349.188@17,335.516@18,322.438@19,311.094@20,300.109@21,289.344@22,
279.219@23,270.047@24,261.25@25),
Linear(0,217.5@1,231.906@2,246.594@3,260.766@4,273.953@5,286.641@6,299.172@7,310
.344@8,321.156@9,331.156@10,340.391@11,348.953@12,356.703@13,363.688@14,369.812@
15,375.109@16,379.766@17,383.938@18,386.938@19,390.188@20,392.75@21,395.109@22,
396.281@23,398.125@24,399.172@25), 1, 1, 2*width/3, 2*height/3, width/3,
2*height/3, "default", xFilter, "trsx", 0, 0.5, 0, 1,
sqrt(((track2X-track1X)*(track2X-track1X))
+((track2Y-track1Y)*(track2Y-track1Y))) /sqrt(((track2X@@refFrame)
-(track1X@@refFrame))*((track2X@@refFrame)
-(track1X@@refFrame))+((track2Y@@refFrame)
-(track1Y@@refFrame))*((track2Y@@refFrame) -(track1Y@@refFrame))),
atan2d((track2Y-track1Y),(track2X-track1X))-(atan2d(((track2Y@@refFrame)-(
track1Y@@refFrame)),((track2X@@refFrame)-(track1X@@refFrame)))), 0.914077,
"v2.0", 1, "1/64", "luminance", 0.3, 0.59, 0.11, 0.75, "use start frame", 0.5,
"stop", 0, 0, 25, "track1", 492.788, 538.868042, 54.50699, 100.587006, 477.428,
554.228, 39.1470032, 115.946991, "track2", 561.75-height/25, 561.75+height/25,
217.5-height/25, 217.5+height/25, 561.75-height/15, 561.75+height/15,
217.5-height/15, 217.5+height/15, "track3", 460.8, 499.2, 364.8, 403.2, 441.6,
518.4, 345.6, 422.4, "track4", 220.8, 259.2, 364.8, 403.2, 201.6, 278.4, 345.6,
422.4); Over1 = Over(Move2D1, Move2D2, 1, 0, 0); Move2D3 = Move2D(Over1,
Hermite(0,[140,-91.08,-91.08]@1,[-30.19,-91.08,-91.08]@25),
Hermite(0,[-99,92.33,92.33]@1,[99.295,92.33,92.33]@25),
Hermite(0,[-190,89.69,89.69]@1,[-36.985,89.69,89.69]@26), 1,
Hermite(0,[0.2,0,0]@1,[0.2,0,0]@25), xScale, 0, 0, width/2, height/2, "default",
xFilter, "trsx", 0, 0, 0.5, 0, 0, time); Over2 = Over(Move2D3, Grad1, 1, 0, 0);
Tracker1 = Tracker(Over2, "1-25", "1/64", "luminance", 0.75, "use start frame",
0.5, "stop", 1, 25, "v2.0", 0.3, 0.59, 0.11, 0, 10, "track1",
Linear(0,495@1,488.766@2,482.156@3,474.562@4,469.844@5,464.375@6,458.25@7,451.
656@8,445.594@9,439.531@10,433.438@11,427.328@12,421.234@13,414.547@14,408.359@
15,401.641@16,395.516@17,388.438@18,381.312@19,374.625@20,368.25@21,361.156@22,
353.766@23,346.453@24,339.172@25),
Linear(0,181.75@1,189.641@2,197.328@3,205.141@4,213.312@5,221.141@6,229.781@7,
238.141@8,246.578@9,255.219@10,264.016@11,272.922@12,281.922@13,290.562@14,299.
969@15,309.031@16,318.016@17,327.312@18,336.969@19,346.094@20,355.094@21,364.188
@22,374.375@23,383.125@24,392.203@25),
Linear(0,1@1,0.9978@2,0.9923@3,0.9827@4,0.9829@5,0.9767@6,0.974@7,0.9655@8,0.
9599@9,0.9557@10,0.9529@11,0.9506@12,0.9491@13,0.9495@14,0.9504@15,0.951@16,0.
954@17,0.9523@18,0.953@19,0.9502@20,0.9495@21,0.944@22,0.9409@23,0.9372@24,0.
9305@25), 308.409, 368.809021, 360.347, 422.247, 296.709, 380.509033, 349.897,
432.697,
Linear(0,495@1,488.766@2,482.156@3,474.562@4,469.844@5,464.375@6,458.25@7,451.
656@8,445.594@9,439.531@10,433.438@11,427.328@12,421.234@13,414.547@14,408.359@
15,401.641@16,395.516@17,388.438@18,381.312@19,374.625@20,368.25@21,361.156@22,
353.766@23,346.453@24,339.172@25),
Linear(0,181.75@1,189.641@2,197.328@3,205.141@4,213.312@5,221.141@6,229.781@7,
238.141@8,246.578@9,255.219@10,264.016@11,272.922@12,281.922@13,290.562@14,299.
969@15,309.031@16,318.016@17,327.312@18,336.969@19,346.094@20,355.094@21,364.188
@22,374.375@23,383.125@24,392.203@25), 1, 1, "track2",
Linear(0,561.75@1,551.328@2,539.609@3,526.391@4,515.531@5,503.188@6,489.969@7,
475.891@8,461.922@9,447.531@10,433.25@11,419@12,404.406@13,390.203@14,376.141@15
,362.234@16,349.188@17,335.516@18,322.438@19,311.094@20,300.109@21,289.344@22,
279.219@23,270.047@24,261.25@25),
Linear(0,217.5@1,231.906@2,246.594@3,260.766@4,273.953@5,286.641@6,299.172@7,310
.344@8,321.156@9,331.156@10,340.391@11,348.953@12,356.703@13,363.688@14,369.812@
15,375.109@16,379.766@17,383.938@18,386.938@19,390.188@20,392.75@21,395.109@22,
396.281@23,398.125@24,399.172@25),
Linear(0,1@1,0.9915@2,0.9902@3,0.9781@4,0.981@5,0.9785@6,0.9696@7,0.9622@8,0.
9571@9,0.9527@10,0.9498@11,0.9484@12,0.9477@13,0.9483@14,0.9493@15,0.9501@16,0.
9537@17,0.9509@18,0.9501@19,0.9496@20,0.9506@21,0.9449@22,0.9418@23,0.9359@24,0.
9319@25), 237.846985, 282.247, 377.737976, 420.138, 221.646973, 298.447021,
359.538, 436.337982,
Linear(0,561.75@1,551.328@2,539.609@3,526.391@4,515.531@5,503.188@6,489.969@7,
475.891@8,461.922@9,447.531@10,433.25@11,419@12,404.406@13,390.203@14,376.141@15
,362.234@16,349.188@17,335.516@18,322.438@19,311.094@20,300.109@21,289.344@22,
279.219@23,270.047@24,261.25@25),
Linear(0,217.5@1,231.906@2,246.594@3,260.766@4,273.953@5,286.641@6,299.172@7,310
.344@8,321.156@9,331.156@10,340.391@11,348.953@12,356.703@13,363.688@14,369.812@
15,375.109@16,379.766@17,383.938@18,386.938@19,390.188@20,392.75@21,395.109@22,
396.281@23,398.125@24,399.172@25), 1, 1); SwitchMatte5 = SwitchMatte(Tracker1,
Stabilize1, 1, "A", 1, 0);

the reason why is that shake knows that if you are rotoing through a transform node, that it should reposition the splines accordingly. The reason why it does this is to solve the problem that you mentioned.