Mailing List AE-List@media-motion.tv ? Message #54304
From: Trish Meyer (Lists) <AE-List@media-motion.tv>
Subject: [AE] AE's rendering order - Collapse Transformations
Date: Sun, 15 Jun 2014 11:14:48 -0600
To: After Effects Mail List <AE-List@media-motion.tv>
Was "Layered Graphics Smart Import" thread

On Jun 11, 2014, at 2:48 PM, Teddy Gage <AE-List@media-motion.tv> wrote:

Here's a question for you - say I have three layers side-by-side in a 3D flythrough scene. I want to group them together as a unit so they move together. I have two options: either I pre-compose them with "leave transforms in composition" grayed out, so that I have to turn on the collapse transforms button on the precomp to bring them back into the main comp's 3D space. Or, I have to precompose without the collapse transforms, turn on the precomp's 3D switch, then have to bring the precomp back to the correct coords manually. And if I do the former method, that precomp is itself a 2D comp, so I can't manipulate the layers together in 3D space. I have to go into the precomp and change the layer's z-position without any reference to the master scene. If I then proceed to turn the 3D switch back on for the collapsed precomp in the main comp, the coords are all messed up and anchor point is in the wrong place. I'm sure this is totally confusing but I don't know how to better explain it.

Am I missing something? I think basically I'm wondering why the "leave transforms in current comp" button is unavailable when selecting and precomping multiple layers. Sometimes I just want to precomp as a method of grouping layers together instead of parenting, while leaving 3d axis controls and coords in the master comp. 


What you are trying to do isn't possible. 

One way of understanding the Precompose choices is like this:

Leave all attributes = create new Precomp's size based on the size and duration of the single layer you are precomposing. The new Precomp has default attributes for Transform, and the current attributes (Mask, FX, Transform) remain in the main comp.

Move all attributes = create new Precomp based on the size and duration of the current comp. The resulting nested layer in the current comp has default attributes for Transform.  Any existing Mask, FX and Transform and moved to the Precomp.

When you precompose multiple layers, there is no way to create the new comp based on the attributes of a single layer, so you have to choose Move All Attributions.   Attributes also include the relationship between one layer and another so In and Out points and blend modes are important to move too. And obviously, keyframes and fx also have to be moved. 

(Note that the frame rate should follow the same principle for Leave All, but it seems to be broken in the past few versions, so now I always check the new Precomp if the frame rate of the source is difference than the current file and see if it's important which frame rate is used.)

The default is to have Collapse Transformations (the "sunburst") turned Off in the main comp. So when the main comp renders that nested precomp layer, it tells the Precomp to render all the layers inside it (from the bottom up) and produce a final "flattened" 2D image that is then passed thru to the main comp. The main comp can transform this flat 2D image in 3D if you turn on the 3D layer switch - but it's really only able to swivel and tilt a flat 2D image! And because it is a normal 2D image, you are free to apply FX and blending modes to it.  This flat 2D image is the same size as the Precomp, and any pixels on the pasteboard are "cropped" off (this is the "crop layers to comp size" step at the end of the render order).  

But you do have the choice whether the individual layers in the precomp are "flattened" and "cropped" at the end of the Precomp's rendering order, before it passes thru to the main comp. If you turn ON the Collapse switch, you can get AE to bypass those two steps. The result? The nested layer now starts to behave just like a null object parent! Also Enable the 3D switch, and you can Transform the layer in 3D just as if the layers in the Precomp were children of this "null" parent. Rather than transforming a 2D image, it's now applying its Transformation values to the layers in the Precomp individually. And because the transformation values are being added together and the layer resampled once, the quality is maintained (i.e., if the layer is scaled down 50% in the Precomp, the main comp can scale it back up to 200% and get back the original resolution).   

Of course, because the nested "layer" is essentially behaving like a null object parent, you can't apply FX or blend modes to the nested Precomp when Collapse is on. On the other hand, any blend modes applied to the individual layers in the Precomp are passed thru to the main comp. 

With Collapse On, you'll also see that any pixels on the pasteboard in the Precomp are still available in the main comp, because the "crop to comp size" step was skipped (you can fix that by making full frame track mattes in the Precomp if that's a real issue).

If you start thinking of the nested layer as really a "null object parent" where the children are in the Precomp, the Collapse Transformations feature starts to make more sense.

In other words, when you turn On the Collapse Transformations button for the nested layer in the main comp, you are essentially creating the same rendering hierarchy that you would have gotten had you simply NOT precomposed and
- created a New Null
- parented the layers to the Null
- made the children Shy (to hide them from the timeline) (yes, a folder structure like PS has would be great…)
- use the null to apply Transformations to the group
- if I want to see the children separately, you can make a selection group with labels and so on

My rule of thumb is that if I don't want to flatten the layers, I'll use a Null object parenting hierarchy and keep everything in one comp. It's easier, and you don't have the weirdness that happens when you open the Precomp and the layers are shown without the camera and lights (although Custom Views can help there). 

No doubt Todd will jump in if anything has changed recently that changes stuff under the hood! 

Trish

 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster