-
JSON / Essential Graphics performance in AE
Hi all,
I’m working on a video piece in which I’m trying to parameterize as much of the animation as possible in After Effects. The main composition contains a number of smaller videos that fade in and out at different times, as well as shape layers and text that accompany those videos as annotation graphics. Since a lot of the animation is repetitive, but slightly different each time, and I don’t want to recompose keyframes every time there’s a change from the client, I’m using AE’s Essential Graphics and JSON functionality pretty extensively. I’m trying to minimize keyframes, so I’ve written expressions using timecodes pulled from the JSON file to fade in and out each video without keyframing, for instance. This lets me set timecodes in the JSON, and not have to move keyframes if we want to rearrange the timing of different elements.
Effectively, I’m trying to use a combination of Essential Graphics and JSON data to build a parametric video file, where the time of each event fading in, it’s duration, and even its position in the main composition comes from the JSON file. There’s also similar expressions driving trim paths on shape layers, which similarly take their start time, end time, and values from the JSON.
(Apologies, I realize this might be vague — I would share the project file, except that the project is under NDA.)
The process is working well, except that the preview and render times feel disproportionately slow. Even when I hide most of the elements and am just previewing the animation of a few shape layers, and reduce the preview quality to 1/4 or less, it still takes a long time to preview each frame. If I were to compose these lines with traditional keyframes rather than JSON data, the preview would be MUCH faster.
I have not been able to find any detailed documentation from Adobe about how the JSON files work. Does the use of Essential Properties generally affect performance? Does AE query the JSON every frame, and does it have to read the entire JSON on every frame? The JSON is currently about 1200 lines–does that make a difference? If so, is there some way to read the JSON in once, at the beginning of the animation, and then access those values throughout the preview / render? (I’m kind of thinking of the difference between the “setup” and “draw” loop from Processing and other coding environments.) Is there anything else I’m not considering here?
Curious if there’s any resources or best practices for this kind of data-driven / quasi-parametric workflow. Happy to try to provide more info on the process, if that would help. Apologies again for not being able to share the files.
Thanks!