Google
  Web lafcpug.org

 More Reviews
 

 

 

  

Tutorial: Shake: Create an Alpha Channel

February, 2008

 

 

Shake: Create an Alpha Channel
Part 2 of a 2 part Tutorial
Find Part 1 HERE

Files for this tutorial coming soon

 


By Johan Polhem


This tutorial is written as an introduction to compositing in Shake. It is assumed that you have done part 1 of this tutorial.

In this tutorial we will briefly cover tracking, roto shaping, slow motion, some transform nodes and some basic color adjustments.

This is what we have now:

Lets start by fixing the "hole" in skaters shirt. The keying did not work here because a part of the shirt has blue tones, similar to those in the sky that we keyed out earlier.

There are a few ways of fixing this, masking or painting it out being the most obvious ones. We are going to mask the "hole" and then use the same tracker data that we used earlier as a starting point for the animation of the roto shape.

Start by duplicating the left side of the node tree that consists of the mask for the bowl and the stabilizer node:

Replace the rotoshape with a new one.

Move your timeline head to frame number 33 and draw a mask with the roto shape on top of the area you want to cover.

You can select to view the last layer in the tree as a reference while drawing the mask.

Select the "key frame" option for the roto shape tool

Now move the timeline head to the middle of the timeline (frame 55) and move the mask and change its shape to fit.

Now move the the last frame (frame 77) and do the same thing again.

Now check all the frames in between and fix those that needs adjusting by moving the mask so that it covers the shirt but NOT anything outside it.

Hint: Try adjusting frames that are as far apart from each other as possible and move your way down. Chances are that if you continue this approach you'll do the least amount of work adjusting the roto shape and instead let the automated movement between key frames do the work for you.

When you are happy with the result, simply attach it to the rest of the tree with another over node:

This footage was shot on 60fps and in strong lighting, which enables a smooth slow down. Lets slow the footage down to 20%, turning one second (25 frames) into 5 seconds (125 frames).
One problem with slowing footage down is that the background footage that is not meant to be moving gets "caught up" in the foreground and you get artifacts.
One way of solving this is to mask the moving bits and slow them down individually from the background.

This problem is now solved for us since we already have a perfect mask of the skater (and bowl) so we can just go right ahead and change the speed of the clip. Shake has a slow motion algorithm that is quite powerful.

Click on the source footage and go to the "Timing" tab.

Scroll down and go to "retiming" and change the value to 0,2. Make the "retimeMode" "adaptive"
And set "motion" to "best". This opens up a few more options, "flowPrecision" and "flowSmoothness". Leave them as is for this turorial.

In order to make the node tree a bit more manageable and my old G5 a bit faster, I will render out from here and continue the work on the rendered new file.

Render out the file with an alpha channel and import it back into the project again. I called my render : "Pre-Render-Alpha".

Hint: To render out, attach a FileOut node onto the last over node in the tree and set the settings to Quick time movie, Animation, Millions of colors+.

Import the file back into Shake and make sure it has the alpha embedded by shifting between "A" and "C" on your keyboard.

The next step is to add the fire behind the bowl.
Import the fire footage by dragging it onto the Node View window or by going to "image / FileIn".

Firstly we want to place the fire in the right spot behind the bowl. Since we want the bowl in front of the Fire simply place the bowl "over" the fire with an over node:

Hint: make sure the "clipping mode" setting in the over node is set to "foreground" since the foreground is bigger than the background.

The fire is not where we want it. Fortunately you can move, resize, scale, flip, rotate and distort footage files in any way you want using some of the nodes under the "transform" tab.

Use "Move2D" to place the fire in the right spot

and then 'rotate" to change the angle

Now that we have placed the first piece of fire footage behind the bowl we realize that it's a bit empty. We need to add another fire.
Duplicate the fire part of the tree and add it to the main node tree with another over node.

Now you can move and rotate the fire duplicate by adjusting existing Transform nodes. I also added the "flop" node that flops the image horizontally.

Now that we are happy with the placement of the fire we have a new problem:
-The fire needs to move with the bowl so that the fire appears to be in the same place.

We will use exactly the same technique we used earlier to make the mask of the bowl move with the camera movements. We would use the same track as before (SkaterTrack) but since we have changed the speed of the footage the tracker key frames will not match the footage.

Place the new stabilize (match move) node below the over node that connects the two fire movies. This will make the match move function affect BOTH fires.

Now lets move on to grading and coloring our footage. The fire already looks good so we don't need to worry about that. The skater and the bowl on the other hand look a bit flat and boring.

Another issue here is that the bowl is over exposed and the skater is not. If we were to adjust them both in the same way we would have to compromise so instead we will separate them and grade them both individually.
Attach a roto shape and draw a shape around the skater. Make it wide enough for the skater to be covered during the duration of the clip but avoid the bowl.

This will isolate the skater and remove the bowl.

Now duplicate the roto shape and the skater and attach it to the original one with an over node.

Now select the rotoshape of the copied version and go to the "color" bar and attach an "invert" node.
Invert simply inverts the color. It makes blacks white and whites black. Since the roto shape is a mask made up of white and black, inverting the color of the mask will effectively invert the alpha channel, which is exactly what we want.
Now we have separated the skater and the bowl.

Well start by adjusting the colors of the skater.
Since we are after a contrasted B&W look we'll start by de-saturating the image.
Go to the 'color" tab and select the "saturation" node. Change the value to "0"

That's a good start, the skater is now desaturated. The next step is to change the contrast since it is a bit washed out. Go back to "color" and attach a "ContrastLuma" node to the "Saturation" node.
Play around with the settings until you are happy with the result.

Hint: The "center" option in the "ContrastLuma" node is similar to the levels effect in After Effects and Photoshop, where if you shift the middle value towards the right, the whole image becomes darker and vice versa.

For the skater, the Center value was moved to the right (0,8), making it darker, and the "Value" which adjusts the level of contras was increased to 1,6.

Now well repeat the same process with the bowl but using different settings since the bowl was over exposed when filmed. The main objective is that they look as similar as possible:

Well, almost done. Just one more thing. The skater does not really look like he is going that high from the bowl, a little bit more air would be nice.

Lets separate the skater from the bowl and the fire, well move the skater up and the bowl and fire down.

Connect the two fires to the bowl by using another over node:

Then ad a "Move2D" node below the last over node:

Since the "move2D" node is below the two fires and the bowl, the "Move2D" node will affect the whole tree above it in the same way. Move the bowl and the fires down:

 

Now do the same to the skater and move him up:

Done.

Now all you have to do is render out.
Just attach a FileOut node to the very bottom of your tree and adjust the settings as you see fit.

Find Part 1 HERE

copyright © Johan Polhem 2008


sponsor lafcpug.org
copyright © Michael Horton 2000-2010 All rights reserved