PTENES
MODULE 3.2

🗂️ Layers & Visual Composition

Professional video is made of layers. AbsoluteFill is the mechanism that lets you stack a background, content, and overlay without manually adjusting z-index or position. Declaration order is everything.

6
Topics
40
Minutes
Intermediate
Level
Visual
Type
AbsoluteFill stack — order = z-index 1st · AbsoluteFill (Background) video / gradient / solid color 2nd · AbsoluteFill (Content) title / list / icons result: background + content + overlay 3rd · AbsoluteFill (Overlay) vignette / fade / effect
1

🏗️ Nested AbsoluteFill — the layer stack

AbsoluteFill is a Remotion component that renders a div with position: absolute; top: 0; left: 0; width: 100%; height: 100%. When you place two or more as siblings (not as children of one another), they stack — just like photographic transparencies placed on top of one another.

Basic 3-layer structure LayeredScene.tsx
import { AbsoluteFill } from "remotion";

export const LayeredScene = () => (
  {/* Container principal */}
  <AbsoluteFill>

    {/* CAMADA 1 — fundo (renderizado primeiro = mais atrás) */}
    <AbsoluteFill>
      <Background />
    </AbsoluteFill>

    {/* CAMADA 2 — conteúdo principal */}
    <AbsoluteFill style={{ display: "flex", alignItems: "center" }}>
      <Title />
    </AbsoluteFill>

    {/* CAMADA 3 — overlay (renderizado por último = mais na frente) */}
    <AbsoluteFill style={{ background: "rgba(0,0,0,0.3)" }} />

  </AbsoluteFill>
);

💡 Practical tip

The declaration order in JSX is the rendering order (implicit z-index). The last child is in front. This differs from CSS z-index—here the code structure is the visual documentation.

AbsoluteFill
100% width+height
Siblings
No children
Order
Last = front
No z-index
Unnecessary manual work
2

🎨 Background → content → overlay

The 3-layer convention is universal in video editing: the background (Background) provides the visual atmosphere, the content (Content) delivers the message, and the overlay ties everything together and ensures legibility. Reversing any layer immediately breaks the hierarchy.

✓ Correct order

  • 1.Background — video, gradient, background image.
  • 2.Content — title, list, main icon.
  • 3.Overlay — vignette, gradient, edge fade-out.

✗ Common ordering mistakes

  • ✗Overlay before the content — content stays underneath the darkening.
  • ✗Background after the content — background covers the text.
  • ✗Everything inside a single AbsoluteFill with manual positioning.
Position 1
Background always
Position 2
Content
Position 3
Overlay
Conventional
Universal in video
3

🌫️ Vignette and dark overlay — readability

The most common problem when combining background video with text is readability. A vibrant, colorful background may have the exact same tones as the white text, making it invisible. The solution is a semi-transparent black layer between the two.

📊 Opacity values for overlay

  • rgba(0,0,0,0.2) — subtle, for already dark backgrounds. Barely perceptible.
  • rgba(0,0,0,0.4) — the default for most cases. A good balance.
  • rgba(0,0,0,0.6) — very light or colorful backgrounds. It can get too dark.
  • rgba(0,0,0,0.8) — almost opaque. Use only for scene fade-outs.
Animated overlay with interpolate OverlayLayer.tsx
const frame = useCurrentFrame();

// Overlay entra gradualmente nos primeiros 20 frames
const overlayOpacity = interpolate(
  frame,
  [0, 20],
  [0, 0.4],
  { extrapolateRight: "clamp" }
);

return (
  <AbsoluteFill
    style={{ backgroundColor: `rgba(0,0,0,${overlayOpacity})` }}
  />
);

💡 Practical tip

Before setting the overlay value, open the most “problematic” frame (usually with the lightest or most colorful background) and adjust until the text is comfortably readable—not just “technically readable.”

Pattern
rgba(0,0,0,0.4)
Limit
Maximum 0.6
Animated
Smooth fade-in
Test
Lightest frame
4

🎚️ Opacity by layer — independent fade

Each AbsoluteFill can have its own independently animated opacity. This creates cascading reveal effects: the background can fade in over the first 20 frames while the content waits until frame 30. The viewer takes in the context before the message.

1

Background fades in (frames 0–20)

The Background reveals the visual setting—the viewer already knows where they are before seeing the message.

2

Overlay follows the background (frames 5–25)

Ensures that by the time the text appears, the background is dark enough for contrast.

3

Content enters last (frame 25+)

With the context established and the overlay ready, the content comes in over a readable canvas.

style opacity
By layer
Reveal
Context first
Hierarchy
Temporal
Effect
Pro elegance
5

⚖️ Don’t compete for attention

Video design is about focus. At every moment, there should be one main element that commands attention. When the background, text, and icon all animate with the same intensity at the same time, viewers get disoriented — looking at everything but seeing nothing.

✓ Attention hierarchy

  • ✓Background: subtle, slow animation (not distracting).
  • ✓Content: expressive entrance animation (this is the focus).
  • ✓Decoration: low opacity, no motion.

✗ Visual chaos

  • ✗Background with fast, bright particles throughout the video.
  • ✗Title and subtitle animate together with different springs.
  • ✗4+ saturated-color elements competing in the same scene.

💡 Single-focus rule

Pause the video on any frame and ask yourself: "where does the eye naturally go?" If the answer isn’t immediate and clear, the frame is overloaded. Reduce the intensity of supporting elements until the focus is obvious.

1 focus
Per frame
Background
Always subtle
Overlay
Masks excess
Test
Pause and ask
6

🔍 Debugging Layers in Studio

When a layer “disappears” or becomes unexpectedly invisible, the fastest debugging technique is to add a outline temporary in each AbsoluteFill or increase its opacity to identify exactly where it is in the stack.

Visual debugging techniques debug.tsx
// Técnica 1: outline colorido para ver bordas
<AbsoluteFill style={{ outline: "2px solid red" }}>
  <Background />
</AbsoluteFill>

// Técnica 2: opacidade 0.5 para revelar sobreposição
<AbsoluteFill style={{ opacity: 0.5 }}>
  <Overlay />
</AbsoluteFill>

// Técnica 3: comentar camadas individualmente
{/* <AbsoluteFill><Background /></AbsoluteFill> */}
outline
Show edges
opacity: 0.5
Reveal layers
Comment
Isolate the problem
DevTools
Inspect in Studio

📌 Module summary

✓
AbsoluteFill siblings — stack like transparencies; JSX order = z-index.
✓
Background → content → overlay — universal convention; reversing it breaks the visual hierarchy.
✓
Overlay rgba(0,0,0,0.4) — ensures text is legible over any background.
✓
Independent opacity — each layer can have its own fade-in/out.
✓
1 focus per frame — reducing the intensity of supporting elements is just as important as animating the main one.

Next module:

3.3 — Rhythm & Transitions Between Scenes: Series, breathing room in durations, and how to sync to the beat.