Copy link to clipboard
Copied
Is there a way to quickly tell how many layers/objects are used in a composition (including its subcompostions)?
eg. a customer has asked for many glowing objects in a video (by objects I mean they are a layer with either an image or a still from a video - they could be a video but aren't in this case) and most of those are animated with the puppet tool. There's over a 100 layers in the main ~4K composition (I'm currently rendering it to a 1080p video - maybe that's inefficient for the main comp to be ~4K but that's what the original artwork was). Quite a few of those layers in the main comp are precomps that have 11 layers in (10 objects + an adjustment layer for the glow).
My machine is taking about 5.5 hours to render this video now for just about 30 seconds of video (I might get a better machine though to speed it up a bit).
I want to put a limit of the number of layers on future orders (eg. a lower limit for lower priced orders) so it doesn't take ages rendering where it's not a higher priced order. Though I think the glows could be increasing render time too.
So that's why I'm wondering if there's a quick way to tell the number of layers (or visible layers, eg. ignoring those that are set to invisible or are adjustment layers) used in the comp and it's sub-comps so I can tell if they've reached that limit. Or is there a script that would tell that? I've only used up to AE CC2021 currently. For the current comp I could scroll down to the last layer to see the number of layers but that doesn't take into accout the number of layers in the sub compositions.
Copy link to clipboard
Copied
A script will be able to provide the numbers but I'm not familiar that it exists. Part of being fluent and productive with AE is getting to know your system and AE, with an emphasis on how fast it tackles tasks which can be broken down to types and number of effects, number of layers, composition size, complexity of Expressions and duration. A good general rule of thumb is to never allow a single render to run over 8 hours as this will likely hinder the number of hours you can access your system the following day – this is based on an assumption that heavy renders will be down overnight.
What most experienced users do is pre-render pre-Compositions and also sets of layers within a composition if they are relatively 'heavy' and likely lead to renders reaching over the 8-hour limit. FWIW, I've rendered an AE project that required over 50,000 layers. These were generally small layers but they were 3D, and each layer had between 1-3 relatively heavy-compute Expressions. It would have been impossible to render everything at one go, at the final stage. Hence, pre-rendering was crucial in making things manageable and completing ahead of the deadline.
Copy link to clipboard
Copied
Thanks Roland. In future for that kind of project I'll pre-render certain comps. Though the buyer kept changing his mind about the colour of the objects so I'd have kept having to re-render the precomps again, but the final render should still be faster. Ideally Adobe should cache those things somewhere (eg. disc cache) without needing the pre-render (eg. fi the same precomp was used many times in the same comp you'd think they should be able to cache a render of that precomp as the main comp is rendering (not the way it's currently done) to doing it again for every place it's used in the comp.
Yes I'll test different things to see how they affect render time and try to use that info for any limits on orders. eg. I could limit the number of glowing layers for buyers.
Copy link to clipboard
Copied
The latest version of AE introduced a number of advances on the productivity front; Multiframe Rendering (MFR) and Cache Frames When Idle. These should help speed up workflows but the user still has to manage projects judiciously in order to take advantage of these improvements.
Caching in the background or saving older caches are good but not so straight forward to implement. The biggest issue being AE not knowing which precomp(s) to cache and when to delete them. Having too large a cache will inhibit on-going work for a lot of users who do not have limitless storage. There has been suggestions for Background Rendering which may or may not arrive. So, pre-renders are the best way forward. You can often expect exponential productivity gains at the final render stage when the 'heavy' layers/effects/etc are out of the way. HTH
Copy link to clipboard
Copied
Why would you want to limit the number of layers? Like so many things in AE this could be only a single factor and none of this matters in the end. You could have a comp with just five or six layers, but complex, slow effects or expressions rendering like ass and then just on the opposite side of the spectrum seemingly complex stuff breezing through. Sorry, but things are not that easy and you could be shooting yourself in the foot by even make this a criteria for charging your clients. It may be inconvenient, but you really more than anything else you have to rely on your gut feeling and experience for how long stuff takes. That and of course you can spend endless time researching the many "performance optimization" threads here on this forum, the web in general, run benchmark projects or use the performance profiling in AE CC 2022. At the end of the day, though, it really comes down to building the knowledge how long stuff takes rather than trying to find hard criteria for cutting off a client due to cost. As for the counting - you can start by using File --> Dependencies --> Collect and create a report about used assets, comps and layers. I'm also pretty certain there are more advanced scripts on AEScripts.com that can create more detailed reports or collect stuff selectively or based on certain criteria. Just browse through the respective "project" and "utilities" categories there.
Mylenium
Copy link to clipboard
Copied
Why would you want to limit the number of layers?
By @Mylenium
Because that's one of the main things I think is slowing it down. One buyer keeps asking for more and more glowing objects in a scene/video even though there are probably already hundreds of them. And this is a very low priced order. I'd already mentioned the render time and he asked for even more glowing objects in it (these are nearly all 3d layers) and it's slowing the system down for another project I'm trying to do for someone else on a different version of AE while it's rendering the intermediate for that many layered one. And that buyer who's asked for changes to the many layer one is also asking for changes to a different project too but the many layered one is slowing the system down with the intermediate render.
Yes I'll try and see what causes different slow downs (I rarely use much expressions though). But I thought setting a limit for the number of layers for different prices (maybe the limit by number of layers with glows could be done too since they seem to slow things down) could be an easier way for the buyer to see at a glance the limits or what prices would be for higher limits or the number of moving layers (eg. puppet tool). There must be a way to give a reasonable limit on complexity for different prices (that could be based on approx render and manual work time) that a customer could understand.
edit: Though I'm not sure if mentioning limits (eg. 100 or 150 layers etc) could make some customers ask for the max in that limit when they otherwise wouldn't have. So it might sometimes lead to more work (eg. they might ask for 100 or 150 objects in scenes because of the stated limit when before seeing that specified limit they might have just asked for no more than 20).
I'll try that dependencies option though. I'm not sure it will list the number of times a layer is used though (eg. to give a count of the number of objects on the screen - eg. a lot of the objects on the screen are the same images (comps) used many times in different locations but I think the dependencies will just count those duplicate images as 1 image as those all point to 1 source image/video).
edit: Also one reason I think the render time is so long is that both of the comps that have 10 objects in them that are layers in the ~4K comp are 10,000x1000 pixels in size. I think I should have made those much smaller (I don't think there's much need for them to be over 4K in width - though I might have created them that size so they wouldn't get cut off as much when placed futher into the distance).
Copy link to clipboard
Copied
Yes, large layers make AE crawl because as a full buffer renderer they have to be fully loaded into memory to be processed. Downsizing them if possible certainly has a huge impact. That also goes for any effects that expand layer boundaries - glows, Motion tile, blurs, a few others. Keeping tight control on settings here can do a lot. Otherwise I think you're still getting a bit too worked up over actual layer count, no offense. At this point blending operations, transforms and transparency calculations have been so optimized, there's really not much difference if you have stacked 20 or 400 layers. "Slow" stuff like AE's decrepit masking system, effects like Keylight doing complicated processing and being poorly optimized or complex expressions have much more impact. In case of effects therefore of course the answer would have to be that substituting some AE native effects with third-party effects would also further help to squeeze out soem extra speed.
Mylenium
Find more inspiration, events, and resources on the new Adobe Community
Explore Now