Image Effects  by cecilia
Cecilia's Excellent Blue Screen Adventures
-or- How I learned to love ImageFX's CineMatte Hook

[note: click on any of the image thumbnails in this article to see them in full size]

The use of trick photography and special effects (a term first used in the credits of the 1926 film, What Price Glory) walked hand-in-hand with the infancy of still pictures and later with film. Those who were lucky enough to pioneer this new technology, built their own cameras and projectors and invented new techniques as they went along. Many films made a hundred years ago, were just excuses for showing off special effects. Things haven't changed much it seems.

Early film pioneers realized that they could amaze viewers by placing unlikely events together on one screen, such as a human standing on the moon (well, it WAS unlikely then). In the 1890's, movie goers began seeing lots of new effects, including: glass shots, double exposures, models and miniatures, rear and front projection and in-the-camera matte shots. "Wow", the audience would shout! And that "Wow", is what art is all about.

Essentially, all of these different techniques had one goal, to get two or more visual elements to appear in the same frame. The use of computers has not altered this simple reality in any way. Computers, for the most part, just emulate what is done in the real world.

Move forward in time about fifty years to when travelling mattes, using blue screen, began coming into popular use. Petro Vlahos was commissioned by MGM to devise something similar to the sodium matte system (yellow) he had created for Disney. According to him, it took six months of thinking before he came up with the blue screen idea. No joke. (He describes sitting at his desk looking out onto Hollywood blvd spending hours everyday just THINKING!) After all this brainpower they first used this clever technique in the 1959 film Ben Hur and the rest, as they say, is history. In 1976, Vlahos founded the Ultimatte Corporation.

Move to the present.



Blue Screen

Those of you lucky enough to have a Video Toaster Flyer and who want to make your own epics would do well to learn about blue screen. First, a few rules for shooting people against blue. The point is to solve most of your problems from the start, so when you are done shooting the rest can go smoothly.

Rule 1: Complete Separation

The whole point of blue (or green) screen technique is to physically separate the erstwhile actor from his blue background so that you can plop him onto any environment you like. However, before you start up ImageFX, intelligent lighting and subject placement will avoid that most horrid of Hollywood activities: "Fixing it in Post". Only 20 year olds in suits say such things. I expect better of you all.

  • Avoid blue in the actors bodies, eyes, or clothes

    People with light or sallow skin work well against blue, while dark or reddish toned skin works well against green. That's because green and red are opposites, and blue is a contrast to yellow. This contrast helps to separate the elements. Of course, rules are made to be broken... a sufficiently different blue cloth can still be worn, but it could make things very difficult. You have been warned!

  • Avoid blue-spill

    Actors or props that are too close to the screen will pick up some reflected blue or green. Any shiny surfaces will also reflect blue. So, move actors away from the wall several yards and avoid reflective surfaces. Dulling spray, some leathers and other materials will still reflect some wall color. It is best that every surface is matte. Examine costumes carefully.

Rule 2: Sharp Edges

  • Lighting is critical

    Ideally, you want a room that is big enough to light the walls separately from the actors. The walls need to be all the same tone - no deep shadows, just a nice overall blue. Back-light and/or side-light to better separate the actors from the screen. If the scene calls for the actors to be in the dark with shadows, like a Film Noire scene, then light the room blue (with blue light or blue gel). Then light the actors with yellow or red gel (not so much as to make them look yellow, just enough to counteract all that blue and to make their shadows not have any blue in them). This will also give the subject's edges more definition. The computer will look for these edges when creating the matte. So, shoot it right the first time - and you'll still have all your hair. ImageFX's CineMatte is very forgiving, but that doesn't mean you should be sloppy.


The Paint

You can actually buy Rosco blue and green paint and make a blue room or wall for your epics. The paint is expensive - about $50 a gallon. Ouch! But if you find a place that will mix paint for you, it's possible to create a nice not-too-dark, not-too-light, blue. Just make sure that no red gets added to it.

The Paper

There is paper that's made for this purpose, too. I've read somewhere, though, that different kinds may have red in it due to chemical additives in the fire retardant that gets applied to the paper.



The CineMatte Hook (ImageFX v2.6)

The CineMatte Hook was first introduced with ImageFX v2.6. Since then, it has been much improved; but, this earlier version can still get the job done. First, you need to have a good understanding of the hook's basic parameters - and then we'll get into the hands-on tutorial.

The options available in the CineMatte Hook:

  • Screen Color: Choose Blue if the subject is in front of a blue screen, Green when the screen is green.
  • Output: This is what you will want rendered by the hook. You have three choices for this process:
    • Matte & Keyed FG: The Main buffer is keyed over a black Swap buffer and an Alpha buffer is created. This is useful if you want to make alpha channels for compositing using Lightwave.
    • Composite Only: The Main buffer is composited over the Swap buffer; but, no Alpha buffer is created. This is what you will most often want when compositing in ImageFX.
    • Matte & Composite: Both Compositing and Alpha buffer creation occur. Useful for multiple composites. That is, the actor can be composited now and the Alpha buffer is retained to composite him, later, in another environment.

    We pause for a moment while I explain an important idea. When you have an image in the Main buffer, ImageFX can automatically make an Alpha (grey) version from that Main buffer. Before you use the CineMatte hook, try this: While looking at the Main buffer, click Alpha and select Copy to Alpha. ImageFX copies the Main image into the Alpha buffer. If you want to see it, click Alpha and select Swap. The Main buffer gets swapped with the Alpha buffer and now you can alter the alpha image in any way. When you are done looking, swap them back to their correct places, click Alpha, Swap. Easy, but this Alpha buffer sucks as a matte because the part you want to be transparent (the white) is muddy and the part that should be black will not block out the blue screen effectively. A lot of midrange greys makes for a lousy matte.

  • Dynamic Range: CineMatte looks at the elements in the main buffer to decide how to make the resulting Alpha buffer. This is why using the hook is better than just making a muddy alpha buffer. Dynamic Range pulls the grey tones into darker greys and blacks and the lighter greys get pulled toward white. You get the entire range from 0 to 255 to play with.

    When "Pulling Blue" (separating actors from the blue screen) we need to have more control over what the Alpha buffer will look like. It needs to be better than just a "greyscale" rendering. Giving a matte a better "window" will result in the compositing process being much more successful. By setting Dynamic Range to ON (checkmark in box), dark values will be scaled toward black and light values toward white. While the demarcation is kept grey to soften the edges.

  • Darken BG: If the blue screen in the Main buffer is uneven or too light compared to the actor (who is considered the foreground) this will result in a matte whose black areas aren't dark or opaque enough. Increase this value to compensate for the Main buffer's deficiencies.
  • Brighten BG: This is a similar function to the above, only it's for lightening up a too dark actor (foreground) and getting the light parts of the matte to be white.
  • Remove Halo: If you see blue along the edges, this will help sharpen them up. Be careful not to overdo it, or you'll distort the edges. You just want to remove the blue, not make weird angular edges on your actor!
  • Protection: Use this when you want to prevent removal of some blue or green in the actor. If there is a subtle amount of blue in, say, a shadow under the arm, removing all the blue would either cause a hole in the matte or make the cloth look unreal or flattened; in reality there is some blue in most surfaces. This lets you maintain realism while improving the composite. Usually, a setting of 1 is sufficient.
  • Remove BG: When you are keying the Main buffer, this determines how much of the background color will be removed. A value of 0 will remove nothing, 255 will remove as much background color as possible.
  • Restore RGB: The color that will replace the removed background when keying the foreground.
  • Blend: This is how much the foreground is mixed with the Composite. Usually, leaving it at the default of 255 is fine. I don't think I've ever touched it myself. But who knows about the future?

When tweaking numbers in CineMatte, think of it as a fight between the Forces of Dark and Light (go ahead and laugh but you'll all remember this). After darkening the background and lightening the foreground, the "fight" is localized in the edges of the actor. Look at the fingers, the hair (ack!) and other troublesome areas. These numbers will pull the darker and lighter greys over and around these edges. When you can no longer see the blue, but before the hair gets clipped off - that's when you've got it right. And peace reigns in the land of the good. Hurrah!

This older version of CineMatte may seem "simple" but I used it for the film, Hologram Man. We (AI, Effects) were contracted to do 140 shots in three months and ended up doing 191 shots in the same period of time. We were given digitized film footage of the actors against a blue screen. I had to pull them off the blue and save the resulting "Beauty" pass (beauty means it has the color information) and the resulting matte. There were four people on the job, with three Amigas. The next time someone says Amigas can't be used for professional jobs, tell them THAT!

Nova Design has also made a version of CineMatte for use with PhotoShop and Aura. It works basically the same way. When I have a moment I may write a mini "how-to".



The CineMatte Hook (ImageFX v3.2)

Let's put the new version of CineMatte to the test, shall we? Because pictures can express a thousand words, we'll look at two examples of blue screens.

Gantry

Hologram Man


Learn to really LOOK at the screens. Hologram Man has a generally even blue screen. There's no heavy shadowing; but, there is a lot of blue spill on the guy's right arm and on his dark hair. Those silly, shiny leotards! Whose idea was THAT?! We'll look more closely at the gantry picture later, because it's really bad.

If you wish to follow along with the tutorial, you will need to first download the tutorial file archive (67K) here: blue.zip. Note that the images we have provided for this tutorial were saved in the JPEG format in order to keep the archive size minimal. Ideally, you would do your work with lossless image formats.

Bugs, Bugs, Bugs

On some systems, v3.2 of CineMatte, has a couple of bugs that you need to be aware of . Hopefully, these bugs will be fixed soon.

  • CineMatte does not retain the last used values when you re-enter the hook. During testing this can be very annoying. So, I always Save my CineMatte settings and Load them when I return to the hook. This may seem like extra work but it will save you time. Saving each of your test settings though, has the advantage that you can recall any previous values quickly. This is a good thing.
  • When you switch between the Matte/Key/Output menus (without leaving the hook) your settings will revert to what they were before you changed them. If, for example, you start in the Matte Menu and change the Force Black to 35, then toggle to the Keying Menu, and then back to the Matte Menu you will see the Force Black value is at it's default 0. To get around the problem, after changing a value save the setting. After moving to another menu, load the just saved settings and alter a value in the new menu, then save again. Yeah, it's a pain. But this way you keep your exact settings. It's not as bad as you might think, because the best way to work with this hook is to change only one or two values at a time - subtle and careful alterations.
Now that that's understood, start up ImageFX v3.2+ and let's begin.
  • 1. Load Leaf_BG.jpg.
  • 2. Load HologramMan_orig.jpg. Make sure this is the Main buffer.
  • 3. Click Hook and select CineMatte.
  • Screen Color: in v3.2 you have a choice of background colors other than blue and green. When set to Set Any Color you can click on the eyedropper gadget (ain't it cute!) and click somewhere in the preview image and voila!, the RGB values are set to that color automatically. When set to Detect Any Color it will make a guess at what your background color is. Actually, as soon as you start up the hook, it looks at the buffer and guesses what the screen color is. It is usually right, so I leave it alone.
  • 4. Set Output to Matte & Composite.
  • 5. Toggle to the Matte Menu. It's not the first one up but I always use it first.
In the Matte Menu:
  • Force Black: makes the background darker.
  • Force White: makes the foreground lighter.
    The best way to work with these is to test them one at a time, starting with the Force Black value. On even the best blue screens there will be variations in coloration, but CineMatte can help us find a good value.
  • 6. Click on the eyedropper gadget to the right of Force Black. Then click in several areas of the blue screen in the little preview image. You should see values ranging from around 80 to 99. For this image, setting Force Black to 96 should be about right.
  • 7. Save these settings with any name you like (it will be saved in the Storage/CineMatte directory).
  • 8. Click Okay.

Examine the result. If the Force Black value is about where it should be, there will little or no blue showing on the edges of the subject. If it's too high, you'll see areas along the edges that are cut away. Pay close attention to the hair, it'll be the first to go because it is the darkest area.

At this point the white parts of the matte are probably mottled in greys. To see it, we need to look at the hidden Alpha buffer.

  • 9. Click Alpha and select Swap. See the grey spots at the top his head?
  • 10. Swap back to the composite.

Next we set the Force White value.

  • 11. Use Undo to get back to your original blue screen image and then return to CineMatte, load in the previously saved settings if you need to.
  • 12. Use the eyedropper next to Force White this time, to test for the white value. Click around the blue. If you set this too high you'll make a matte that's got blobs of white here and there. Ack! If you've got a good graphics card, you may be able to use the Preview function to help set this value, but you will still want to check your matte to be sure. Redo Steps 7 to 13, making adjustments to the Force White value until there are no grey areas in the white part of the matte. Grey should only be on the edges.


BAD Matte


Above is an example of the Force Black value at 96, the Force White value at 76 and everything else at default. Composited against the green leaves, you can really notice the blue edges. This matte is okay, but there is still more that can be done to improve it.

  • Matte Choking: is what you'd like to do to that aforementioned 20 year old suit, who wants someone else to solve the problems he caused by not thinking ahead. Seriously, if there is blue spill on the actor Choking with a value of -1 will likely be enough to "pull" the matte "in" slightly. Positive numbers will "push" the matte "out" and make halos around the actors. Which might be cool for some "saintly" effects.
  • 13. Return to Cinematte and Load your settings, if you're not already there.
  • 14. Set Matte Choking to -1.
  • 15. Save and click Okay to see how it looks so far.


CHOKED Matte


Wow! That's a vast improvement. You could leave it like that or play with a few more settings. I feel the matte is good but the edges seem just a little too sharp. The actor looks like he has been cut out and pasted on. Let's see if we can soften him up.

  • Gamma: can be used to keep the greys on the edge grey while darkening the blacks and lightening the whites. It's important to have subtle edges or it will be obvious that a composite has occurred and your epic will look like a weather report. Ugh! If your Force White value is too low then increasing the Gamma will just darken those little bits of grey inside the white area of the matte. The result would be that you'd get funky holes inside the top of your actors head (if he has dark hair). Some mattes do not need a Gamma setting. Be conservative. Only change one value at a time and you'll keep control over the process. I believe this is why many people regard this process with eyes a-rolling in their heads. It's "too much work" and not "sexy" enough. Poo! I say. I love the subtlety. Just take one step at a time and it will work fine.

In the case of HologramMan, Gamma needs more room to squeeze those blacks and whites.

  • 16. Return to Cinematte and Load your settings, if you're not already there.
  • 17. Set Force Black to 96.
  • 18. Set Force White to 40.
  • 19. Set Gamma to 82.
  • 20. Matte Choking should be at -1.
  • 21. Save and click Okay to see how it looks so far.
  • Matte Blur: will add a Gaussian blur to the Matte. But don't go nuts with it, or all the detail will be removed from the edges. This can diminish some yucky pixilation in the matte or soften harsh edges. It looks like this might be just what we need.
  • 22. Return to Cinematte and Load your settings, if you're not already there.
  • 23. Set Matte Blur to 1.
  • 24. Save and click Okay to see how it looks so far.

But there's still that annoying spill to deal with.

The Output Menu:

This works sort-of like it did in v2.6. Just make sure you've already determined what the matte will look like. Then you can go to this menu and use Protection. If you want to keep a little of the background color in the actor a 1 is usually best. However, we want to remove some of that color.

  • 25. Return to Cinematte and Load your settings, if you're not already there.
  • 26. Toggle to the Output Menu.
  • 27. Set Protection to -3.
  • 28. Save and click Okay to see what that looks like.


GOOD Matte


Oooh! Much better. Softer, lighter edges. Ok, I admit it's a bit compulsive. But that's what you need for this kind of work.


Let's look at the gantry picture now. Look at the extreme variations in the blue. Deep shadows angled next to much lighter tones of blue. A real mess. Plus, this shot needs a Garbage Matte. This is an old film technique to cover shmuts (dirt), pieces of the set that got into frame, heavy shadows or anything else that would interfere with making a perfect matte.

We briefly pause while I explain.

How to make a garbage matte: On a black buffer with the gantry in the Swap buffer use one of the drawing tools (like Filled Box) to put blue spots where needed. Turn on the light-table to see through to the gantry picture. You can use a pure blue (0,0,255) or pick a color from the scene you are working on. Then Composite Matte. One garbage matte will work if there is no or little movement around the "garbage". Otherwise you'll have to make several or even (horrors!) a "traveling garbage matte"!! ACK!

Just to see how bad this screen is, look at this:



BAD Matte


CineMatte made this with all defaults at 0. Now, that's one UGLY matte. Let's see if we can do better.

  • 1. Load Leaf_BG.jpg.
  • 2. Load Gantry_orig.jpg. Make sure this is the Main buffer.
  • 3. Click Hook and select CineMatte.
  • 4. Click Defaults to reset all the settings.
  • 5. Set Force Black to 173.
  • 6. Set Force White to 20.
  • 7. Set Gamma to 56.
  • 8. Set Matte Blur to 3, just enough blur to take the ugly edges off.
  • 9. Save and click Okay to see what that looks like.


Composite


Ok, I left the little red register dots. These indicate the part of this set that moves during the shot. Useful for "tracking" if other compositing has to occur. Later it would be replaced using a garbage matte.

  • 10. Click Alpha and select Swap to see the matte.


BETTER Matte


That is without using a garbage matte, which would eliminate some of the compensation required to overcome this hideous blue screen (such as removing the bricks in the lower left hand corner). I just wanted to show you how powerful CineMatte is.


The Keying Menu:

This works similar to the way the Ultimatte process works, where you use a reference shot of the blue set without the actor in it, called a Clean Plate, to help make the foreground matte. If you are shooting all this yourself, then it should be no problem to get a quick shot of the set without the actor. Otherwise, you can just create your own "blue set" using blues from the existing image. For our tutorial, we'll just use a simple blue plate (R:0 G:0 B:255).

  • 1. Load HologramMan_orig.jpg.
  • 2. This will work best if we just use the green color channel. Disable the red and blue, by clicking the R and B gadgets at the top of the control panel.
  • 3. Click Hook and select CineMatte.
  • 4. Click Defaults to reset all the settings.
  • 5. Set Output to Keyed FG Only.
  • 6. Toggle to the Keying Menu.
  • 7. Click on the file gadget next to Clean Plate and select BluePlate.jpg.
  • 8. Use the eyedropper to set the Correction value next. Again, click in a blue area. This gave me R:-52 G:-139 B:3. The negative values reflect what CineMatte has to add to the RGB values to force a more pure blue screen.
  • 9. Because we didn't use a real Clean Plate, set Clean Plate Error to 100 to compensate for it's errors.
  • 10. Save and click Okay to see what we have so far.


BAD Keyed Matte


OOH, all pink. But this does have a real nice separation - and that's what we want. Remember, you don't have to do everything all in one step.

Why did I use only the green channel? Well, it made the best distinction between the blue screen and the actor which ended up making the cleanest matte. Using the red channel would have resulted in a green guy against blue, which is just too close in tone. While, using only the blue channel would have resulted in a yellow guy against a green screen, and that would never make a good matte.

  • 11. Turn the R and B color channels back ON.
  • 12. Click Hook and select CineMatte.
  • 13. Click Defaults to reset all the settings.
  • 14. Set Output to Matte Only.
  • 15. Toggle to the Matte Menu.
  • 16. Set Force Black to 42.
  • 17. Set Force White to 66.
  • 18. Set Gamma to 60.
  • 19. Save and click Okay.
  • 20. Click Alpha and select Swap to see the matte.


GOOD Matte


Well, that looks like a nice healthy matte. When it comes to making a matte just remember there's more than one way to skin a cat. So to speak.

"Pulling Blue" requires some tweaking. Lots, really. I always render the hook, not just go by the previews, so that I can look at the Main buffer and the Alpha buffer. Magnify the area along those edges and see that everything is good.



Below is the NovaDesign demo reel. About three shots from HologramMan are included.



Putting Things In Motion

Once you've made the perfect matte, save the CineMatte settings and record a macro.

  • 1. Press Shift-1, to start the macro recording.
  • 2. Click Hook and select CineMatte.
  • 3. Load your settings.
  • 4. Click Okay to make the composite.
  • 5. Press Shift-2, to stop the macro recording.

Now batch processing can commence. If you are saving a Flyer clip you'll need to use IMP and in the PROC field write in the name of the script you just made "rx myscript.ifx". Save a 24-bit animation since that's what a Flyer clip is and away you go. In AutoFX you can save single frames. Just load your script, load a Save_As script and you're ready!



The Verdict

Having worked on other systems and with other software (AfterEffects, PhotoShop), I can tell you that ImageFX and CineMatte are swell! It's not overly complex and is a bargain to boot!

My purpose in writing this was to prove that having an Amiga does not mean we are left out of making special effects. Or making professional effects. What's required is brain power, not merely processing power. You can always make your computer faster, but you have to make sure that your knowledge is up to speed first.

Well, that's all kids! Now, go out and make a movie!



Afterthoughts

Petro Vlahos originally devised the Ultimatte process for film; creating blue, green and red separations for the negatives and then printing and compositing them in a certain order. The complexity of his technique is the reason that such amazing composites can be achieved - even around flying hair, smoke and other semi-transparent objects.

Ultimatte's plug-ins for AfterEffects and Premiere, require a reference sequence (for screen correction), a foreground scene (the action) and also a background sequence (live or rendered). Each sequence is placed in a "track" or in its own "layer", as a prelude to composition. CineMatte does not require a series of frames for screen correction. You only need a single frame, although you could write an ARexx script to load a new plate for each foreground frame. Unless you have a long shot with lots of camera or actor motion, there seems little point in making more than one reference frame. Plus, the only way you could really duplicate a complex camera move is with a track. I assuming that most Flyer users only have tripods, so you can lock down; but track, crane, and dolly shots would not be repeatable with the necessary precision. Well, don't sweat it. You probably don't need it, anyway.

One of the reasons the Ultimatte process uses a screen corrected sequence is to pull up any shadow an actor casts and apply it to the composited background. CineMatte does this without needing a clean plate. Wow! The Correction number that you get using the eyedropper works to "bluify" your screen. Just make sure you are clicking on a blue area. When I first tried this, I must have been clicking on some rather unblue parts which made my matte look incredibly mottled. It was not what I wanted at the time, but it's something to remember when I want to do that next great piece of art.

When professionals are shooting blue screen on film, the best approach is to get the screen within a particular range of the wavelength for blue. As with video, the less variation the better. In case you are dying to know, the preferred range is 420 to 450 nanometers. (Are we excited yet?) Unless you plan to have a waveform monitor and vectorscope on the set, you won't know the precise color of your screen. If you're like me, you don't own all that fancy gear - But, you've got an Amiga so, if possible, bring it on the set and make some test frames and load them into ImageFX. Use a light meter to find problem areas on the lit set - too hot, too dark, etc. And everyone's favorite - shoot under the sun. It's free and really can't be duplicated effectively. It's how the Lydecker brothers, Howard and Theodore, shot almost all their miniatures for Republic Pictures' serials and features. They looked so realistic that footage of their planes used in World War II films (1942's Flying Tigers, for example), were thought to be real planes. Flying Tigers was actually nominated for a Special Effects Academy Award; but, was denied it because some of their peers refused to believe that they were indeed miniatures. In fact, there was not one real plane in the entire film (except for a couple of very obvious and grainy stock footage shots, which are clearly separated from the "faked" shots). The large scale mock-ups, not only were incapable of flight, but even ground movement. When the planes had to taxi forward for a shot, they were in reality being pulled by cables attached to trucks!

Wow, that was some aside! Now to return to the subject... If you set up a few tests, you should be able to minimize your matte pulling problems. The only real disadvantage to shooting outdoors is that you can't position the sun (Go ahead, try it). Since you must know in advance how your actor has to be lit to imitate the lighting in the background footage, you'll have to position the set and the camera to start recording just as the sun comes to that correct position. A little tricky; but, if you miss it you'll be "burning daylight". As the Director of Photography folks like to say.

It will be interesting to see how digital cameras affect blue screen technique. Compression is not kind to blue or blue screen footage, as it has a tendency to cause artifacts. I don't know enough about how the Flyer works, to know if it's encoding method will cause some artifacting. If it is a problem, green screen may work better. If possible, make tests to see how different colors perform.



The complete contents of this site are unless otherwise indicated.
The contents may not be reproduced in whole or part, in any form, without prior written consent from cecilia. You have been warned ;)

Need help with this topic? Email Me


Back to 
Articles