ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

AE Mocha Tracking Planar Surface

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alexi VanderstraetenAE Mocha Tracking Planar Surface
by on Dec 8, 2016 at 10:09:44 pm

Dears,

Not sure it's the place to talk about Mocha but I've look for help a bit everywhere without success.
I'm stuck on how to track perspective properly. I've watched numerous tutorials and it always seems easy but then applying it to my footage doesn't work.

What I'm trying to do is to remove windows from a clip and have something else instead. Tracking the shape of the window is done with ease and it all looks good in After affects afterward. For the same shape, when you look at its Planar Surface, it moves very fast out of the correct perspective after I start tracking. Because of that, I cannot use that tracking information to put the other clip behind as the perspective is off.

Files are share here, 1 Mocha file and 1 small video:
https://drive.google.com/open?id=0B5BVcyM5tsK8ejI4OEw2blVvb2M

If someone can help me with this I'll be forever grateful! Spent already two days on this without success so my brain is slowly starting to melt down... ☺

Ps: I know footage quality influence tracking results but I'm optimistic that there's a way to do it as the tracking of the shape was done so easily.

Cheers.


Return to posts index

Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 9, 2016 at 5:05:53 pm

the link you sent requires access. please post a public link so we can downloading without requesting access. also please share some screenshots to what you are doing and trying to accomplish and what appears to be wrong. you can copy paste them in the text field or drag and drop.

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Alexi VanderstraetenRe: AE Mocha Tracking Planar Surface
by on Dec 9, 2016 at 5:33:44 pm

Thanks for your reply. It's now corrected, the share wasn't done properly.

In this one the Planar is set correctly:


This one is the same, tracked a few frame further and the planar moved out of the correct prespective:


This is the result I'm aiming at:


Return to posts index


Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 9, 2016 at 8:24:11 pm

closing the window would have probably be a good thing. 80% of what you are tracking, you cannot use because it's the view outside that's not good for you to track.

1. trim the footage to just the necessary part:


2. zoom timeline to see just the range I trimmed earlier


3. choosing a proper frame where the whole window is visible. choosing 2 other layers for the track matte. you don't want to track the window itself, just the frame... use these settings - set perspective. for the main track increase pixel used...


track backward

4. setting my planar surface. inserting a grid to make me better see if my track goes well (use that or planar grid)


5. at one point I have to check one track off (upper window) because it's not visible anymore



6. make sure I adjust the tracked area of the window because it's shrinking as I track on accoung of the scenery outside moving. there will be more adjustment along the way of the tracked area to get as much searchable area as I can


7. track forward. don't forget to check on the windows... I did ☺

there is also some manual labor involved here to get it to be more accurate.

8. set my planer surface to have more room like this


9. export my tracking data like this


10. paste to... the footage!


11. add CC Power pin effect and copy all my values from Corner pin to Power pin


12. check unstretch


13. now I have this


14. this is where I do my compositing.


15. when I am done precomp the whole thing call it stabilized and place it over the original video. paste the original corner pin over it



a lot of compositing still to be done but hey! now you do it!



the full workflow is here curtosy of one of our community's gurus Rick Gerard






Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 9, 2016 at 8:58:36 pm

here is another method for after the tracking in mocha:
1. now more prepared in Ae set your composition to have the video and another duplicated trimmed video on top

2. in mocha set the CTI to the first frame of reference - the first frame when you started to track (it's going to have a keyframe too) and push the planar surface to the corners

3. export as invert

4. paste on the trimmed video. now you have a stabilized window, all the rest moves

5. precomp->move all attributes and call it stabilized

6. here you composite

7. when you are done step back to the master comp

8. in mocha export again this time with no invert

there may be an error because of the large corner pin distortion, we don't mind a little cropping because our original video is underneath



Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 9, 2016 at 10:01:21 pm

and the third straight forward method would be to

1.copy the tracking data like this


2. apply it to a solid

precomp the solid->leave all attributes and insert the image in the solid and fit to frame Ctrl+Alt+F

3. precomp - leave all attributes


4. put the image here


5. ctrl+alt+f to fit to frame


6. do some masking work (not so intuitive because it's corner pinned)



and you're done.

now about motion blur

1. method #1 Power pin - sorry, will have to ask Rick about that, but since you copy corner pin that does not support motion blur so no motion blur

2. method #2 (my favourite method so far) you could just mask out the area of the composite in the precomp using a stencil alpha solid (set a solid on top of everything and set it's blend mode to stencil alpha). and in the master comp enable motion blur for the layer

3. method #3 - just enable the motion blur switch.


Take you pick!

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index


Alexi VanderstraetenRe: AE Mocha Tracking Planar Surface
by on Dec 10, 2016 at 9:51:11 am

First of all THANKS! For taking the time and for giving several options. I learned a lot from all this.

I understood and managed the first and third options but it's not looking as good as I'll like it to be. Nevertheless, a mix of option one and what I was already doing gave me the results.

For the second one, I blocked at point 4. It's not following the window what so ever. As I wasn't sure, I've try by setting the CTI at the first frame where the tracking starts (the one where we have the first information for the window to track) and as well set it to the first frame I started tracking from, the frame when we can see the window the best. Both give different results but none follow the window.

For the third one, I just found it not practical for compositing with precision, or I'm missing something.

Thanks!!!


Return to posts index

Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 10, 2016 at 10:21:35 am
Last Edited By Roei Tzoref on Dec 10, 2016 at 5:19:44 pm

As for step 4 in method #2: if you paste the inverted corner pin data, it will stabilize the shot . Here it does not matter where you copy from as long as you paste at the beginning of the trimmed track. when you re-introduce the motion to the stabilized comp it is important to find the first frame you tracked from in Mocha (there should be a key-frame), push planar pin to corner and export with no invert.

Here is the project file folder. See how it works and Let me know about the issues you are having: https://drive.google.com/open?id=0B5wyUt17-tu2WDFEQVZvR2tudlU

btw I got a response from Rick about method #1 - he does the Motion blur manually with directional blur or use CC Force Motion blur effect on the stabilized precomp in the master comp (much better in my opinion)

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Blaise DourosRe: AE Mocha Tracking Planar Surface
by on Dec 13, 2016 at 12:27:14 am

Holy crap this is a complicated way to go about it. Why not just do a 3D camera track, mask the window out, and place the footage way back in 3D space? That way you get some parallax motion between the room and the background.


Return to posts index


Blaise DourosRe: AE Mocha Tracking Planar Surface
by on Dec 13, 2016 at 1:23:17 am

Here, take a look at this AEP file. I ran a 3D camera tracker on the footage (track data would have been cleaner if I knew the camera used and the FOV of the lens), a quick Roto Brush on the window, and used the camera track data to place a Null on the brick wall outside, which I then used to place an image into the scene.

10874_windowreplacement.aep.zip

You'll need to relink your footage and find an image to replace the one I placed in the scene.

This method allows the exterior image to move with the camera, and not appear to be tagged flat onto the window frame. There are cleaner ways to mask out the window, and Mocha might even be a good choice for that. But for realistic image placement within the scene, this is a great way to go.


Return to posts index

Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 13, 2016 at 9:19:13 am
Last Edited By Roei Tzoref on Dec 13, 2016 at 1:46:22 pm

Blaise,

thank you for sharing the technique.it didn't occur to me to use 3D Camera Tracker and this seems like a good choice since there is a lot of perspective information in the scene. it seem to work well and if done successfully it's a good approach for keeping it Native too.

got a few questions for you:
1. did you prep the footage other than trimming before you tracked it? I tried to apply the 3D Camera tracker and in CC2017 it was stuck on solving, in 2015.3 and 2015.2 after analyzing it just crashed my Ae. tried rendering it lossless QT Animation and track again - same result.

*Edit: I managed to overcome this problem by trimming just before the window appears, although in your example I see you have tracked data from the beginning of the whole shot. still manipulating 3D Camera tracker for this shot was unresponsive at times and proved to be unstable crashing my software.


2. I see you did not leave the fixed angle on the tracker and specified an angle of 50:

care to share how exactly are you figuring out the right angle so that the tracker would be accurate if you don't have the angle of view from the camera? I actually looked for a guide on doing this but was not able to find one

*Edit: the default pixel error I get with fixed angle of view is 1.39 pixels. if I change the shot type to "specify angle of view" I get a 55.9 Horizontal angle and the error drops down to 0.95pixels - you got 0.97pixels - so is that what you did? just change to "speficy" because I have may learned a new trick right now to make my tracks instantly better :)

3. as for this

[Blaise Douros] "This method allows the exterior image to move with the camera, and not appear to be tagged flat onto the window frame. "

just to clarify, you can do this also with the 2d tracking technique with mocha by setting your window replacement to use a track matte of your window and apply it the same tracking data of the track matte, then setting it to 3D and setting off it's anchor point further away in Z position. there is actually no true 3d information you need outside the window and offsetting the flat window track in Z space will prove to be fine for this purpose I think.

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Blaise DourosRe: AE Mocha Tracking Planar Surface
by on Dec 13, 2016 at 4:30:25 pm

Hey Roei,
Great questions. Answers follow:

1. No, I didn't prep the footage; the one thing that I did differently was track from the beginning of the clip until the camera pans over to the hallway, to give the 3D tracker more movement data to work with. When it solved the camera, it gave me "Error, could not solve camera for these frames" towards the end, but that didn't matter to me--all I wanted was the window data, so I trimmed the clip on which the tracker was applied so those error frames wouldn't appear. I ended up putting a duplicate clip (with no tracker applied) above the exterior plate to use for the rotoscoping, but left the tracked copy in for reference.

2. I've found that the 3D Camera Tracker is somewhat good at guessing AOV, but whenever I have any information on the angle of view, I specify it. I've done a lot of testing, and it seems to make the tracker more accurate--and that makes sense, given that After Effects can now estimate the expected depth and movement of the scene based on the lens width. At the very least, it results in a virtual camera whose focal length (and thus, characteristics when interacting with the virtual objects in the scene) match the taking lens. As for how I guessed the angle...it was just a guess based on what I could see in the scene. I shoot as well as edit and work in After Effects, so my eye is somewhat accustomed to estimating that kind of thing.

3. Yes, that's true, but it's nice to be able to do it so quickly based on the tracking information in the scene, and as you say, without leaving AE. But I take your point. Mocha is probably a better and more accurate choice for tracking the window frame and building the foreground matte. I like the 3D camera tracker for a lot of other applications (I do a lot of titles that are tagged into the scene's 3D space), so I've gotten pretty comfortable with it--it's an easy solution for a lot of problems. I need to get more fluent in Mocha, though. Great conversation!


Return to posts index


Roei TzorefRe: AE Mocha Tracking Planar Surface
by on Dec 13, 2016 at 7:10:15 pm

[Blaise Douros] "1. No, I didn't prep the footage; the one thing that I did differently was track from the beginning of the clip until the camera pans over to the hallway, to give the 3D tracker more movement data to work with. "

yes. there is no point tracking when the window leaves the frames. strangely in my setup I can't seem to solve it from the beginning of the shot but only right before the window appears - which is just as good of course, just makes me wonder why didn't it work

[Blaise Douros] "I've found that the 3D Camera Tracker is somewhat good at guessing AOV"

this is great info. I will try that in the future.

[Blaise Douros] " I like the 3D camera tracker for a lot of other applications (I do a lot of titles that are tagged into the scene's 3D space), so I've gotten pretty comfortable with it--it's an easy solution for a lot of problems. I need to get more fluent in Mocha, though. Great conversation!"

I tend to not use 3D camera tracker because my needs are more with compositing in 2d for vfx and not adding titles. I find it's much easier for me to composite in 2D than in 3D (it is a pain really). I know I should use it more though.. especially when there is perspective information in the scene.. you got my exercise files and I got yours so I will be happy to trade information in the future of you have any trouble with mocha, and I will use your knowledge with my 3d track solving...

here's a thread with a 3d camera tracking and composting I am actually proud of since I don't do it much and mocha would have been a little more pain doing it I Imagine ☺ https://forums.creativecow.net/thread/2/1116664

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]