Precomposing, nesting, and pre-rendering

  1. After Effects User Guide
  2. Beta releases
    1. Beta Program Overview
    2. After Effects Beta Home
    3. Beta features
      1. Multi-frame rendering
  3. Getting started
    1. Get started with After Effects
    2. What's new in After Effects 
    3. Release Notes | After Effects
    4. After Effects system requirements
    5. Keyboard shortcuts in After Effects
    6. Planning and setup
    7. Setup and installation
  4. Workspaces
    1. General user interface items
    2. Get to know After Effects interface
    3. Workflows
    4. Workspaces, panels, and viewers
  5. Projects and compositions
    1. Projects
    2. Composition basics
    3. Precomposing, nesting, and pre-rendering
    4. View detailed performance information with the Composition Profiler
    5. CINEMA 4D Composition Renderer
  6. Importing footage
    1. Preparing and importing still images
    2. Importing from After Effects and Adobe Premiere Pro
    3. Importing and interpreting video and audio
    4. Preparing and importing 3D image files
    5. Importing and interpreting footage items
    6. Working with footage items
    7. XMP metadata
  7. Working with text and graphics
    1. Text
      1. Formatting characters and the Character panel
      2. Text effects
      3. Creating and editing text layers
      4. Formatting paragraphs and the Paragraph panel
      5. Extruding text and shape layers
      6. Animating text
      7. Examples and resources for text animation
      8. Live Text Templates
    2. Motion Graphics
      1. Work with Motion Graphics templates in After Effects
      2. Use expressions to create drop-down lists in Motion Graphics templates
      3. Work with Essential Properties to create Motion Graphics templates
      4. Replace images and videos in Motion Graphics templates and Essential Properties
  8. Drawing, painting, and paths
    1. Overview of shape layers, paths, and vector graphics
    2. Paint tools: Brush, Clone Stamp, and Eraser
    3. How to taper shape strokes
    4. Shape attributes, paint operations, and path operations for shape layers
    5. Use Offset Paths shape effect to alter shapes
    6. Creating shapes
    7. Create masks
    8. Remove objects from your videos with the Content-Aware Fill panel
    9. Roto Brush and Refine Matte
  9. Working with layers
    1. Selecting and arranging layers
    2. Blending modes and layer styles
    3. 3D layers
    4. Layer properties
    5. Creating layers
    6. Managing layers
    7. Layer markers and composition markers
    8. Cameras, lights, and points of interest
  10. Animation, keyframing, motion tracking, and keying
    1. Animation
      1. Animation basics
      2. Animating with Puppet tools
      3. Managing and animating shape paths and masks
      4. Animating Sketch and Capture shapes using After Effects
      5. Assorted animation tools
      6. Work with Data-driven animation
    2. Keyframe
      1. Keyframe interpolation
      2. Setting, selecting, and deleting keyframes
      3. Editing, moving, and copying keyframes
    3. Motion tracking
      1. Tracking and stabilizing motion
      2. Face Tracking
      3. Mask Tracking
      4. Mask Reference
      5. Speed
      6. Time-stretching and time-remapping
      7. Timecode and time display units
    4. Keying
      1. Keying
      2. Keying effects
  11. Transparency and compositing
    1. Compositing and transparency overview and resources
    2. Alpha channels, masks, and mattes
  12. Adjusting color
    1. Color basics
    2. Use the Adobe Color Themes extension
    3. Color management
    4. Color Correction effects
  13. Effects and animation presets
    1. Effects and animation presets overview
    2. Effect list
    3. Simulation effects
    4. Stylize effects
    5. Audio effects
    6. Distort effects
    7. Perspective effects
    8. Channel effects
    9. Generate effects
    10. Transition effects
    11. The Rolling Shutter Repair effect
    12. Blur and Sharpen effects
    13. 3D Channel effects
    14. Utility effects
    15. Matte effects
    16. Noise and Grain effects
    17. Detail-preserving Upscale effect
    18. Obsolete effects
  14. Expressions and automation
    1. Expression
      1. Expression basics
      2. Understanding the expression language
      3. Using expression controls
      4. Syntax differences between the JavaScript and Legacy ExtendScript expression engines
      5. Editing expressions
      6. Expression errors
      7. Using the Expressions editor
      8. Use expressions to edit and access text properties
      9. Expression language reference
      10. Expression examples
    2. Automation
      1. Automation
      2. Scripts
  15. Immersive video, VR, and 3D
    1. Construct VR environments in After Effects
    2. Apply immersive video effects
    3. Compositing tools for VR/360 videos
    4. Tracking 3D camera movement
    5. Work in 3D Design Space
    6. Preview changes to 3D designs real time with the Real-Time Engine
    7. Add responsive design to your graphics 
  16. Views and previews
    1. Previewing
    2. Video preview with Mercury Transmit
    3. Modifying and using views
  17. Rendering and exporting
    1. Basics of rendering and exporting
    2. Export an After Effects project as an Adobe Premiere Pro project
    3. Converting movies
    4. Automated rendering and network rendering
    5. Rendering and exporting still images and still-image sequences
    6. Using the GoPro CineForm codec in After Effects
  18. Working with other applications
    1. Dynamic Link and After Effects
    2. Working with After Effects and other applications
    3. Sync Settings in After Effects
    4. Collaborate with Team Projects
    5. Share and manage changes with Team Project collaborators
    6. Creative Cloud Libraries in After Effects
    7. Plug-ins
    8. CINEMA 4D and Cineware
  19. Memory, storage, performance
    1. Memory and storage
    2. Improve performance
    3. Preferences
    4. GPU and GPU driver requirements for After Effects

About precomposing and nesting

If you want to group some layers that are already in a composition, you can precompose those layers. Precomposing layers places them in a new composition, which replaces the layers in the original composition. The new nested composition becomes the source for a single layer in the original composition. The new composition appears in the Project panel and is available for rendering or use in any other composition. You can nest compositions by adding an existing composition to another composition, just as you would add any other footage item to a composition. Precomposing a single layer is useful for adding transform properties to a layer and influencing the order in which elements of a composition are rendered.

Nesting is the inclusion of one composition within another. The nested composition appears as a layer in the containing composition.

A nested composition is sometimes called a precomposition, which is occasionally abbreviated in casual use to precomp or pre-comp. When a precomposition is used as the source footage item for a layer, the layer is called a precomposition layer.

During rendering, the image data and other information can be said to flow from each nested composition into the composition that contains it. For this reason, nested compositions are sometimes referred to as being upstream of the compositions that contain them, and the containing compositions are said to be downstream of the nested compositions that they contain. A set of compositions connected through nesting is called a composition network. You can navigate within a composition network using the Composition Navigator and Mini-Flowchart. (See Opening and navigating nested compositions.)

Precompositions in After Effects are similar to Smart Objects in Adobe Photoshop.

Uses for precomposing and nesting

Precomposing and nesting are useful for managing and organizing complex compositions. By precomposing and nesting, you can do the following:

  • Apply complex changes to an entire composition - You can create a composition that contains multiple layers, nest the composition within the overall composition, and animate and apply effects to the nested composition so that all the layers change in the same ways over the same time period.
  • Reuse anything you build - You can build an animation in its own composition and then drag that composition into other compositions as many times as you want.
  • Update in one step - When you make changes to a nested composition, those changes affect every composition in which it is used, just like changes made to a source footage item affect every composition in which it is used.
  • Alter the default rendering order of a layer - You can specify that After Effects render a transformation (such as rotation) before rendering effects, so that the effect applies to the rotated footage.
  • Add another set of transform properties to a layer - The layer that represents the composition has its own properties, in addition to the properties of the layers that it contains. This allows you to apply an additional set of transformations to a layer or set of layers.

Preferences and composition settings that affect nested compositions

Because a precomposition is itself a layer, you can control its behavior using layer switches and composition switches in the Timeline panel. You can choose whether changes made to the switches in the containing composition are propagated to the nested composition. To prevent layer switches from affecting nested compositions, choose Edit > Preferences > General (Windows) or After Effects > Preferences > General (Mac OS), and then deselect Switches Affect Nested Comps.

In the Advanced tab of the Composition Settings dialog box (Composition > Composition Settings), choose Preserve Resolution When Nested or Preserve Frame Rate When Nested Or In Render Queue for a composition to retain its own resolution or frame rate, and not inherit those settings from the containing composition. For example, if you deliberately used a low frame rate in a composition to create a jerky, hand-animated result, you should preserve the frame rate for that composition when it is nested. Similarly, the results of rotoscoping may look wrong when converted to a different frame rate or resolution. Use this setting instead of the Posterize Time effect, which is less efficient.

Merk:

Jeff Almasol provides a script on his redefinery website that makes toggling the Preserve Resolution When Nested or Preserve Frame Rate When Nested Or In Render Queue preference setting more convenient.

Changing the current time in one panel updates the current time in other panels associated with that composition. By default, the current time is also updated for all compositions related to the current composition by nesting. To prevent compositions related by nesting from updating their current times when you change the current time in one composition, deselect the Synchronize Time Of All Related Items preference (Edit > Preferences > General (Windows) or After Effects > Preferences > General (Mac OS)).

Online resources about precomposing and nesting

Chris and Trish Meyer share tips on setting up a composition hierarchy so that making changes in a project is easier in this article from the ProVideo Coalition website.

See this page on aescripts website for the Un-Precompose script, which extracts layers from a precomposition .

See this page on aescripts website for the Zorro-The Layer Tagger script, which allows you to group layers in your composition using tags rather than precomposing.

Precompose layers

Precomposing layers places them in a new composition (sometimes called a precomposition), which replaces the layers in the original composition. Precomposing a single layer is useful for adding transform properties to a layer and influencing the order in which elements of a composition are rendered.

  1. Select the layers in the Timeline panel, and choose Layer > Pre-compose or press Ctrl+Shift+C (Windows) or Command+Shift+C (Mac OS).
  2. Select one of the following:

    Leave All Attributes In

    Leaves the properties and keyframes of the precomposed layer in the original composition, applied to the new layer that represents the precomposition. The frame size of the new composition is the same as the size of the selected layer. This option is not available when you select more than one layer, a text layer, or a shape layer.

    Move All Attributes Into The New Composition

    Moves the properties and keyframes of the precomposed layers one level further from the root composition in the composition hierarchy. When you use this option, changes you applied to the properties of the layers remain with the individual layers within the precomposition. The frame size of the new composition is the same as the frame size of the original composition.

Effects can include masks and effects of other layers

Effects that use layers as an input such as - Set Matte and Displacement Map target the masks and effects of the input layer. You can use these layers without pre-composing them for the purpose of being referenced by an effect. 

The control is similar to the function of View menu at the bottom of the Layer viewer panel which allows you to render the layer from different positions in the rendering order: from its source, from its masks, or from its individual effects.
For effects with layer properties, open the Input Parameter menu to the right of the layer selection choose the target input layer such as:
 

  • Source: targets only the source of the layer. Masks and effects are ignored.
  • Masks: targets the layer after its masks are applied. Effects are ignored.
  • Effects & Masks: targets the layer after its masks and effects are applied.

 

Opening and navigating nested compositions

Nested compositions are sometimes referred to as being upstream of the compositions that contain them, and the containing compositions are said to be downstream of the nested compositions that they contain. The root composition is the most downstream; the most deeply nested composition is the most upstream. A composition flow path is a chain of compositions that are related to one another by containing or being nested within one another. A composition network is the entire set of compositions that are related to one another through nesting.

After Effects provides several ways to open a nested composition (precomposition):

  • Double-click the composition entry in the Project panel.
  • Double-click a precomposition layer in the Timeline panel. Alt-double-click (Windows) or Option-double-click (Mac OS) to open the precomposition layer as a layer in the Layer panel.
Merk:

Double-clicking a precomposition layer when a paint tool or the Roto Brush tool is active opens the layer in the Layer panel.

  • To open the most recently active composition in the same composition network as the currently active composition, press Shift+Esc.

  • Use the Composition Navigator.

  • Use the Composition Mini-Flowchart.

The Composition Navigator

The Composition Navigator is a bar along the top edge of the Composition panel that shows the composition active in that viewer in relation to other compositions in the same composition network. The compositions shown are the most recently active compositions in the flow path of the currently active composition.

Composition Navigator

A. Active (current) composition B. Arrow for opening Composition Mini-Flowchart C. Panel menu button D. Ellipsis 

Arrows between the composition names indicate the direction in which pixel information flows for this flow path. The default is to show compositions in the Composition Navigator bar with downstream compositions on the left and upstream compositions on the right. This default is indicated by the Flow Right To Left option in the Composition panel menu. To show compositions in the other order, choose Flow Left To Right. This setting is a global preference; it applies to all compositions and to the Composition Mini-Flowchart view.

The names of downstream compositions are dim to indicate that their contents are not used or shown in the active composition.

  • To show or hide the Composition Navigator bar, choose Show Composition Navigator from the Composition panel menu.

  • To activate any composition shown in the Composition Navigator bar, click the composition name.

  • If the flow path is too long to show in the Composition panel, an ellipsis button appears at the left or right edge of the Composition Navigator bar. To temporarily show the entire flow path, click the ellipsis button.

Merk:

To scroll through a long flow path, place the pointer over a composition button in the Composition Navigator and roll the mouse scroll wheel.

The Composition Mini-Flowchart

The Composition Mini-Flowchart is a transient control that you can use to quickly navigate within a composition network. When you open the Composition Mini-Flowchart, it shows the compositions immediately upstream and downstream of the selected composition.

Colors in the Composition Mini-Flowchart are based on the label colors assigned to compositions in the Project panel. If a composition is used multiple times within one composition, the multiple instances of the nested composition appear as one entry with a number in parentheses indicating the number of instances.

To open the Composition Mini-Flowchart, do one of the following:

Composition mini-flowchart

A. Indicator that composition does not flow into other compositions B. Direction of flow C. Active (current) composition 

  • Tap the Tab key when a Composition, Layer, or Timeline panel is active.
  • Click the arrow to the right of a composition name in the Composition Navigator bar.

  • Choose Composition Mini-Flowchart from the Composition menu, the Composition panel menu, or the Timeline panel menu.

  • Click the Composition Mini-Flowchart button at the top of the Timeline panel.

As with the Composition Navigator, you can choose whether to show the flow direction from left to right or from right to left. Arrows indicate the direction of the flow. If a composition has a next to it instead of an arrow, then the composition either does not have any compositions flowing into it or it does not flow into any compositions.

Upstream compositions in the Composition Mini-Flowchart are sorted from top to bottom either alphabetically or by layer order. To switch between these sorting orders, press the S key when the Composition Mini-Flowchart is open. When sorting by layer order, a composition used multiple times is sorted according to its topmost instance in the stacking order. Downstream compositions are always sorted alphabetically.

To navigate among and select compositions in the Composition Mini-Flowchart, use the arrow keys or click the arrow or buttons on either side of a composition. To activate the selected composition, press the spacebar or Enter (Windows) or Return (Mac OS). To close the Composition Mini-Flowchart without taking any action, press Esc, tap Shift, or click outside the Composition Mini-Flowchart.

Rich Young provides additional information about the Flowchart panel and the Composition Mini-flowchart on the After Effects Portal website.

Pre-render a nested composition

A complex nested composition can take a long time to render, either for previews or for final output. If you have a nested composition that you do not expect to work on further, you can save time during each rendering operation by pre-rendering the nested composition into a movie and replacing the composition with the rendered movie. You can still modify the original nested composition, because it remains in the Project panel. If you make a significant change to the original nested composition, render it again.

Pre-rendering a nested composition is especially beneficial when you will use it multiple times in a project.

Merk:

Apply your final output settings when you pre-render the nested composition.

  1. Select the composition in the Project or Composition panel.
  2. Choose Composition > Pre-render.

    The Pre-render command adds the composition to the render queue and sets the Import & Replace Usage post-render action to replace the composition with the rendered movie.

  3. In the Render Queue panel, adjust settings as necessary, and click the Render button to render the composition.
Merk:

An alternative to replacing the composition with the movie is to use the rendered movie as a proxy for the nested composition.

Render order and collapsing transformations

A composition consists of layers stacked on top of one another in the Timeline panel. When the composition is rendered—either for previewing or for final output—the bottom layer is rendered first. Within each raster (non-vector) layer, elements are applied in the following order: masks, effects, transformations, and layer styles. For continuously rasterized vector layers, the default rendering order is masks, followed by transformations, and then effects.

Transformations are changes to those properties grouped under the Transform category in the Timeline panel, including Anchor Point, Position, Scale, Rotation, and Opacity. What you see that in the Layer panel is the result of the rendering before transformations are performed.

Merk:

For additional control over when transformations are performed, you can apply the Transform effect and reorder it with respect to other effects.

In a group of effects or masks, items are processed from top to bottom. For example, if you apply the Circle effect and then apply the Magnify effect, the circle is magnified. However, if you drag the Magnify effect above (before) the Circle effect in the Effect Controls or Timeline panel, the circle is drawn after the magnification and isn’t magnified.

After a layer has been rendered, rendering begins for the next layer. The rendered layer below may be used as input to the rendering of the layer above—for example, for determining the result of a blending mode.

If a composition contains other compositions nested within it, the nested composition is rendered before other layers in the containing composition.

Merk:

Some effects ignore masks on the layer to which they’re applied. To have such an effect operate on a masked layer, pre-compose the layer with the mask applied, and then apply the effect to the pre-composed layer. (See About precomposing and nesting.)

Collapsing transformations

If the Collapse Transformations switch is selected for a nested composition, then the transformations for the nested composition are not performed until after the masks and effects for the containing composition are rendered. This render order allows the transformations for the nested composition and the containing composition to be combined—or collapsed—and performed together. The same is true for vector layers that are not continuously rasterized.

Merk:

Instead of a Collapse Transformations switch, vector layers have a Continuously Rasterize switch in the same location. Vector layers include shape layers, text layers, and layers with vector graphic files as the source footage. Text layers and shape layers are always continuously rasterized.

Collapsing transformations can, for example, preserve resolution when a layer is scaled down by half in a nested composition, and the nested composition is scaled up by a factor of two in the containing composition. In this case, rather than performing both transformations and losing image data in the process, one transformation can be performed—doing nothing, because the individual transformations cancel each other.

If transformations are not collapsed, a nested composition that contains 3D layers is rendered as a 2D image of the 3D arrangement, using the default composition camera. This rendering prevents the nested composition from intersecting with 3D layers, casting shadows on 3D layers, and receiving shadows from 3D layers in the containing composition. The nested composition is also not controlled by the cameras and lights of the containing composition.

If transformations are collapsed, the 3D properties of the layers in the nested composition are exposed to the containing composition. Thus, the nested composition can intersect with 3D layers, cast shadows on 3D layers, and receive shadows from 3D layers in the containing composition. The containing composition's camera and lights can also control the nested composition.

Essentially, collapsing transformations for a nested composition tells After Effects to not flatten and crop the layers in the precomposition. Because an adjustment layer operates on the composite of all of the layers beneath it within the same composition, an adjustment layer within a nested composition with collapsed transformations will force the flattening and cropping that collapsing transformations would normally prevent.

When a closed mask (with mask mode other than None), a layer style, or an effect is applied to a nested composition with collapsed transformations, the layers in the nested composition are first rendered on their own, then masks and effects are applied, and then the result is composited into the main composition. This rendering order means that the blending modes of the nested layers are not applied to any underlying layers in the main composition, and that 3D layers above and below the collapsed layer cannot intersect or cast shadows on each other.

Online resources

Chris and Trish Meyer explain collapsing transformations and continuous rasterization in this article on the ProVideo Coalition website.

Adobe-logoen

Logg på kontoen din