{"course":{"slug":"motion-and-audio","title":"Motion, Sound and Music","url":"https://addaly.com/learn/motion-and-audio","level":"intermediate","track":"create"},"lesson":{"slug":"what-a-matte-is","title":"The greyscale image that decides everything","url":"https://addaly.com/learn/motion-and-audio/what-a-matte-is","position":28,"of":72,"minutes":10,"answer":"A composite is one weighted mix per pixel, so the interesting work is in the grey edge values; and a difficult key is solved by splitting the frame into a garbage matte.","keyIdea":"A composite is one weighted mix per pixel, so the interesting work is in the grey edge values; and a difficult key is solved by splitting the frame into a garbage matte, a solid core and a narrow edge band rather than by finding better keyer settings."},"body":{"format":"markdown","text":"## One greyscale image decides everything\n\nEvery composite in every film you have seen comes down to the same operation, repeated: two images, and a third greyscale image that decides how much of each one shows at every pixel. That third image is the matte.\n\nWhite means show the foreground. Black means show the background. The grey values in between are the entire art of compositing, because they are the edges (hair, motion blur, glass, smoke) and edges are where a bad composite gives itself away.\n\nThe operation is called **over**, and in its straight form it is:\n\n```\nresult = foreground × alpha + background × (1 − alpha)\n```\n\nRead it once and the whole discipline unpacks. At alpha 1 you get the foreground. At alpha 0 you get the background. At alpha 0.4 you get a weighted mix, which is exactly what a real semi-transparent edge looks like.\n\n## The vocabulary, which is not standardised\n\nDifferent tools use different words for the same things, which is why documentation is confusing.\n\n- **Alpha channel**: a matte stored as a fourth channel inside the image, alongside red, green and blue.\n- **Matte** or **mask**: a matte held separately, often as a greyscale image or a drawn shape.\n- **Key**: a matte generated automatically from the image's own content, usually colour.\n- **Luma matte**: using another image's brightness as the matte.\n- **Alpha matte**: using another image's alpha as the matte.\n- **Garbage matte**: a rough hand-drawn shape that throws away everything you know you do not want: the edge of the green screen, a light stand, the boom.\n- **Holdout matte**: the inverse, used to stop one element drawing over another.\n- **Core matte**: a shape safely inside the subject, guaranteed solid.\n\n## The technique that solves most difficult keys\n\nAlmost every hard key is solved the same way, and it is not by finding better keyer settings.\n\nYou build **three mattes and combine them**:\n\n> Figure: Three mattes, and the keyer only has to do the third. Steps: 1. Garbage matte (drawn roughly, throws away the stand and the screen edge); 2. Core matte (pure white well inside the subject); 3. Edge band (the keyer runs only between the two); 4. Combine (core OR (key AND garbage)). This is why experienced compositors do not spend long on keyer sliders. Asked to solve a whole frame, a keyer must compromise between a dark jacket that goes see-through and a screen edge that will not leave. Asked to solve a narrow band of edge, it can be pushed much harder than it could globally.\n\n1. A **garbage matte**, drawn by hand, roughly, that removes everything outside the subject. Keyers work far better when they are not being asked to deal with a C-stand in the corner.\n2. A **core matte**, drawn inside the subject, which is pure white. This guarantees the interior is solid even if the keyer produces holes in it: a dark jacket against a dark-lit green screen will always produce holes.\n3. An **edge matte** from the keyer, used *only* in the band between the core and the garbage matte, where the soft detail lives.\n\nCombine: core OR (key AND garbage). The keyer is now responsible for a thin band of edge rather than the whole frame, and you can push it much harder in that band than you could globally.\n\nThis is the single most useful structural idea in compositing, and it is the reason experienced compositors do not spend long fiddling with keyer sliders.\n\n## Reading a matte properly\n\nYou cannot judge a matte by looking at the composite. Look at the matte on its own, and look at it twice.\n\n**Gain it up.** Multiply the matte by 5 or 10. Areas that should be solid white and are actually 0.95 will now be visible as grey: those are the holes that will show as a faint transparency of the background through your subject, and they are invisible at normal exposure.\n\n**Gain it down, or view the inverse.** Areas of the background that should be pure black but are 0.02 will show up. That is background contamination, which appears as a faint glow of the subject where there should be nothing.\n\nIn practice: a matte that looks correct at normal viewing and falls apart when gained is the normal state of a first attempt. Nuke, Fusion, After Effects and Blender's compositor all have a one-key matte view; use it constantly.\n\n## Where mattes come from\n\n- **Keyed**: from colour, covered in the green-screen lesson.\n- **Drawn**: rotoscoping, frame by frame, with splines.\n- **Rendered**: a 3D render supplies a perfect alpha channel for free, plus ID mattes per object if you ask for them.\n- **Depth-derived**: a depth pass or a depth-sensing camera can threshold into a matte. Consumer depth maps are low-resolution and noisy at edges, which is exactly where you need them to be good.\n- **Machine-learned**: segmentation models now produce a usable person matte from arbitrary footage. They are astonishing at the body and poor at hair and motion blur, and they are temporally unstable: the matte wobbles between frames even when nothing moves. Useful as a garbage or core matte; rarely usable as an edge matte without work.\n\n## The free path\n\n**Blender**'s compositor does everything in this lesson (nodes, keyers, mask shapes with animation, matte viewing) and is free and scriptable. **Natron** is an open-source node compositor modelled on Nuke; be aware its development has been intermittent, so check the state of the project before committing to it. **DaVinci Resolve**'s free edition includes Fusion, a full node compositor, which is the most capable free option by some distance. **GIMP** and **Krita** handle still composites. Nuke and After Effects are named in job adverts and neither is required to learn any of this.\n\n## The limitation\n\nA matte is a single number per pixel, and reality is not. A strand of hair thinner than a pixel is a mixture of hair colour and background colour, and no matte can separate them: the information is gone, averaged together by the sensor. That is why hair composites over a new background often keep a faint memory of the old one, and why the fix is not a better keyer but a *despill* and an edge treatment that replaces the contaminated colour rather than trying to recover it.\n\nThe same applies to motion blur, glass, smoke and water. Compositing does not undo the mixing the camera did; it decides what to mix with instead."},"check":{"question":"A keyed subject shows a faint ghost of the new background through the middle of a dark jacket. Viewing the matte at normal exposure it looks solid white. What should you do first?","options":[{"text":"Raise the keyer's tolerance so that darker greens are included in the key, which will push the interior of the jacket further from the screen colour and close the holes.","correct":false,"tempting":"Pushing the keyer globally to fix an interior problem degrades the edge band, which is the part only the keyer can produce."},{"text":"Apply a slight matte erosion followed by a blur, which is the standard fix for a matte that is not fully opaque where it should be.","correct":false,"tempting":"Erode and blur are edge treatments; they do not raise a partially transparent interior to solid."},{"text":"Gain the matte up by a factor of five or ten and look again, because a region at 0.95 is indistinguishable from white at normal exposure.","correct":true},{"text":"Switch the composite from a straight over to a premultiplied over, since a foreground that is being multiplied by its own alpha twice will show the background through any region whose alpha is below one, including a solid interior.","correct":false,"tempting":"Describes the premultiplication bug, which darkens edges rather than making a solid interior transparent."}]},"prev":{"slug":"the-motion-spec","title":"The specification a developer can build from","url":"https://addaly.com/learn/motion-and-audio/the-motion-spec"},"next":{"slug":"alpha-and-premultiplication","title":"The dark fringe and what causes it","url":"https://addaly.com/learn/motion-and-audio/alpha-and-premultiplication"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'The greyscale image that decides everything', in Motion, Sound and Music. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/motion-and-audio/what-a-matte-is (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"The greyscale image that decides everything","courseTitle":"Motion, Sound and Music","module":{"index":4,"slug":"putting-two-images-together","title":"Putting two images together"},"answer":null,"keyIdea":"A composite is one weighted mix per pixel, so the interesting work is in the grey edge values; and a difficult key is solved by splitting the frame into a garbage matte, a solid core and a narrow edge band rather than by finding better keyer settings.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure 4.1","figure":{"type":"flow","steps":[{"label":"Garbage matte","detail":"drawn roughly, throws away the stand and the screen edge"},{"label":"Core matte","detail":"pure white well inside the subject"},{"label":"Edge band","detail":"the keyer runs only between the two"},{"label":"Combine","detail":"core OR (key AND garbage)"}],"title":"Three mattes, and the keyer only has to do the third","caption":"This is why experienced compositors do not spend long on keyer sliders. Asked to solve a whole frame, a keyer must compromise between a dark jacket that goes see-through and a screen edge that will not leave. Asked to solve a narrow band of edge, it can be pushed much harder than it could globally."},"alt":"Figure: Three mattes, and the keyer only has to do the third. Steps: 1. Garbage matte (drawn roughly, throws away the stand and the screen edge); 2. Core matte (pure white well inside the subject); 3. Edge band (the keyer runs only between the two); 4. Combine (core OR (key AND garbage)). This is why experienced compositors do not spend long on keyer sliders. Asked to solve a whole frame, a keyer must compromise between a dark jacket that goes see-through and a screen edge that will not leave. Asked to solve a narrow band of edge, it can be pushed much harder than it could globally."}},"blocks":[{"t":"h2","id":"one-greyscale-image-decides-everything","runs":[{"text":"One greyscale image decides everything"}]},{"t":"p","runs":[{"text":"Every composite in every film you have seen comes down to the same operation, repeated: two images, and a third greyscale image that decides how much of each one shows at every pixel. That third image is the matte."}]},{"t":"p","runs":[{"text":"White means show the foreground. Black means show the background. The grey values in between are the entire art of compositing, because they are the edges (hair, motion blur, glass, smoke) and edges are where a bad composite gives itself away."}]},{"t":"p","runs":[{"text":"The operation is called "},{"text":"over","b":true},{"text":", and in its straight form it is:"}]},{"t":"code","lang":"","label":"Text","text":"result = foreground × alpha + background × (1 − alpha)"},{"t":"p","runs":[{"text":"Read it once and the whole discipline unpacks. At alpha 1 you get the foreground. At alpha 0 you get the background. At alpha 0.4 you get a weighted mix, which is exactly what a real semi-transparent edge looks like."}]},{"t":"h2","id":"the-vocabulary-which-is-not-standardised","runs":[{"text":"The vocabulary, which is not standardised"}]},{"t":"p","runs":[{"text":"Different tools use different words for the same things, which is why documentation is confusing."}]},{"t":"ul","items":[[{"text":"Alpha channel","b":true},{"text":": a matte stored as a fourth channel inside the image, alongside red, green and blue."}],[{"text":"Matte","b":true},{"text":" or "},{"text":"mask","b":true},{"text":": a matte held separately, often as a greyscale image or a drawn shape."}],[{"text":"Key","b":true},{"text":": a matte generated automatically from the image’s own content, usually colour."}],[{"text":"Luma matte","b":true},{"text":": using another image’s brightness as the matte."}],[{"text":"Alpha matte","b":true},{"text":": using another image’s alpha as the matte."}],[{"text":"Garbage matte","b":true},{"text":": a rough hand-drawn shape that throws away everything you know you do not want: the edge of the green screen, a light stand, the boom."}],[{"text":"Holdout matte","b":true},{"text":": the inverse, used to stop one element drawing over another."}],[{"text":"Core matte","b":true},{"text":": a shape safely inside the subject, guaranteed solid."}]]},{"t":"h2","id":"the-technique-that-solves-most-difficult-keys","runs":[{"text":"The technique that solves most difficult keys"}]},{"t":"p","runs":[{"text":"Almost every hard key is solved the same way, and it is not by finding better keyer settings."}]},{"t":"p","runs":[{"text":"You build "},{"text":"three mattes and combine them","b":true},{"text":":"}]},{"t":"ol","start":1,"items":[[{"text":"A "},{"text":"garbage matte","b":true},{"text":", drawn by hand, roughly, that removes everything outside the subject. Keyers work far better when they are not being asked to deal with a C-stand in the corner."}],[{"text":"A "},{"text":"core matte","b":true},{"text":", drawn inside the subject, which is pure white. This guarantees the interior is solid even if the keyer produces holes in it: a dark jacket against a dark-lit green screen will always produce holes."}],[{"text":"An "},{"text":"edge matte","b":true},{"text":" from the keyer, used "},{"text":"only","i":true},{"text":" in the band between the core and the garbage matte, where the soft detail lives."}]]},{"t":"p","runs":[{"text":"Combine: core OR (key AND garbage). The keyer is now responsible for a thin band of edge rather than the whole frame, and you can push it much harder in that band than you could globally."}]},{"t":"p","runs":[{"text":"This is the single most useful structural idea in compositing, and it is the reason experienced compositors do not spend long fiddling with keyer sliders."}]},{"t":"h2","id":"reading-a-matte-properly","runs":[{"text":"Reading a matte properly"}]},{"t":"p","runs":[{"text":"You cannot judge a matte by looking at the composite. Look at the matte on its own, and look at it twice."}]},{"t":"p","runs":[{"text":"Gain it up.","b":true},{"text":" Multiply the matte by 5 or 10. Areas that should be solid white and are actually 0.95 will now be visible as grey: those are the holes that will show as a faint transparency of the background through your subject, and they are invisible at normal exposure."}]},{"t":"p","runs":[{"text":"Gain it down, or view the inverse.","b":true},{"text":" Areas of the background that should be pure black but are 0.02 will show up. That is background contamination, which appears as a faint glow of the subject where there should be nothing."}]},{"t":"p","runs":[{"text":"In practice: a matte that looks correct at normal viewing and falls apart when gained is the normal state of a first attempt. Nuke, Fusion, After Effects and Blender’s compositor all have a one-key matte view; use it constantly."}]},{"t":"h2","id":"where-mattes-come-from","runs":[{"text":"Where mattes come from"}]},{"t":"ul","items":[[{"text":"Keyed","b":true},{"text":": from colour, covered in the green-screen lesson."}],[{"text":"Drawn","b":true},{"text":": rotoscoping, frame by frame, with splines."}],[{"text":"Rendered","b":true},{"text":": a 3D render supplies a perfect alpha channel for free, plus ID mattes per object if you ask for them."}],[{"text":"Depth-derived","b":true},{"text":": a depth pass or a depth-sensing camera can threshold into a matte. Consumer depth maps are low-resolution and noisy at edges, which is exactly where you need them to be good."}],[{"text":"Machine-learned","b":true},{"text":": segmentation models now produce a usable person matte from arbitrary footage. They are astonishing at the body and poor at hair and motion blur, and they are temporally unstable: the matte wobbles between frames even when nothing moves. Useful as a garbage or core matte; rarely usable as an edge matte without work."}]]},{"t":"h2","id":"the-free-path","runs":[{"text":"The free path"}],"role":"free"},{"t":"p","runs":[{"text":"Blender","b":true},{"text":"’s compositor does everything in this lesson (nodes, keyers, mask shapes with animation, matte viewing) and is free and scriptable. "},{"text":"Natron","b":true},{"text":" is an open-source node compositor modelled on Nuke; be aware its development has been intermittent, so check the state of the project before committing to it. "},{"text":"DaVinci Resolve","b":true},{"text":"’s free edition includes Fusion, a full node compositor, which is the most capable free option by some distance. "},{"text":"GIMP","b":true},{"text":" and "},{"text":"Krita","b":true},{"text":" handle still composites. Nuke and After Effects are named in job adverts and neither is required to learn any of this."}]},{"t":"h2","id":"the-limitation","runs":[{"text":"The limitation"}],"role":"limit"},{"t":"p","runs":[{"text":"A matte is a single number per pixel, and reality is not. A strand of hair thinner than a pixel is a mixture of hair colour and background colour, and no matte can separate them: the information is gone, averaged together by the sensor. That is why hair composites over a new background often keep a faint memory of the old one, and why the fix is not a better keyer but a "},{"text":"despill","i":true},{"text":" and an edge treatment that replaces the contaminated colour rather than trying to recover it."}]},{"t":"p","runs":[{"text":"The same applies to motion blur, glass, smoke and water. Compositing does not undo the mixing the camera did; it decides what to mix with instead."}]}],"check":{"question":[{"text":"A keyed subject shows a faint ghost of the new background through the middle of a dark jacket. Viewing the matte at normal exposure it looks solid white. What should you do first?"}],"options":[{"text":[{"text":"Raise the keyer’s tolerance so that darker greens are included in the key, which will push the interior of the jacket further from the screen colour and close the holes."}],"correct":false,"tempting":[{"text":"Pushing the keyer globally to fix an interior problem degrades the edge band, which is the part only the keyer can produce."}]},{"text":[{"text":"Apply a slight matte erosion followed by a blur, which is the standard fix for a matte that is not fully opaque where it should be."}],"correct":false,"tempting":[{"text":"Erode and blur are edge treatments; they do not raise a partially transparent interior to solid."}]},{"text":[{"text":"Gain the matte up by a factor of five or ten and look again, because a region at 0.95 is indistinguishable from white at normal exposure."}],"correct":true,"tempting":null},{"text":[{"text":"Switch the composite from a straight over to a premultiplied over, since a foreground that is being multiplied by its own alpha twice will show the background through any region whose alpha is below one, including a solid interior."}],"correct":false,"tempting":[{"text":"Describes the premultiplication bug, which darkens edges rather than making a solid interior transparent."}]}],"order":[1,2,0,3],"why":null},"prev":{"slug":"the-motion-spec","title":"The specification a developer can build from","minutes":9},"next":{"slug":"alpha-and-premultiplication","title":"The dark fringe and what causes it","minutes":10}}}