Video Production Asked by kviLL on October 28, 2021
Background
I’m trying to make an AE animation to visualize some data. Since the raw data I’m using comes in json files and needs to be parsed and analyzed to find useful statistics, I’m using a java program to import all the json and export .csv files for After Effects. I’ve managed to run through this workflow once already, importing json, exporting csv, and writing AE scripts to read the data from the CSV and calculate object movements on the timeline.
However, when I went to make some changes to how the animation worked, I decided to create a config.properties
file that the Java program reads to adjust some settings when creating the CSVs. My intention was that After Effects could read the same file, figure out what settings Java had been using, and parse the CSV accordingly. I figured it wasn’t going to be as easy to read the file in AE as it had been in Java, but I hadn’t anticipated not being able to import it. I’ve gotten either errors saying I need Adobe Animate CC to import a .fla file (it’s not .fla and I can’t imagine why I should need to download that, although I can if necessary) and just plain crashing.
I tried Googling and
At this point I thought that maybe the best course of action would be to write a short Java script that parses the config.properties file and rewrites it as a csv in the form "string",value
on each line while removing all of the comments, but having to parse my own config file kinda defeats the point of writing my own config file for both programs… I also like the .properties format, allowing me to use #
for comments and define constants in the form variable: 0
or variable: "abc"
. I didn’t actually ever parse it out of the .properties file because I realized that is probably a terrible solution, and instead I came here.
TL;DR
What is the best way to create a configuration file, composed of user-readable comments, variable names, and string/numerical declarations for those variables, which can be read by my Java program and After Effects, such that I will only need to make a change to one config setting, rerun Java, and then reexport my animation to have something completely new?
Since Java is obviously more flexible here, I’m mostly interested in a good non-laggy AE solution that will ideally require minimal modification to my Java setup.
Some random notes
Here’s an example screenshot from my existing config.properties file. Obviously these aren’t real values. I’m not that stupid. They’re just examples of all the data types I’m using at the moment. Notably Java just reads all of these as strings and then I have to go tell it if it’s an integer or whatnot. Since this is all a personal project I’m putting 0 effort into stopping it from breaking if I replace stuff with random unexpected data types.
I would look at Templater Rig to see whether this does a fair amount of what you need. https://aescripts.com/templater/
You can also import JSON files directly into AE without conversion to CSV first: https://helpx.adobe.com/after-effects/using/data-driven-animations.html
Answered by tomh on October 28, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP