This is my final post about Mocha for a while, I promise. I feel that after honing these skills I’ll have a decent enough grasp on Mocha and Planar tracking to use it freely within my own projects.
Anyways, the following explains my methods for countering two more situations that can make Planar tracking within a shot difficult – both are based around the tracked plane leaving and entering the shot.
Fortunately, Mocha includes several visual aids that can help allign a surface even when it out of shot. (Either partially or even fully.)
Situation 1: Our Tracked Plane Partially Leaves Frame
1.) First, I moved to a point in the footage where the entire plane I wished to track is in Shot. In the case of the first example this was fortunately the first frame.
2.) Next I drew out a spline and carried out the initial track. On the frame where I began the track I then switched on “Surface” and positioned corner pins over corners of the plane. Under “Layer Properties” in Mocha I selected the checker surface pattern. This is a great way to check for distortion.
3.) Next, I switched on Mocha’s “Grid” overlay. (Via the “View Options” panel). The pink overlay grid’s position is relative to the blue “Surface” corner pins.
4.) I positioned the Blue corner pins so that the pink grid was lined up with the edges of my plane. The surface corner points no longer matched the corners of my surface as a result but that’s okay. The pink grid lines form an excellent reference for perspective within the shot.
5.) After playing back the sequence I identified areas where distortion was occurring and found the last frame prior to this where the grid was still alligned with my plane.
6.) I switched on “Adjust Track”, and position my 4 red corner markers on top of the 4 corners of my plane. This created a master frame for my following Adjust Track keyframes.
7.) Next I selected the point in my footage where movement out of frame was at it greatest. Using the pink grid lines and checkered surface patterns as a guide, I positioned the 4 red “adjust Track” markers so that the grid lined up with my surface plane, and that the squares on the checkered surface remained constant with my original reference frame. An adjust track keyframe was then set.
8.) I moved forward in my footage until all 4 corners of my plane are back in shot. Here I re-aligned once again, with all four red markers placed once again on top of the corners of my plane. I set another “Adjust Track” key.
9.) I repeated steps 5-9 every time some of my corner pins left my shot. (Only twice in this example.)
Situation 2: Our Tracked Plane Begins outside the shot, or completely leaves the frame.
This was simple enough to work around:
1.) Instead of tracking the plane from the beginning of the footage, I rather moved along the timeline until I found a point when the plane I wished to track was completely in shot.
2.) I drew a spline around my plane, lined up my surface corners, then tracked first backwards, then forwards from this point.
3.) As my plane was to move in and out of my shot multiple times, I decided to set keyframes for the shape of my spline, each time at a position where my plane was nicely centred in my shot. This was done by moving the spline points into place and hitting “Add Key” under mocha’s “Keyframe Control” panel. Thus my spline had a shape to return to after leaving shot.
4.) With Splines and tracking in place, I enable my checkered surface pattern and my pink overlay grid and alligned them as I did in the previous example.
5.) Finally, I used “Adjust Track” to minimize drift, by adding keyframes just before, during, and shortly after my plane exited the shot.
Check out the following video for the two workflows highlighted above:
Another skill which I have set out to learn this year is compositing virtual elements into live action sequences.This technique can be referred to as “Tracking”, “Match Moving”, and “Planar Tracking”.
First off, I wanted to learn how to master planar tracking.
“Planar Tracking” is a fairly new technology and gains it’s name from how the system analyzes the source video – It seeks out different ‘planes’, isolating surfaces that can be followed through a shot. The user can define a plane for the computer to follow, and if tracked successfully, the movement of the ‘tracked’ object can be used to drive the motion of newly composited elements, or inverseley to stabilize footage within a frame.
A powerful Planar Tracking program is Mocha, by Imagineer Systems. Once tracking information is derrived from a videoclip within Mocha, it can be used in After Effects to animate the motion of any composited layer. Virtual elements can use this tracking information to control what is essentially a camera move that mimics that of the original shot, so that the virtual and live action elements appear to have been shot by the same camera.
My Planar Tracking Workflow took this shape:
1. Live action footage was shot with my digital camera and imported into Mocha as an image sequence.
2. Using “X-Splines” I defined the rough shape of the plane I wanted to be tracked. In this example i used 5 splines, as despite being a square object, 5 points would form a shape that would better describe the movement of the plane throughout the entire shot.
3. With “Splines” in place I then had to set “Corner Pins”. I only set 4 of these, one in each corner of the square plane I was tracking.
4. With these in place I set Mocha to “Track Forward” from a point in the centre of my footage. With this track completed, I returned to the same point and set Mocha to “Track Backwards”. This centre point that I speak of need not strictly be at the centre the timeline, but rather a point throighout the footage when the plane you want to track is at it’s most flat with the camera.
5. WIth the footage succesfully tracked I then clicked to “Export Tracking Data” from Mocha.
6. In After Effects I opened a new composition that matched the dimensions of my original footage. It’s really important to make sure that Clip Dimensions, Pixel Aspect Ratio and Frame Rate are all the same between your Mocha Track and you After Effects project.
7. I placed my original raw footage (From my digital camera) onto one layer in After Effects, then created a new layer, which would include the elements I wished to “Track” into the shot. In the case of this example I opted for a Text layer.
8. With the tracking information copied to my clipboard from Mocha’s “Export Tracking Data” window, I then simply highlighted my new text layer and “Pasted” the information, making sure that the timeline was set to the beginning of my After Effetcs comp.
And that was it! My new text (virtual object ) now appeared to move with my original (live action) footage. Check out my video above for examples of how this process unfolded. From here I hope to further experiment with this technique, and then eventually move into placing 3D object into a live action scenes through a technique which is referred to as “Match Moving”. Stay tuned, folks!
This is the first moving render of my crime novel inspired Interior. Maya Ncloth was used to animate the curtains and standard particle effects were used for the rain outside the window. Both Polygon and Nurbs modelling techniques were used to construct the elements within the scene.
I plan to add some objects to the exterior and further animate the lighting to enhance atmosphere. This project was my first constructed to scale within Maya, and in truth my first proper interior setting.
Here it is, folks! After months of work, I’ve finished my ocean based animation project. What began as a “You know you’ve made it when..” joke, ended up as a 3 month project. T’is rather uneventful, though one could argue that’s just the point. Enjoy!
Along with my experimenting with the Ocean itself, I also set about constructing an oceangoing vessel that would form the main setting for my animation. I started off with modelling what I imagined to be your regular ‘party boat’. This however appeared somewhat lacking in the decadent “International waters party” feeling I was aiming for. I set about turning what was a meagre speedboat into a hedonistic-party worthy mega yacht.
Worth noting is that these renders were taken after basic modelling was completed. Both boats are without texture mapping in each example.
For my current Animation project, I’ve been playing around utilizing Maya’s Ocean Shader system. Whilst realizing this project, several decisions have had to be made with regards to both technical aspects: how I was going to render the ocean in my project, and aesthetic aspects: how I was going to set up the ocean’s attributes to achieve the look I wanted for my scene.
The following refers to the “Ocean Test” video posted below, and maps out a voyage of discovery over many different oceans in Maya. (Please excuse all following Ocean puns.)
Ocean Test 01
At first, I believed the only way to successfully render the ocean in my scene was via Maya’s Software renderer. Of course if I was still to include the Physical Sun and Sky setup, which is native to Maya’s Mental Ray renderer, I would have to split the ocean and sky across separate render layers, and composite them back together later.
Ocean Test 02
For my next attempt, I switched the renderer exclusively to Mental Ray, rendering both the sky and ocean on the same render layer. Notice how reflections and specular highlights appear much more fluid. This is a result of Mental Ray’s far superior light tracing abilities. However, the flip side being that the colour of the ocean appears washed out, and in need of gamma correction. (This seems to be a recurring issue with rendering using Mental ray’s Physical Sun and Sky Setup.
Ocean test 03
Note in my previous render using Maya’s Mental Ray renderer, the colour of the ocean appeared somewhat washed out. . A workaround for this usually involves setting up some sort of gamma correction for the colour of the rendered nobjects surface material.The tricky part here though, was that the Maya Ocean Shader node includes no specific surface colour node.
Ocean test 04
Despite achieving some nice reflections and surface lighting by Rendering my ocean in Mental Ray, I noticed that allot of detail was absent from the surface of my ocean. I gathered this was probably as a result of my lowering the gamma settings of my ocean’s colour channel.
The decision was made to sacrafice the lovely Mental Ray surface reflections and return to an ocean rendered in Maya’s Software Renderer instead. I began playing with different ocean attributes in this test. After a while I began getting results that were looking more and more like an actual ocean. The two Ocean Attributes that I was centering my attention on were the “Wavelenth Min” and “Wavelenth Max” settings.
Ocean Test 05
Finally, having toned back the values on the two wavelenth settings, I arrived at a more mellow ocean. With several further tweaks to attributes such as Specularity, Foam Emission and Offset, I arrived at an ocean I was happy to include in my project.
Check out all of the above examples in motion, in the video:
A homage to Edward Hopper’s famous 1942 ‘Nighthwawks” painting.