How to Merge Layers After Effects
StyleFrame Team9 min read
After Effects has no "Merge Layers" command like Photoshop. To combine layers, select them and use Layer > Pre-compose, which nests them in a single composition layer. For shape layers, use Add > Merge Paths inside one shape layer's Contents. To bake everything into one flat layer, pre-render the nested comp and replace it with the rendered footage.
What "Merge Layers" Means in After Effects
Because After Effects is a layer-based compositor, most layers can't be fused into a single pixel layer the way they can in Photoshop. A footage layer holds one source item, a solid holds a solid, and a text layer holds text. What you can do depends on what you want the merge to achieve:
- Tidy the timeline: pre-compose the layers.
- Combine vector shapes into one outline: use Merge Paths.
- Put several shape groups on one layer: copy and paste the groups into a single shape layer.
- Flatten to pixels for speed or handoff: pre-render and replace.
- Make layers move together without combining them: use parenting. This isn't a merge, but it solves the same problem.
Pick the goal first, because the techniques behave very differently once the project grows.
How to Merge Layers with Pre-compose
Pre-composing is the closest thing to a standard merge. It moves the selected layers into a new composition and drops that composition into your current timeline as one layer.
- In the Timeline panel, select the layers you want to combine. Use Ctrl/Cmd-click for non-adjacent layers or Shift-click for a range.
- Choose Layer > Pre-compose, or right-click a selected layer and pick Pre-compose.
- Name the new composition something you'll recognize in six weeks, such as "LT_bug_build" rather than "Pre-comp 14".
- Choose an attribute option (explained below) and click OK.
The originals are not deleted. They live inside the new comp, and you can double-click the pre-comp layer to open it and keep editing.
Leave All Attributes vs. Move All Attributes
The Pre-compose dialog gives you two options, and the choice matters.
- Leave all attributes in [comp] keeps the attributes in the original composition. The new nested comp contains the layers, but their effects, masks, and transform keyframes stay on the parent layer in the original comp. Use it when you want to group layers without changing how they're animated.
- Move all attributes into the new composition transfers those settings to the newly formed layer. Effects, masks, and keyframes travel into the nest, and the resulting layer in your main comp is reset. Use it when you want a self-contained module you can reuse or hand to someone else.
If you choose wrong, you can undo and redo. It's faster than trying to untangle keyframes by hand.
Check the Duration and Frame Size
When you pre-compose, the new comp inherits the parent comp's duration and frame size. That's usually fine, but two things can bite you later:
- If your layers only occupy a short span, the nested comp may be much longer than necessary. Trim the comp's work area or duration to keep render and preview overhead down.
- If the layer content extends beyond the frame, anything outside the pre-comp's bounds is clipped unless you enlarge the nested comp. This matters most for blurs, glows, and motion that travels off-screen.
Collapse Transformations
A pre-comp layer is a rasterized image of the nested comp by default. For vector content or 3D layers, enable the Collapse Transformations / Continuously Rasterize switch on the pre-comp layer. The nest then behaves more like a transparent group: vector sharpness holds when you scale, and 3D layers inside can interact with the parent comp. Be aware that collapsing changes how blend modes and effects are applied to the nest, so check the result visually after toggling it.
How to Merge Shape Layers
Shape layers are the exception where "merge" has a literal meaning. There are two common tasks, and they're often confused.
Combine Shapes into One Outline with Merge Paths
Merge Paths is a path operation that works like a Boolean. It acts on the shapes above it inside the same shape group.
- Draw two or more shapes while the shape layer is selected, so they land in the same layer rather than creating new layers.
- Twirl open the layer, then open Contents.
- Click Add next to Contents and choose Merge Paths.
- Twirl open the Merge Paths property and set the Mode dropdown, for example to Add, to control how the shapes combine.
Merge Paths affects only shapes above it in the stack, so ordering matters. Paths remain editable, so you can still move, duplicate, or animate individual shapes and the result updates. Fills and strokes stay below the Merge Paths operator in the same group, so the combined outline takes the group's styling.
Put Several Shape Layers on One Layer
If you have separate shape layers and want them on a single layer, copy the content across rather than looking for a merge button.
- Open the Contents of the source shape layer and select the group (for example "Rectangle 1").
- Copy it with Ctrl/Cmd+C.
- Select the target shape layer and paste with Ctrl/Cmd+V. The group arrives inside the target layer's Contents.
- Delete the now-empty source layer.
Note that each layer's transform (position, scale, rotation, anchor point) belongs to the layer, not the group. If the source layer had a transform, the pasted group won't carry it with it, so compensate with the group's own Transform properties or the shapes will jump.
How to Flatten Layers into One Pre-rendered Layer
A pre-comp is still live. After Effects recalculates everything inside it each time it needs a frame. If your goal is performance, handoff, or a locked look, flatten it.
- Pre-compose the layers as described above.
- Pre-render the pre-comp layer and replace it with the rendered footage, so the render is swapped into your timeline.
- Choose a format suited to your pipeline. For quality-critical work with alpha, use a lossless or high-quality intermediate codec or an image sequence.
- After rendering, the layer is replaced by footage, and the original comp remains in the project if you need to revise.
Flattening makes sense for heavy effect stacks, particle sims, or any element that's finished and approved. It's a poor choice while the design is still changing, because every revision means a re-render.
Merging Clips Made from the Same Footage
A frequent question from editors coming from Premiere Pro is how to put several in and out points from one clip on a single layer. After Effects doesn't allow multiple source ranges on one layer. The workaround:
- Drop the footage into the comp and duplicate it (Ctrl/Cmd+D) once for each segment.
- Trim each duplicate with Alt/Option+[ and Alt/Option+].
- Select all the duplicates and pre-compose them.
You end up with a single layer containing your segments, with gaps where you trimmed. Watch for overlapping audio if segments overlap in time.
What You Can't Merge (and What to Do Instead)
Adjustment layers and effects. There's no command to combine several Curves or color adjustments into one, and After Effects doesn't bake adjustments into a LUT for you. You can stack multiple instances of an effect on one layer, but they apply cumulatively. If you need one consolidated grade, rebuild it manually in a single effect, or do the grade downstream in your color tool. Don't assume merging adjustment layers will speed up renders either, since the cost lies in the effects themselves.
Layers that need to move as a unit. If you only need layers to follow one another, don't pre-compose. Use parenting through the Parent & Link column or the pick whip, so you keep every layer accessible in the main timeline.
Mixed 3D and 2D content. Pre-composing 3D layers flattens them into a 2D layer unless you collapse transformations. If camera interaction matters, test before committing.
Best Practices
- Name everything. Nested comps with default names are a common source of confusion on shared projects.
- Pre-compose late. Do it once the design settles, not as soon as the timeline looks crowded.
- Use labels and color-coding to identify groups before you nest them.
- Keep the originals accessible. Resist the urge to flatten until a shot is approved.
- Mind the render order. Effects on a pre-comp layer apply after everything inside it, which can change the look compared with applying them directly to individual layers.
Where Styleframe Fits in a Merge-and-Flatten Workflow
Flattening a layered comp often isn't the end of the process. You may want a single clean frame or a flattened sequence as the input for a stylistic pass, a background cleanup, or an upscale, and that's where can sit next to After Effects.
Styleframe is an AI video and motion tool. A practical example: pre-compose and render a locked layout as a reference, then bring it into Styleframe as a starting point for the generative step.
The results can then be brought back into your compositing setup in After Effects, where you can layer them, pre-compose them, and finish the shot as usual. You stay in charge of the final comp, and Styleframe handles the generative step you point it at.
Quick Reference
FAQ
Can I undo a pre-compose? Yes, through Undo right after the action. Later, you can open the nested comp, select its layers, copy them, and paste them back into the parent comp, then delete the pre-comp layer. Remember to account for timing offsets.
Does pre-composing improve render speed? Not by itself. It organizes the project. Pre-rendering is what reduces repeated computation.
Is there a shortcut for Merge Paths? There isn't a dedicated one. You add it from the Add menu in the layer's Contents.
Can I merge text layers? Not into one text layer. Combine the text into a single text layer by editing the text directly, or pre-compose if you only need to group them.