JUTSU - compositing book
Images of Fusion flows created for the exercises in "Digital Compositing for Film and Video"

 

Luminance = 0.30*Red + 0.59*Green + 0.11*Blue

Luma key on black, white and gray

Custom chroma keyer - value = square root(sqr(r1-r2) + sqr(g1-g2) + sqr(b1-b2))
(r1,g1,b1) - normalized target color
(r2,g2,b2) - color from image

Bump map - get lum, blur, subtract small amount and then subtract from original lum

Using the built in keyers

raw matte = Green - Red

raw matte = Green - max(Red, Blue)

raw matte = g-max(r,b) with color curve to scale it, gamma slam (not shown) to check for excessive black or white pixel noise, preprocess green screen

Screen leveling - use gradients to adjust for uneven lighting, gradient starts at color (0,0,0) and is added to the green screen matte is pulled using the custom distance map

Screen correction using a GS, a clean GS and solid GS - clean matte is the final matte but the correction matte will often also work in many cases

Garbage matte - combines blue only(none of the girl) and  core(only the girl no blue at all) to get resulting garbage matte, loose matte around girl preserve details and then core taken out

Filter the matte - blur raw matte grain suppression then scale with color curve to reduce noise

Adjust matte size and control edge softness - expand contact via blur, color curves and built in erode/dilate node
soft edge details and spill, hard edge no spill and lose of detail

Despill - green limited by red,  new green = if green > red then red value otherwise green or
spill map is green minus red, and despill is green minus the spill map, subtracted values don't go negative is key

Despill - more of the same but with green limited by blue instead of red

Despill - blue limited by average of red and green, green limited by avg red and blue not shown

Unspill - GS add red and blue subtract green, for BS add red and green and subtract blue,  all values scaled by a color curve, subtract a lot then add little of the other 2 colors back in

Composite = matte*foreground + (1-matte)*background,  scale the matte for transparent effects

Processed Foreground compositing(Ultimatte) - not as easy to understand as the classic method, but it "works"

Add-Mix composite - classic composite with matte attached to color curves to scale them

Edge blending - use edge detect on matte use as a mask and blur final result within the edge itself

Light wrapping - create an internal edge mask and screen the background color over the foreground, may need a blurred version of background for more even effect

Soft comp-Hard comp - soft matte preserves detail, hard matte for core of the foreground, first soft composite with some transparency then hard comp with no transparency and soft comp as background

Premultiplied CGI images - images that are already scaled by their alpha channels, color correction needs to be done on images without premultiplication, un-premultiply by dividing image by it's alpha channel(not  perfect solution but if color correction is minor is not an issue), highlights can be a problem if color exceeds alpha channel values- best solution is separate highlight(specular) render

Screen operation - for forground light emitting elements that don't block background light, 1 - (1-imageA)*(1-imageB)
Weighted screen - create matte from foreground to suppress the background values, this is the scaled background

Image blending - multiply is like projecting an image onto another image, maximum and minimum

Photoshop blending modes - blend is over the base
Overlay - if (base < 0.5) then 2*base*blend otherwise 1-2*(1-blend)*(1-base)
Hard Light - same as overlay but base and blend are reversed  if (blend < 0.5 ) then 2*base*blend otherwise 1-2*(1-blend)*(1-base)
Soft Light - if (blend<0.5) then 2*base*blend + (base*base*(1-2*blend)) otherwise sqrt(base)*(2*blend-1)+2*base*(1-blend)
soft light equation in book is incorrect and when corrected is close to the photoshop version of soft light

Slot gags - 2 high contrast objects, animated and one masking the other

Brightness and Contrast - use color curve set black and white points then curve line to adjust midtones, can use an s shaped color curve to increase contrast without clipping values
Color matching - sample what should be light and dark gray regions in background, find values that add/subtract rgb to make true gray and use to find percentages, the percentages +/- can then be applied to the foreground to make it match the background

Shadows - shadow desnsity, faux shadows

Haze - adjust brightness, contrast and blur to match results of haze

Nonlinear gradient - regular gradient passed through a nonlinear color curve

Glow - make heavy blur and screen with original

Defocus - fake camera defocus  expand/dilate with blur or pixel shifts with a final blur, if focus changes must change both blur and shift amounts

Sharpening - unsharp mask = (1 + brightness)*(image - brightness*blurred image)

Lens flare - screen operation, chage colors by swapping rgb channels

Grain - blue is grainiest of all, use noise with blur to simulate grain, grain is combined by adding and then reduce the bring brightness back down

Adding grain - match grain practice, add grain plate to image and subtract difference to adjust brightness back to original overall value, adjust the RGB grains seperately to match greenscreen grain to the background grain

Adding grain - add grain to a grainless title to match the background grain, final blur on final text so blends in better
grain averaging(not shown) take 5 frames and average them together = no grain

2D transformations - translate, crop, rotate, scale, corner pinning
3D transformations(not shown) - similar but use DVE transform for Fusion

Filtering exercises - bicubic, bilinear, gaussian, mitchell...

Lining Up images - add inverted image to itself and transform until disappears, using offset mask to create clean plate, edge detection lineup = image and target image converted to BW images and edge detection applied, then they are combined in channel boolean, target image to red, and image to green and blue=0, now transform the image by "moving green to red", pivot point lineup procedure for moving and scaling one item to fit another

Motion Tracking, single point and muliple point motion tracking with and without  obstacles, track image corners to moving monitor sequence

Stabilizing - make it still or smooth the motion by smoothing the animation path

Gamma effects on pictures

3:2 Pullup - 24 fps film transferred to video will do a 3:2 pulldown, pullup undoes this to remove interlacing which is bad for filtering (transforms, blurs, sharpening)
AA,BB,BC,CD,DD

Non-square pixels - NTSC resize 720x486 to 720x540 to make pixels square
Frame Size and Aspect Ratio - resize ntsc 720x486 to any 1.33 aspect will make it square
cropping and pillar box to fit video to film, film is "generally" 1.33 aspect(square pixels) with different frame aspects, camera guides

Film to video - calculate and add black bars then resize to video, 3:2 pulldown convert 24 fps to 30 fps

Full Aperture Film - Super 35=full aperture, common center, common top, academy, camera guides

Academy Aperture -

Cinemascope - 2X compression in width, distortions from transforms, scope extraction

Prevent banding - higher bit depth, floating point

Banding - add noise,
increase bit depth, add grain and blur,
display banding vs actual banding - scale rgb down then scale back up if got worse then got banding, if not then display is banding not the image

Color correction on Log images - add/subtract from rgb values not scale, log to linear conversion values for viewing and for compositing

Composite Log images - must convert to linear for compositing

Composite Linear over Log - linear is converted to log, color corrected, converted to linear, log background is converted to linear, they are comped and then fed to a viewer(log2lin with viewing values), the original lin2log conversion values are modified to make the linear fit the log image and rgb values add/subtract to match color
want to do matching in log space not linear

CGI and Log - same as above but un-premultiply the cgi and color correct the background