Motion Warp Tracking – Part 2 – Multiple Reference Frames – Flame 2018.3 Update

Motion Warp Tracking – Part 2 – Multiple Reference Frames – Flame 2018.3 Update


Hey everyone, Grant for the Flame Learning Channel. In part 1 of the Motion Warp Tracking series… You were introduced to the concept of Motion Warp Tracking with Motion Vectors… Enabling you to perform tracking on organic-type substances. You were also provided with a basic example… to get yourself familiar with the tools. It’s imperative that you watch part 1 before proceeding any further… As I will be referring to certain functions… But not explaining them as I did in part 1. In part 2 and part 3 of this series… You’ll go through a use-case of tracking on moving fabric… And we’ll discuss a series of detailed operations… to get the most out of Motion Warp Tracking. As a side note, these techniques can be used to track skin… liquids and other organic materials. If you’d like to follow along… Please click the link in the YouTube description to download the media. Alternatively, if you’re watching the podcast version of this video… Then type the displayed link in your favorite web-browser. Go ahead and import the clips into Batch… And set the composite duration to 78 frames. Now in the background clip… You have a subject wearing a t-shirt… And you need to track a logo onto the fabric. The second clip is an animated logo… And the alpha channel has been embedded with the media. So to set up the flow-graph… Go to the Batch node bin… And drag out an Action node into Batch. Connect the live action shot into the background. Next select the Action node… And press CONTROL+N twice to create two new media inputs. The first input will be used as an image surface… As well as the source for the motion vectors. The second media input will be for the animated logo and its matte. Double-click the Action node for its controls… And switch to the 2-up view with ALT+2. Schematic on the left and result viewport on the right. Now normally, you get an image surface object per input. It is possible to apply Motion Warp Tracking directly to a surface… However the motion vectors need to be the same resolution as the image its affecting. This is not the case with our logo and the back plate. So delete the logo object and axis… And you’ll use the projection technique instead. Now the first step in the workflow is to generate your motion vectors. Select the background image object in the Action Schematic. Next, switch to the Action node bin… And select media input 1 in the media list. This will be the source for the motion vectors. Switch the node bin to only display maps… And locate the Motion Vectors Map. Drag out the Motion Vectors Map… And it will connect itself to the selected surface. Now in the previous video… you learnt that you could scrub the time-bar… and Flame would allow you to start working the motion vectors… even if they weren’t cached. So you can try out the motion vectors before committing to use them. You will be using these ones… So let’s go ahead and cache them to speed up performance. Double-click on the Motion Vectors Map object… And go to the Analysis menu in the Motion Vectors control. Under the Tracking header… The Caching Range should be the length of the composite. Click CACHE RANGE… And Flame will begin to cache the motion vectors. This will take a couple minutes depending on your hardware configuration… And the video will continue once the caching has completed. So the motion vectors are cached into your media folder… and are associated with this motion vectors map. Scrubbing the time-bar… The interactivity should be good enough to work without too much issue. So now that your motion vectors are ready… You can move onto projecting the animated logo… onto the subject’s t-shirt. Ensure you are on Frame 1. Go to the Action node bin… And select the Logo in the media list. Under the All nodes tab… Locate the projector. Drag the projector into the Action Schematic. The projection is placed in the middle of the screen. In part 1, you attached the projection to the camera… to line it up exactly to the frame. However this time around… I would like to you have the freedom… to position the projection wherever you want… Hence you do not need to associate the projector with the camera. Double-click the projector node for its controls… And type in the following values. Set the X position to -230… The Y positon to -283… The Z positon to 1154… And the Z rotation to 5 degrees. Finally set the Field of View to 15 degrees. This will place the logo on the center of his chest. Now let’s blend it better with the T-shirt. So switch to the Rendering menu… And change the Blending mode to Multiply. Set the transparency to 25%. You can tweak the logo a bit more if you want… But I am happy with this look for now. Scrubbing the time-bar… The logo is only aligned on the t-shirt for the first frame. You can use any frame as an alignment frame for Motion Warp Tracking… But in this case, you’re starting with Frame 1. So let’s apply the motion warp tracking… and see what you get. On Frame 1, switch to the Tracking menu in the projector controls. Click ADD to set the reference frame. Scrubbing the time-bar again… You can see the logo using the motion vectors… to track and distort to the T-shirt. Let’s zoom into the viewport with CONTROL+SPACE… And have a closer look at the details. Now the logo starts off looking good at frame 1. As you scrub the time-bar… The logo distorts with the T-shirt. If you stop in the middle of the clip… You can see clearly that the logo’s pixels have been squashed together… As the t-shirt’s fabric is crinkled up. This fine for now but you’ll tweak it some more in the next video. What is more problematic… Is when the T-shirt stretches out again… towards the end of the composite… you can see that parts of the logo are now distorted. Since the pixel’s were squashed in the middle of the clip… Unfolding them with the motion vectors… will not revert back to the clean logo from frame 1. This is a side effect of motion vector warping. However, you can resolve this in Flame… by using multiple Reference frames. Firstly, you’ll need some keyframing. Enable AUTO-KEY. Now go to Frame 1… And with the projector selected… Press the SET key button. This will place a keyframe in every channel of the selected projector. Next, go to the last frame displaying the distorted logo. Under the Reference heading… Click ADD. The logo undistorts… And snaps to the original projection… that matches the first reference on frame 1. Since the subject may have been moving during this time… Switch to the Projector Basic’s menu… And realign the projector’s position. Set the x-position to -285… And the Y-position to -248. So this is where the logo should be on the fabric… When the T-shirt is stretched out at this frame. Remember that when you set multiple references… You’ll probably need to animate your projection… to realign the logo to the new reference frame. The technical reason for doing this… Is by having multiple reference frames as part of Motion Warp Tracking… You’ll start off with a perfectly formed logo on frame 1… And then it will start distorting using the motion vectors. But as it approaches another reference frame… The motion vectors will start interpolating towards the upcoming reference frame. This allows you to move between a distorted… and undistorted version of the logo as and when you require. So setting multiple reference frames throughout the Motion Warp Tracking… Let’s you choose when your logo should be distorted or not. However, when working with Motion Warp Tracking… Sometimes you might want to tweak the distortion just a little bit… to get it looking right. In the next video… You’ll learn how to do these small tweaks… With invisible surfaces and extended bicubics. Please save up to this point by saving your Batch setup… And move onto the next video to continue this example. Please be sure to also check out the other workflows, features and enhancements to the Flame 2018.3 update. Comments, feedback and suggestions are always welcome and appreciated. Thank you for watching and please subscribe to
the Flame Learning Channel for future videos.

4 thoughts on “Motion Warp Tracking – Part 2 – Multiple Reference Frames – Flame 2018.3 Update

  1. very nice, But what to do if you need an alpha channel out of action from your logo, to do some compositing after action?

  2. Hi there,
    I installed the last trial version and i could't find the MOTION VECTOR MAP node in the Action Bin.
    The trial Installed seems to be The 2018 release, is there a way to Download the 2018.3 Update?
    Or the only available trial version is Flame 2018?
    Regards
    Thank you
    Francesco

  3. Grant, how do you know where to set the last keyframe? Did you manually find the position and for time’s sake you just plug in the numbers or is there some place that is showing you an offset value?

Leave a Reply

Your email address will not be published. Required fields are marked *