CHROMA KEY NOTES / 020
Glass, Smoke and Semi-Transparent Subjects
A clear pane is not full of glass colour, it is full of backdrop colour, so a colour key deletes the middle of a transparent subject instead of cutting around it. On this tool a pane must carry about 43 percent of the subject colour before even one percent of it survives; below that it is removed as completely as bare screen. Glass, smoke and sheer fabric do not need a different slider, they need a different shot or a different tool.
Open the green screen remover ↩
Transparency is a mixture, and the key only measures the mixture
Every pixel in a photograph holds one colour. A glass tumbler in front of a green screen does not store a "glass" value with a separate transparency figure next to it: it stores the light that reached the sensor through that point, which is a weighted mix of the screen behind the glass and the tiny amount of light the glass reflects or refracts back. At 20 percent reflectivity on a bright green screen, most of the green still arrives. The file records a green pixel, and it is not wrong to do so.
The key then does the only thing it can: it scores each pixel by how much of the score comes from green, and clears everything above the cut point that sits in the background region. That is the correct behaviour for a backdrop and the wrong behaviour for a pane. The pane is in the same range as the backdrop because it contains the backdrop. I took the tool's own bundled studio still, a 640 x 420 frame whose screen colour is 0, 210, 106, took the subject edge colour from the photo itself (200, 186, 128), and built single pixels at nine reflectivity levels.
| Subject covers | Pixel stored | Alpha out | Green stripped | Visible |
|---|---|---|---|---|
| 5% | 10, 209, 107 | 0.000 | 102 levels | no |
| 20% | 40, 205, 110 | 0.000 | 95 levels | no |
| 30% | 60, 203, 113 | 0.000 | 90 levels | no |
| 50% | 100, 198, 117 | 0.029 | 79 levels | 3% |
| 70% | 140, 193, 121 | 0.362 | 34 levels | 36% |
| 85% | 170, 190, 125 | 0.786 | 4 levels | 79% |
| 95% | 190, 187, 127 | 0.948 | 0 levels | 95% |
Solve the same arithmetic for the half-opacity point and you get the useful number: a pane needs 74.5 percent subject coverage to reach 50 percent alpha, and 42.7 percent coverage before it rises above nothing at all. That last figure is the practical floor. Anything a camera would call "glass" sits far below it. A typical clear pane of drinking glass reflects 4 to 8 percent of the light at a right angle and a few percent more at a glancing angle, so it lives in the first two rows. A patterned bottle that scatters light might reach 20 or 30 percent in its body. None of them reach 43.
The failure is not a hole, it is a missing middle
This is where glass differs from the other hard cases on this site. A hair strand fails at the very edge, so you get a soft or vanishing outline and a solid interior. A keyed green wall fails where the light is uneven, so you get blotches in the backdrop. Glass fails in the interior of the silhouette: the outline of the object, where the glass is thick and turns away from the camera, reflects more and survives, while the flat face of the pane vanishes. What is left on the page is a rim with nothing inside it.
I built that exact shape to measure it: a 90 by 120 pane of blend pixels with a solid opaque handle underneath, both taking the tool's real subject and screen colours, and ran the preset at four reflectivity levels.
At 30 percent reflectivity the pane lost all 10,800 of its pixels and the handle kept all 2,160 of its own, in the same frame, under the same key. At 50 percent, 1,129 pane pixels were deleted and 9,573 came out fully opaque, which sounds like a win until you look at where the deletions land: they cluster in the upper part of the pane where reflectivity is lowest, so the top of the glass thins out while the bottom stays. At 70 and 90 percent nothing was deleted at all. There is no setting between those outcomes. The pane either reads as backdrop or as subject, and the boundary between the two is a sharp line drawn by the score, not by the object.
The pocket pass does not rescue this. The tool does clear enclosed islands of key-coloured pixels that are three pixels or larger, but a pane that runs to the edge of the visible object is connected to the backdrop through its own reflections, so it is cleared by the flood from the frame border, not as an island. A pane fully surrounded by solid subject would be treated as a pocket, and then you would lose the interior of the object instead of its surroundings.
Smoke and haze have the opposite problem
Smoke, steam, fog and spray are the reverse case. Their centre is close to opaque and their outer edge fades to nothing over dozens of pixels, and that fade is the subject: it is what makes smoke look like smoke. A key has no way to represent a fade except with partial alpha, and this tool only assigns partial alpha to pixels that touch a cleared region. Interior pixels, however faint, get alpha 255 and the spill step, which strips their green.
I built a radial plume out of white smoke over the same screen, 13,517 pixels, coverage falling with radius. The result was 6,436 pixels deleted outright and 7,081 kept, with 0 pixels left partly transparent. Where the plume thinned below the threshold it was cut away in one step, so the falloff that was the subject turned into a torn, hard-edged shape. That is not a tuning problem. It is the same reason smoke compositors shoot on black and use a luminance key: the pixel's brightness carries the transparency, and a colour key has no such pass for a fade it was never given a mask for.
Grain and reflections change the number, not the answer
The instinct when a pane comes out wrong is to blame noise or a bad camera, and it is worth checking that instinct with a measurement rather than a hunch. I added camera-like noise to the 30 percent pane at sigma 0, 2, 4, 6, 8 and 12, changing every channel by an independent random amount, and re-ran the key each time. All six runs deleted 10,800 of 10,800 pane pixels and kept none. The verdict was set by the mean reflectivity, and noise of that size was far too small to move a pixel from inside the key's reach to outside it.
Where noise does matter is near the boundary, and that is the 43 to 70 percent band. A pane sitting at 50 percent is inside the feather ramp, so grain can push individual pixels across it in both directions, and the result is a mottled, speckled body instead of a clean one. This is exactly the kind of band where a subject looks nearly right in a still and shifts as the image is resized, because resizing changes the mean of each pixel. If a pane shows the object sometimes and not others, it is sitting in that band, and no amount of noise reduction will move it out.
What people actually hit, in their own words
The reports from production confirm the arithmetic. A designer tasked with product videos described a rotating object on a black leather stool in front of a green screen: "the black leather and the top of the product reflects so much that the keying eliminates it completely as the color technically matches that of the shadows in the screen its self, and BAM! The item is half transparent. Modifying the key's parameters do nothing to help" (Video SE 15379). That is the 43 to 70 percent band, reached not through transparency but through reflection: a dark glossy surface mirroring a dim part of the screen stores nearly the screen colour and gets eaten.
A short film team with "a glass object falling and shattering into many shards" in the foreground found that the editor "would have to rotoscope all the frames which is not practical on our budget" (Video SE 21571). Rotoscoping is the honest answer, because a human is tracing the outline of the shard where the object exists and not where the camera looked through it. A person asked to key smoke off a black background in Premiere reported: "I originally tried Remove Matte but that didn't seem to have any effect on the smoke video. I then tried Color Key and I was left with what you see below" (Video SE 10579). Two different keyers, the same cause.
The photographer's version of the same wall shows up on the capture side. Someone selling clear acrylic products wanted to "have a completely white background seen through the glass", and found that "my ''slide'' paper is visible through the glass" when they placed a cut-out on white (Photo SE 42546). A studio shooting embossed glass jars reported that "the embossment on the jars is not very sharp itself and thus when we photoshoot it tends to become invisible" (Photo SE 77376). Both are describing the same physics: the only part of clear glass that stores information is the part that does not transmit.
What to change instead of the slider
The fix lives before the keying step, and there are four moves that work, in order of effort.
Give the object an opaque carrier. A label, a cap, a filled body, a coloured liquid, a printed logo. If the silhouette has enough solid subject inside it, the cut-out reads as a product even when the pane itself comes out clean. This is what most bottle and jar photography actually does, and it is why those shots survive a colour key at all.
Put a matte backdrop behind the glass instead of a screen. If you intend to composite the object onto a known background, the background behind the glass should be that background, or something close enough to it that the mixture is the thing you wanted. This removes the key step entirely for the transparent part, and you only cut the outline. The embossed jar studio above had already discovered half of this: their fix was to light the white backdrop from behind, which makes the backdrop the thing seen through the jar.
Key a colour the subject does not contain, and keep the subject off it. If the shot is a person holding a glass, the glass is the problem and the green screen is fine: key the screen and accept that the glass will be a rim. If the shot is a glass alone, a custom key colour only helps when the glass does not transmit that colour, which is rarely true for a clear object on any backdrop.
Use the tool that matches the material. For smoke, a luminance key or an alpha from brightness. For clear glass in motion, rotoscoping or a 3D render with a real glass shader. This site's honest position on that boundary is on when a green screen remover is the wrong tool, and glass sits squarely on the far side of it.
Questions people actually ask
- Is this different from the hair problem?
- Yes, and the fix differs. Hair fails at a one or two pixel boundary, so the whole subject is mostly intact and only the rim is wrong. Glass fails across the whole interior of the silhouette while the rim survives, so the object is mostly missing. For the boundary case, hair, fur and fine edges covers what coverage level a strand needs. For glass, more resolution does not help, because the middle of the pane is transparent at any resolution.
- Would a denser, brighter green screen help?
- It makes the problem worse, not better. A brighter screen means more green arrives through the pane, which pushes the pane's coverage figure down and moves it further into the deleted range. The right direction for transparent subjects is the opposite of the right direction for uneven lighting: less green behind the object, not more.
- Can I key twice, once for the outline and once for the interior?
- Not with one key colour, because the interior is not a boundary. You can build the object as two passes in a compositor: a key for the rim and a separate luminance or alpha pass for the body. That is the standard glass compositing route, and it is outside what a single colour-key page can do.
- What if the subject is only slightly transparent, like frosted glass?
- Work out the number first. Frosted glass in a lit studio often sits near 60 to 80 percent subject coverage, which is the band where the key keeps it but gives it a mottled edge. If the sample comes out above 70 percent, key it and fix the mottling afterwards. If it lands near 50 percent, treat it as clear glass and change the shot instead.
- Does the background I composite onto hide the damage?
- It changes how it reads, and that is worth using. A pane whose middle was deleted shows the new background through it, which is often exactly what a viewer expects to see through glass. The damage shows at the rim, where a faint green or grey edge remains. Composite onto a background with a similar brightness to the screen and that edge reads as a reflection rather than as a mistake.
- What about a person drinking from a glass, or wearing glasses?
- Same rule at a smaller scale. Spectacles and a drinking glass cover a small part of the subject, so the deleted pixels read as a hollow lens or a missing drink rather than as a lost object. Retouch those few areas by hand, or shoot with the glass filled, and key the rest of the shot normally.