Video Copilot Motion Tracking

Video Copilot After Effects Basic Training 05: Motion Tracking

Continuing on from trying to learn more for a possible Junior VFX Artist job, I looked at this tutorial on video co-pilot. This tutorial was a good introduction into using the motion tracking controls within After Effects. It also showed me how to use null layers for containing tracking data and how to parent effects to this.

This could be cool for tracking a fantasy character’s head and then adding dynamic hair e.g. made of fire, particles etc. Animate the dynamics in Maya to follow the motion trail of the character and then parent to a null object containing tracking data in After Effects? Or maybe it would make more sense to do that the other way around. Is it possible to bring tracking data from After Effects into Maya to create the motion path for you? I guess that would be motion capture, which I haven’t looked into yet.

Images from http://www.blastr.com/sites/blastr/files/Ghost-Rider_1.jpg  and http://chasestone.deviantart.com/art/Exquisite-Firecraft-552834174

My notes from tutorial:

Stabilize the footage. Motion track in the layer view. Open the tracker controls. The tracking squares are made up of an inner tracking point and an outer search area. Place on an area of high contrast. Tracking rotation creates a second track point/square.

Screen Shot 05-24-16 at 09.44 AM

Choose track motion and perspective corner pin. You can align the tracking squares to an off-target area of contrast but move the corner of your shape to e.g. the corner of the sign you’re tracking. Track the area, edit motion target to layer you want to apply tracking data to and apply. You can precompose a layer into a composition if you want to add more details (e.g. after motion tracking).

You can apply your raw tracking data to a null object. Null objects can be used to contain other data. Create new layers e.g. solid and text layers and then shift select these layers and use the parenting pick whip to parent them under your null object. If you make an effect, you can also parent this with the pick whip. The pick whip is revealed for effects by alt clicking the effect stopwatch.

My attempt at Mark Christiansen’s Rotoscoping Tutorial.

After watching the tutorial and taking notes, I’m now starting at the beginning and testing how much I understood through trying myself. This way I’m not falling into the trap of copying what buttons are pressed without understanding why. I’ve heard that recalling memories is the best way to learn.

Some points I came across while trying the rotoscoping process myself:

  • Time remapping is not possible with Warp Stabilize VFX. You need to stabilize in a separate composition and then time remap the composition.
  • Brush tools are helpful at the end when you need to clean up/restore masked areas e.g. use the clone stamp tool to restore areas from your clean plate onto your final comp.
  • Think ahead: Use large simple masks as much as possible, then when you can’t do that anymore, start using articulated masks for moving parts. Then after this, use the brush tools; paint, clone and roto.

Video showing initial shot and then my removal of background extras: (footage from Mark Christiansen tutorial)

 

Lynda: Rotoscoping and Edges

After Effects Compositing 05 Rotoscoping and Edges by Mark Christiansen on Lynda.

My notes from this tutorial on lynda.com are a bit lengthy but this is  an overview of what I learned.

Overview of what I learned:

Think ahead:

A simple shape mask can be used with After Effect’s tracker to track an area like a dark spot that doesn’t move behind any object and does not shift in perspective.

For more complex shots, use large simple masks as much as possible, then when you can’t do that anymore, start using articulated masks for moving parts (if necessary). Then after this, use the brush tools; paint, clone and roto for cleaning up.

Notes:

01 Welcome Begin by planning ahead and avoid doing extra work. Fully articulated roto means that it has lots of moving parts such as limbs.

02 A simple shape mask can be used to track an area like a dark spot that doesn’t move behind any object and does not shift in perspective.

03 Rotoscoping means using manual means to select or clone footage over time.  Rotoscoping is necessary when green screening is not an option. Draw a mask onto the layer that you want to roto and use the tracking menu to track.

04 The changes in contrast within the tracking area can change the outcome of a track drastically.

05 Apply a mask to effects. For the grease spot removal: Look through the channels r.g.b. with alt+1/2/3. In the example, the spot is most apparent in the green channel. Do a levels adjust in the green channel and colour correct to match the image again?

06 Refine mask controls Use the mask controls to fix the edge of the mask.

07 Test the limits of the mask tracker. The mask tracker is limited by shifts in perspective. There are still ways to combine tracking with roto.

08 Evaluate before beginning roto. Rotoscoping takes a lot of work. You need to pay close attention to detail and be thorough.

09 Shortcuts – Draw and edit a mask: ‘g’ switches between the pen and feather tool. Use ‘ctrl’ to move points. ‘alt’ is used to adjust Bezier handles.

10 Start with a shape. You sometimes have the option of masking with a simple shape using the ‘q’ key. A shape can be more precise.

11 Lock-off for VFX Set playback to duration of selected layer ‘ctrl alt b’. You need to lock-off the footage with the after effects warp stabilizer.  Choose ‘no motion, method:position and framing:stabilize, crop autoscale. Having a locked off shot means not having any camera movement. A separate course looks at camera movement and roto. ***reminder

12 Break down the shot for a clean plate:  ‘j and k’ to set beginning and end of work space. Plan ahead: Duplicate your layer and call it ‘cp left’ (clean plate). ‘alt + /’ zoom to fit. You want to put the footage that has no people walking about over the time when people come into frame. Use a simple mask.

13 Create blank footage with a simple expression. To clean up the right footage, we cannot simply mask over a single frame as this would get rid of the grain and ambient light movement that occurs in footage. Create a ‘cp right’ and enable time remapping ‘ctrl alt t’. alt click on the time remap stopwatch, then from the ‘play-ish’ button menu>properties>loop out and this automatically loops the footage. Click enter and lengthen time bar. This expression looks like a cycle in the graph editor. ‘ee’ reveals the expression. What is he using to reveal the mask? Make sure the mask is inverted as needed. To loop a different set of time expressions, duplicate your plate again, find the area/time that is clean and create a new expression for this remapped time. This can be used to get rid of shadows.

14 Replace missing or mismatched background. We want to use our mismatched background plate to replace the extra as best as possible. Mask around the area you want to create and view the layers with difference. We want to line up and colour correct/curves adjust the new replacement background.

15 Decide what needs attention. This is important so that time isn’t wasted doing unnecessary tasks. For the first head, use an oval mask and set to subtract. The mask order is important as it is subtracting from the mask above. For a simple mask, use straight-ahead roto. E.g. if you want to remove the top of a head behind a wall, simply key the mask over the head as it moves.

16 Avoid unnecessary work such as full articulated roto. In the example, we can mask out the orange shirt guy with a simple 3-point Bezier. Name your masks to what is being removed.

17 Rotoscope straight ahead: Work in layer view if this is easier. ‘alt double click’ on layer. ‘tilde’ maximises and restores view. Alt shift m’ reveal and add mask path keyframe. You might want to remove a group of objects and then use another mask to add back in one of the objects.

 

rotoscoping_edges_01

 

With an object that is heavily motion blurred, you will need to straight-ahead roto. Place your path in the centre of the blur. You can move a layer in layer view but not in comp view.

018 Lock position only. Alt+click stopwatch on the position attribute to set an expression on this. Type in the position that’s displayed, into square brackets. This is better done by typing the expression [width/2, height/2]. This expression can be applied anywhere else. You can ‘copy expression only’ and paste to other layers for a quick way of locking the layer’s position. You can also >animation >save animation preset to save this expression. Go to animation>apply preset>choose one.

019 Build articulated roto with in-between frames. Start at a frame that does not have a lot of detail. Draw your mask with as few points as possible and place the points on areas that will be identifiable at the beginning and end of your roto. When animating the roto, keep the points on the same area of the roto and add extra points as needed for changing shapes. Otherwise the points will roll-around in the in-betweens.

20 Work with defocused mask. Your green screen might not be selectable alone and might cause artifacts when deleted this way. In this scenario, you could mask the edges of the hard surface car around the actor. Identify the lens behaviour in your footage e.g. rack focus, camera breathing, and then apply this same behaviour to your mask. Animate scale as needed for a zoom. Right click on your keyframe and add eases in/out. Then animate the feather to mask the focus shift on the foreground vs background masks. Use the mask to hide the car and this way the green will be easier to select by itself.

22 Get motion blur for free: For the motion blur on the board, we add motion blur instead of a feather. The motion blur will follow the motion of the mask. Turn on the motion blur icons in the composition area.

23 Brush tools come last. We want to paint back in the shadow that has been masked away. Choose the brush tool and give it soft edges. Double tap ‘u’ to reveal only modified properties. Keyframe the position of the brush stroke to follow where the shadow was.

24 Clone brush set up and shortcuts. Now we want to restore the areas of our skater which have been rotoscoped out. We paint in the layer view. Look for a detail that you can see both in the foreground and background. Alt+click with clone tool to set the source. Your source should be lined up with your top layer. The clone brush paints details from the clone source layer onto the layer you paint on dependant on position(?). It lifts details from the clone source layer? Paint back in the missing board, set to frame by frame. See the clone source overlay option box to see if the layers are overlayed correctly. Or check by holding alt to see the cross hairs of the clone brush.

25 Input devices for paint and roto. See the brush dynamics option.

26 Working with clone brush. Open your layers in layer view. Open a new viewer under view so that you have a split screen. Ctrl+0 closes/opens the project panel. Reveal ‘title action safe’ from menu below layer viewer. Make sure that your clone brush duration is set to single frame and that your eraser is set to only erase paint. You can use both views to figure out where you need to paint.

 

rotoscoping_edges_02

 

27 Make quick use of roto brush. Look up the basics of using the roto brush in AFx. Putting the motion blurred skater in front of the boards is a good example of where to use the roto brush. What’s an anchor frame? The roto brush deals well with heavily blurred edges.

28 Don’t get bogged down with roto brush. Roto brush relies on contrast of both motion and colour. If you’re spending too long trying to fix the brush’s edge selection, you might be better off just drawing a mask.

 

 

My Attempts at Motion Tracking in Mocha

My Attempts at Motion Tracking from the Pluralsight Tutorial Your First Day Using Mocha in After Effects (blog post here: link)

These are some points which I came across while trying to track the footage from the tutorial by myself.

  • The image that you want to apply tracking data needs to be at the correct resolution for the tracking data to apply to.
  • You need to copy and paste your tracking data to the correct frame range.
  • Track points of high contrast. If you’re tracking a sign that moves out of shot, give extra tracking room at the end i.e. pay attention to how tight you make your tracking outline. Your subtract layer appears to need to be above the track you want to subtract from.

I tracked this simple graphic that I made into the footage.

slan_trees_04_render_13

Pluralsight: Mocha in After Effects

Your First Day using Mocha in After Effects on Pluralsight

For motion tracking, Jonny (Iglu Media) suggested looking into Mocha in After Effects as this would be useful to their own projects. This is my first time looking at motion tracking and it seems quite straight forward. This tutorial involves using Mocha to draw points around what you want to track, tracking with Mocha ‘track’ button and then adjusting the track using the ‘adjust track’ tab and nudging the points back into position if they move off track.

From what I understand (from other tutorials also), Mocha uses a planar surface (made of corner pins) to track with while the tracker in After Effects tracks using a point, or two if rotation is involved.

These are my notes from the tutorial:

02 Tools and Interface: Go to animate>track in mocha AE. Use the pen-like tools to create masks and selections. The ‘B’ pen creates a Bezier selection like the pen tool. The ‘x’ creates a shape selection which you can create a mask from. On your timeline, figure out where you want to start. Figure out where you want to end and create an endpoint with the bracket-like button. Track forwards with the ‘track forward’ button. Then create an in-point and track backwards towards it. Create a planar surface and align it in perspective. Use the planar grid to help.

03 Tracking Planar Surfaces. Add more planar selections as needed to aid the track. To correct a grid which is skewing open up your parameters menu.

04: You can toggle the overlays and grids on and off so as to see if your composited logo/object is behaving okay.

05 Exporting data to after effects: Open Mocha through AFX and open an existing project with the folder icon.  Make sure your layer is selected in the layers tab and then open the parameters tab through ‘view’ on toolbar. Choose ‘export tracking data’ and ‘AFx corner pin’ middle option. Copy to clipboard. Go back to AFX and select the layer that you want to add tracking data to and paste. If you need to adjust a keyframe in AFx, make sure to use the slider value as this will affect the entire timeline. Adjust blending mode and blur etc. as needed.

06 Tracking Problematic surfaces: Use the x pen to add a rectangle area. For the tv screen in the tutorial, use the x+ pen to remove the screen and only track the area around it. Track forward. Use the planar surface (blue) to see how the track moves. Use the pick tool to move the surface into perspective. Now we adjust the track. Go back to the beginning. Hit ‘adjust track’ to set keyframes in place for our adjustment. Scrub through the timeline and use the nudge keys to move the plane back into place.

06 Overcoming obstacles in your tracking. Lock the layer with your previous complete tracking data and turn off further tracking. Draw around the sign you want to replace. Remember, right-click to complete tool. Track the bus forward and then backwards. You’ll see problems as the bus goes behind the pole. We need to remove the pole’s influence. Lock the bus layer. Use x pen to select pole. Track the pole, then under layer properties make the blend mode ‘subtract’. Lock this layer and make un-trackable again. Make bus trackable and unlock, then re-track. Now we add our tracking plane. Go to the point where the planar surface is acting great and hit ‘adjust track’ tab to add a keyframe. Scrub though to see what areas need nudged in comparison to master frame.

07 Export multiple tracks to AFx: Copy and paste as usual. If the graphic is in the wrong place, Use the anchor point sliders to move it.

08 Using mocha to create shape data and manual keying. For pole, we will use the previous tracking data. Create the shape of the pole using the b pen. Then in the layer properties, link the track to the pole tracking layer. For the car, outline it with the x pen. Choose manual track under the track tab and move the shape into place as you scrub through the timeline. Do the same for the heads.

09 Export shape data to AFx: Make sure your women, car and pole layers are visible, then under the ‘track’ tab, export shape data and ‘all visible layers’. Make a new solid layer in AFx and paste your shape data. Use this as an inverted track for ‘mask for bus’ layer.

Pluralsight Rotoscoping Basics

Jonny and Gareth from Iglu Media have talked about a possible job opportunity as a junior VFX artist. With this possibility in mind I’ve been looking through some suggested tutorials to try and learn new skills necessary for the job such as rotoscoping, motion tracking and compositing. These are areas which I’ve been curious about for a while so it’s been an interesting few days.

Rotoscoping in After Effects by Laura Hawk on Pluralsight

This course was a good introduction to using the pen tool to create masks in After Effects, using masks with different blending modes and adjustments and animating the mask to follow a particular shape through time. This course also introduced me to the concept of fully articulated roto where a shape, which is made up of lots of moving parts such as a hand, is divided into smaller masks for animating separately.

These are my notes:

02

We are creating a rotoscope in After Effects but we use masks to create them. Rotoscoping is isolating an object in footage. Use the pen tool to add points, convert vertices or delete points. Use spacebar to move the new point plus handles together.

03: For complex shapes such as a hand with moving fingers, make separate masks for the fingers and palm which overlap. This saves time when it comes to animating which can be the longest part of the process.

04 Rotoscoping for color correction and other effects. Create a new adjustment layer and then create the mask on the adjustment layer.

05 Transfer a mask from one layer to another. Simply copy your masks from one layer and paste on top of another layer e.g. an adjustment layer.

06 Animating Masks. It may be better to draw your mask at the end of the footage rather than at the beginning depending on how much more of the object is revealed. Draw your mask and then move back to the start of your footage and use the ‘mask path’ to key the mask back into position. Double click your path and move all the points at once. Add more keyframes in the halfway areas as needed to clean up the mask.

07 Controlling mask edge and opacity: Adjust the feather attribute and use the feather brush to add more feather handles to the mask edge.

08 Reusing keyframe data For similar positions in space, copy the key you want with ctrl+c, make sure the time indicator is where you want the copied key and paste. With a repeated motion e.g. a bobble head, try repasting groups of keyframes as a starting point for editing.

09 Animating a complex rotoscope Split the mask up into areas that correspond to the where the body might break naturally e.g. at joints. Animate one mask at a time.

10 Integrate rotoscoped footage with a background plate Make sure all your masks are on ‘add’ mode so as to isolate what’s inside the mask and then add your background plate.

*look up other tutorials on color correction.

11 Outputting masks into an image sequence for later use. Write out your composition as an image sequence as this is the most stable/compatible with other software e.g. png, tiff sequences. TIFF is good for file size. Chose to output the alpha channel. Use LZW compression to create a smaller file.

*Look into using rotoscoping with tracking.

What Makes a Hero?

Cassie Galloway posted this recap of the Hero’s Journey on Animation Belfast.I haven’t read about story craft in a while, and seeing how it’s the most important element (of every media?) it’s something I need to start reading about and practicing again.

“You leave your comfort zone, have an experience that transforms you and then you recover, and do it again.”

“The cave you fear to enter holds the treasure you seek.” Sound like life true enough.