Skip to main content
Participant
April 6, 2020
Question

Script for automating replacement of images in 800 layer placeholders from folder of images

  • April 6, 2020
  • 3 replies
  • 3684 views

Trying to create a template for a virtual graduation ceremony for 12 high schools.  Number of graduates (photos & names) varies from 600 to 900 per school.  I'm envisioning a rotating ring of photos (layers) with the axis point off screen right or left so the pictures swing into view, pause for the name to be read, and then swing out of view as the one behind it comes into place.  Camera with depth of field to blur pictures in bg and in extreme fg as they exit screen.

 

I've built a prototype project as a test with 4 layers.  The big question is how best to accomplish the task of handling up to 900 layers!  I'm hoping that a folder containing all of the photos (with names already on ) which are numbered sequentially (000-999) could be referenced by a script to drop the image onto the corresponding layer (by index number?).

 

Am I crazy.... or is something like this possible?

This topic has been closed for replies.

3 replies

Participant
October 30, 2020

Hi Kaminari, how did your project go?  I'm in the exact same situation right now and would appreciate any guidance.  Before seeing this post, I have a Json file and have text changing but I'm also stuck on getting images/video to swap.  

Martin_Ritter
Legend
April 6, 2020

The concerns of Mylenium are actual true - AE isn't even close to handle such amount of data.

But you have the option to drive the animation with external data. You don't need 900 layers but only those, which will be visible. You can drop in all images of the studens as image sequence and use time remap to display the correct portrait. AE will definetly handle 900 frames, but will lack in handling 900 images and will die with 900 layers.

 

Get into data driven animation, prepare your dropsheet, write the expressions, create some generic DOF background where nobody can tell any face and get the work done, instead of killing your AE and rendering for weeks.

 

*Martin

Participant
April 9, 2020

Martin - 

I like your suggestion!  I can see how to loop a short animation of a few photos.  I'm not sure how to write the expression to automate the selection of the frame from the image sequence in each of the photo layers? 

 

each photo layer will be static on the screen for 4 seconds, then animate off screen while the next animates on screen over 2 seconds.  so each photo layer would need to advance by the number of photos layers every 6 seconds once it is off screen. 

Martin_Ritter
Legend
April 9, 2020

I wouldn't write a script to handle all of the layers, I would create an animation preset based on the in and out point of a layer like this one:

https://www.dropbox.com/s/tewk9s88mpkmnou/flyInBounceDropOut.ffx?dl=0

This takes a layer, no matter what the size or scale of the layer and flys it in from the left side of the screen. It bounces to a stop, then just before the out point, it falls off the bottom of the screen.

 

Import all of your images, set the in point at zero, set the out point at 4 seconds, use the keyframe assistant to sequence the layers with a 10 or 15 frame overlap and you're done. 

 

An even better idea, and a much simpler way to handle that many images and turn them into a nice slideshow - Adobe Lightroom Classic. There are lots of options, some decent presets, and it's very quick. Unless you are being paid a bunch for this project After Effects is probably not the best choice. 

 

Even Apple's Photos app produces pretty amazing still image slide shows automatically. 


Rick, we are talking about 900 layers and addition texts (names) to each image. I doubt that AE will handle this in an acceptual way (I've seen comps filled with so many layers, that the comp-panel/timeline panel wasn't capable of displaying the layers itself) and that those other tools will be able to add text in an easy, automated way.

 

*Martin

Mylenium
Legend
April 6, 2020

Sure it's possible, but the bigger question will be how you plan on actually rendering those 900 layers. That is going to be a major nightmare. Even a few seconds of footage could take hours with all that DOF and stuff. For everything else you might want to start by checking AEScripts.com for the variaous footage replacment scripts and see if one already kinda does what you need. Likewise you will find a lot of scripts that create all sorts of 3D-ish layer arrangements, slideshow templates and whatnot. Otherwise anything from complicated JSON-based solutions to simply importing the images and using a script to stagger the layers in the timeline might be adequate, but I still think most importantly you need to get away from using 3D and DOF when you are talking those crazy numbers of layers.

 

Mylenium