How do visual effects (VFX) work?

VFX start from the plate, the footage the camera really filmed. A shot then passes through a pipeline: matchmove, layout and animation, FX, lighting and finally compositing. Big films have thousands of these shots: Baahubali 2 had close to 2,500, Avengers: Endgame 2,496.

Film an actor on a rock in front of a green wall, then turn it into a valley with an airship overhead. Key a real green screen, track a shaky camera, stack render passes, roto a leaping stuntman and grow eight extras into a city of thousands, all running live on your graphics card.

VFXClearOpened 5 Sept 202615 min to playFree · no sign-up

In 60 seconds

  1. Real footage plus things that were never there

    VFX start from the plate, the footage the camera really filmed. A shot then passes through a pipeline: matchmove, layout and animation, FX, lighting and finally compositing. Big films have thousands of these shots: Baahubali 2 had close to 2,500, Avengers: Endgame 2,496.

  2. Green screen: make one colour see-through

    A colour-difference keyer asks how much greener each pixel is than its red and blue, compared with the bare screen. That becomes the matte. Spill from the screen tints the actor, fast motion blurs edges half green, and green costumes vanish, so blue is used for those. Sensors have twice as many green photosites, which makes green the cleanest channel.

  3. Rebuild the real camera

    Trackers follow small markers across the frame. From how near and far points slide (parallax), a camera solve recovers the 3D camera path. It needs at least five to eight good tracks, and the reprojection error should be under about half a pixel. Without a solve, CG slides over the floor.

  4. A shot is a stack of passes

    CG arrives as passes (beauty, shadow, depth) and effects as elements. Each joins the stack with a blend mode: over, add, multiply or screen. A holdout matte lets the actor pass in front. Depth fog from the Z pass, matched black levels and grain make CG look filmed.

  5. Roto and paint do the invisible work

    Without a green screen, artists trace the actor with bezier shapes on keyframes. Wires are painted out with a clean plate, and a luma key plus roto swaps a dull sky. Every keyframe and every frame of paint is artist time, which adds up fast across thousands of shots.

  6. Build a little, extend the rest

    Only what the actors touch is built. Matte paintings on 3D cards, CG cities and crowds of CG agents fill the rest, all through the matchmoved camera. Baahubali's Mahishmati was built partly at Ramoji Film City and extended digitally, and India's animation, VFX and post-production business was about ₹105 billion in 2025.

The history

From a jammed camera in Paris in 1896 to LED walls, digital armies and 2,800-shot epics made in Hyderabad.

Read the full history
  1. 1896A jammed camera makes a bus vanish
  2. 1927Mirrors build a giant city
  3. 1977A camera that remembers its moves
  4. 1999Time stops, the camera keeps moving
  5. 2015The kingdom of Mahishmati

The full explanation

VFXClear, chapter by chapter

Chapter 1

One shot, six steps

Real footage plus things that were never there, stacked so well you cannot see the join.

Visual effects (VFX) are anything added to or changed in a shot after it was filmed. Effects done for real on set, like rain machines, fake glass and squibs, are special effects (see SFXClear). VFX start from the real footage, called the plate, and add things that were never there.

A big shot passes through a whole pipeline of departments. Matchmove recovers the real camera's movement. Layout and animation place and move the CG models. FX simulates smoke, water and fire. Lighting gives the CG the same light as the set and renders it (see CGIClear for how rendering works). Last, compositing stacks every layer into one picture.

Blockbusters have thousands of these shots. Baahubali 2 (2017) had close to 2,500 VFX shots made by about 35 studios, and Avengers: Endgame (2019) had 2,496. RRR (2022) had about 2,800. Almost every modern film has some VFX, even quiet dramas: removed signs, extra crowds, a cleaner sky.

Try “What VFX is” in the interactive model →

Chapter 2

Green screen and keying

Film in front of pure green, then make every green pixel see-through.

Most VFX shots start with actors in front of a big, evenly lit wall of one colour: a green screen (or blue screen). The colour is picked because almost nothing else in the shot, least of all skin, has that much pure green or blue in it.

A keyer goes pixel by pixel. It asks: how much more green is this pixel than its red and blue? Compare that with the bare screen and you get a number from 0 (actor) to 1 (screen). That number becomes the matte, or alpha: white where we keep the picture, black where the new background shows through. Our keyer is a real colour-difference key running on your graphics card, the same idea Petro Vlahos patented for blue screens in the 1960s.

Real shots fight three problems. Spill: the bright screen bounces green light onto the actor's back and hair, so an actor 60 cm from the screen gets far more than one 3 m away. Motion blur: a fast hand is smeared half green, half skin, so the key must be soft there, not hard. Costumes: a green scarf in front of a green screen simply disappears. That is why a film about a green-clad hero is shot on blue.

Why is green the usual choice today? Digital sensors have two green pixels for every red and blue one (the Bayer pattern), and green carries about 72% of the brightness we see. So the green channel is the cleanest and needs the least light. Blue still wins for night scenes, for blond hair and for green costumes, and its spill is easier to hide. The explosions and rain that were really on set are in SFXClear.

Try “Green screen” in the interactive model →

Chapter 3

Tracking and matchmove

Follow dots across the frame, then work out where the camera really was.

When the camera moves, a CG object has to move exactly with the real world, or it slides and floats. A difference of one pixel is enough for your eye to notice. So before anything is added, someone rebuilds the real camera. This is matchmove.

First comes 2D tracking. The crew stick tracking markers (small crosses) around the set, and software follows each one from frame to frame, like following a freckle through a video. Each marker becomes a track: a path across the picture.

Then the camera solve. Near markers slide across the frame faster than far ones (parallax). From how all the tracks move together, the solver works out where each marker sits in 3D and where the camera was on every frame. It needs at least five to eight good tracks, and more is steadier. The result is a virtual camera that copies the real one, and CG is rendered through it.

The solver checks itself with the reprojection error: put the solved 3D points back through the solved camera and see how far they land from the real tracks. Under about half a pixel is a good solve. Actors' bodies are tracked the same way for digital costumes (see MocapClear).

Try “Tracking” in the interactive model →

Chapter 4

Layers, mattes and blend modes

A finished shot is a stack of passes, merged one on top of another.

A CG object is not rendered as one picture. It comes in passes: the object itself (the beauty), its shadow on the ground, a Z pass saying how far away each pixel is, and more. Effects like smoke arrive as separate elements. The compositor stacks them on the plate in order, like sheets of glass.

Each layer joins the stack with a blend mode. Over lays one picture on another using its alpha. Add sums light, perfect for glows and fire. Multiply only darkens, so it suits shadows. Screen only brightens, gently, and suits smoke and haze. A matte cuts holes: here a roto matte of the actor holds out the airship, so it passes behind her head instead of in front.

Then the hard part: making CG look filmed. Real air adds haze with distance, so the compositor uses the Z pass to add depth fog to the CG, matching the plate. Real footage never has pure black, because haze and lens flare lift the shadows, and it has grain. Clean CG has neither, and it shows. Matching black levels and grain is what glues it in. The colour grade that follows is in GradeClear.

Try “Compositing” in the interactive model →

Chapter 5

Roto, paint and cleanup

No green screen outdoors? Then someone traces the actor by hand, frame after frame.

Most shots have no green screen. To put something behind an actor, a roto artist draws a shape round them with a bezier curve, a line bent by a few handles. The actor moves, so the shape must be moved too. The artist sets it on keyframes and the computer fills the frames between. Fewer keys means less work, but the shape drifts off the body in between.

Paint fixes things that should not be there. Stunts are done on safety wires (the rigs are in SFXClear), and every frame of wire must vanish. With a locked-off camera, the crew film a clean plate: the same shot with nobody in it. The painter copies clean pixels over the wire.

A sky replacement swaps a dull sky for a better one. A luma key picks out the bright, grey sky. But it also grabs anything bright and grey, like a white shirt, so the roto matte is used to protect the actor. Then the actor is graded to suit the new light.

This is slow, careful work. For The Invisible Man (1933), about 63,000 frames were retouched by hand. Roto and paint are now a big part of the work done in India's VFX studios, and the FICCI-EY 2026 report says AI-assisted rotoscoping already saves 40% or more of the time on some films.

Try “Roto and paint” in the interactive model →

Chapter 6

Digital environments and crowds

Build a few metres for real. Paint and model the rest of the kingdom.

Building a whole palace city for real would take years. So film crews build only the part the actors touch: some steps, a gateway, a few metres of wall. Everything beyond is a blue or green screen. Then VFX add the rest. This is set extension.

Far away, a matte painting does the job: a huge painted picture of mountains and sky, placed on a card in 3D so it shifts correctly as the camera moves. Nearer, where the camera would see around corners, the city is built as a CG environment of modelled buildings. The camera's matchmove ties it all to the real set.

Crowds work the same way. Film a few hundred extras, then multiply them: copy the filmed groups into new places (tiling), or fill the streets with CG agents, digital people who each choose how to move. Software like Massive, first used for the armies of The Lord of the Rings, gives each agent a tiny brain.

Indian films use this heavily. For Baahubali, large parts of the kingdom of Mahishmati were built at Ramoji Film City in Hyderabad and extended digitally, and one studio said a scene shot with about 3,000 people was made to look like 50,000. India is also a giant VFX hub for the world: the FICCI-EY 2026 report puts India's animation, VFX and post-production business at about ₹105 billion in 2025, with a lot of it done for foreign films. For filming inside LED screens instead of blue ones, see VirtualProdClear.

Try “Worlds and crowds” in the interactive model →

Test yourself

Frequently asked

What is the "plate" in VFX?

The original live-action footage. The plate is what the real camera filmed. Everything else is built on top of it.

Which step works out how the real camera moved?

Matchmove (tracking). Matchmove recovers the camera path so the CG camera can copy it exactly.

Rain machines and breakaway glass on set are…

SFX (special effects). Effects done for real in front of the camera are special effects. VFX are added afterwards.

What does a chroma keyer actually measure in each pixel?

How much more green (or blue) it is than its other colours. A colour-difference key compares the green (or blue) channel with the other two. The bare screen scores highest, the actor scores near zero.

Why does an actor standing close to a green screen get green edges?

Green light bounces off the bright screen onto them (spill). The screen is a huge lit surface. The closer the actor, the more of its green light lands on their back and hair.

An actor wears a green costume. What should the crew use?

A blue screen. Anything the same colour as the screen gets keyed out too. Blue keeps the green costume solid.

What goes wrong if CG is added to a moving shot without a camera solve?

It slides and floats against the plate. The plate moves with the real camera; the CG stays still on screen, so it seems to slide over the ground.

Why do near markers help the solver find depth?

They slide across the frame faster than far ones (parallax). How fast a point moves across the frame depends on its distance. That difference reveals 3D positions.

A solve has a reprojection error of 0.3 pixels. Is that good?

Yes, under about half a pixel is good. Reprojection error measures how well the solved cameras and points agree with the tracks. Sub-pixel means a tight lock.

Which blend mode suits a shadow layer best?

Multiply. Multiply can only darken what is underneath, exactly what a shadow does.

What is a holdout matte for?

Cutting a hole in a CG layer so something real passes in front. The actor is in front of the CG, so a matte of the actor removes the CG where she is.

Why add grain and lift the blacks on clean CG?

So it matches the filmed plate, which has grain and never reaches pure black. Real footage has grain and hazy, lifted shadows. CG without them looks pasted on.

Why do roto shapes drift when keyframes are far apart?

Between keys the shape is only interpolated, but the body moves in its own way. Between keys the computer blends the two shapes. Real limbs swing and bend, so the blend falls off the body.

What is a clean plate used for?

Painting out wires and rigs with real background pixels. It is the same shot with nobody in it, so its pixels show what was behind the wire.

A luma key removes a grey sky but also the actor’s white shirt. The fix?

Protect the actor with a roto matte. The roto matte tells the comp which pixels belong to the actor, whatever their colour.

Why is a matte painting placed on a card in 3D, not just stuck to the screen?

So it shifts correctly (parallax) when the camera moves. Placed far away in 3D and filmed by the matchmoved camera, it moves exactly as a real distant landscape would.

What is crowd multiplication?

Making a few extras look like thousands, by copying them or adding CG people. Crowds are filmed in small groups and copied, or filled with CG agents.

In a big set-extension shot, how much of the frame was usually filmed for real?

Often only a small part, around the actors. Only what the actors touch is built. The rest is painted or modelled.

Words worth knowing

Plate
The original live-action footage a VFX shot is built on.
Chroma key
Making one colour, usually green or blue, transparent so another picture shows through.
Matte
A black-and-white picture that says how much of each pixel to keep.
Spill
Coloured light bouncing off a green or blue screen onto the actor.
Matchmove
Recreating the real camera's movement in the computer so CG moves with the plate.
Reprojection error
How far, in pixels, solved 3D points land from the real tracks. Under half a pixel is good.
Blend mode
The maths used to merge two layers: over, add, multiply, screen and others.
Rotoscoping
Drawing shapes round a moving object on keyframes to make a matte.
Set extension
Adding painted or CG scenery beyond the part of a set that was really built.

Fork it. Teach with it.

This box is plain HTML, CSS and JavaScript, with no build step and no accounts. Run it yourself and it sends nothing anywhere. The code is MIT. The words, images and videos are CC BY 4.0, so you can reuse them anywhere if you credit “Glassbox, glassbox.how/e/vfxclear”.

git clone https://github.com/bdeeps/vfxclear.git

Built with three.js (MIT), Geist, Instrument Serif (SIL OFL 1.1).

←→ previous / next box · / search

Would you like to see the full page, with the interactive model?