• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

MOGRT created in After Effects and connected to a JSON file is not displaying data in Premiere

Explorer ,
May 25, 2022 May 25, 2022

Copy link to clipboard

Copied

I've spent ages creating a composition in After Effects which links to and displays data from a JSON file.  I can see the data displayed when in AE, however after creating a MOGRT file and dragging to the timeline in Premiere, none of the JSON data is displayed.

 

I have a different composition which is using JSON data and I have used Dynamic Link to import that and the data displays correctly with that one.

 

I need to use a MOGRT file for the one that's not working as I need to make a selection that changes what data is being displayed.

 

Can anyone help me to figure out why I'm not seeing the data?

 

Many thanks.

 

After Effects 22.2.1

Premiere 22.3.1

Windows 10

TOPICS
Error or problem

Views

762

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 26, 2022 May 26, 2022

Data-driven Motion Graphics templates support controls for CSV and TSV.

 

https://helpx.adobe.com/after-effects/using/creating-motion-graphics-templates.html

Votes

Translate

Translate
Explorer ,
May 26, 2022 May 26, 2022

Copy link to clipboard

Copied

I've just used Dynamic Link inside Premiere to import the composition that is not displaying the JSON data in the MOGRT file.  When I place it on the timeline the data is displayed, however doing it that way means I don't have access to change any settings inside Essentail Graphics.

 

What am I missing?  Surely there must be a way to get this to work?  Any help gratefully received.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 26, 2022 May 26, 2022

Copy link to clipboard

Copied

That's a tricky one ... maybe @DaciaSaenz or @Jarle Leirpoll might be able to help?

 

Neil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 26, 2022 May 26, 2022

Copy link to clipboard

Copied

Thanks Neil for bringing this thread to the attention of those who might be able to help.

 

I hope so, becasue if not then I'll be forced into making over 50 copies of the various compositions and then imoprting them all seperately into Premiere.  Eek!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2022 May 26, 2022

Copy link to clipboard

Copied

Data-driven Motion Graphics templates support controls for CSV and TSV.

 

https://helpx.adobe.com/after-effects/using/creating-motion-graphics-templates.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 26, 2022 May 26, 2022

Copy link to clipboard

Copied

Hi Warren,

 

Many thanks for taking the time to reply.  Sadly that's not the news I was hoping for.  Way too much time has gone into making the compositions work with the JSON data to change them now.  There are 145 layers and almost all layers have expressions.  I'm not even sure I'd be able to achieve what I need with a CSV or TSV file.

 

Super frustraiting that MOGRT's don't work with JSON.  I wonder if they ever will?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 02, 2022 Jun 02, 2022

Copy link to clipboard

Copied

I have since discovered that in order to have the JSON data displayed inside Premiere when using a Dynamic Link you need to have:

 

After Effects installed

After Effects open

The project that has the data open and active in After Effects.

 

This means that all compositions that you need to display in Premiere, that have JSON data, will need to be in the same project.

 

If I'd known about not being able to use JSON in a MOGRT then I might have started to develop using a CSV or TSV, however I worry that those formats are not as flexible for what I was working on.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 01, 2022 Jul 01, 2022

Copy link to clipboard

Copied

I just want to point out that Dataclay Templater offers tremendous advanatages of MOGRT workflows when it comes to data sources (especially JSON). Yes, Templater is a paid subscription, but there is a reason Netflix, Apple, Amazon, the NFL, and many, many more companies are building automated After Effects solutions on our technology! MOGRTs are great - but Templater goes way beyond what MOGRTs can offer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

I know this is probably too late to help the original author of the question but I have info that may help others who find this. I included the process I went through to discover this in case its helpful to someone.

 

As far as i know there is not a way to reference an external JSON file in a .mogrt (meaning a file stored on the drive that is continuously updated and changed). I did find however that you can use JSON data and external expression files (.jsx files used to store javascript code snippets to reuse). All you have to do is add the JSON and JSX file as layers to a compisition that is involved in the final MOGRT template. If you only import the data to the project, but do not have it in a composition that is a part of the template then it will be not be added to the template as a "Footage Item" since as far as AE can tell it is an unnecessary item in the AE project.

 

––––––––––––––––––––––––––––––Process Starts Here–––––––––––––––––––––––––––––––

 

I discovered this while creating a somewhat complicated template for my editors. The template itself does a number of things: Changes icons/logo, changes the animation based on which logo is selected, changes three separarate layers of text based a dropdown, changes the color scheme of the background, text, and individual icon/logo elements, as well as giving custom controls to each of these. As i was creating it i kept adding more features to it and realized that if I ever wanted to make a change to a color scheme I would have to update 15 separate expressions. I wanted to find a way to be able to add additional color schemes and only have to type them once which is where my JSON jourmey began.

 

I created a simple JSON file with two parent objects. The first was all our brand colors referenced by name, which had 4 properties (name, hex, rgb, hsb).

{
  "color":{
    "strength":{
      "name": "strength",
      "hex": "243746",
      "rgb": [36, 55, 70, 0],
      "hsb": [209, 49, 27, 0]
    },
...

 

The second parent object was the color schemes, which were just numbered 1-5. The color schemes themseleves contained key-value pairs for each of the color expression controls (primary, secondary, accent, etc.). The values of these keys were the names of the colors that are in the first category of the JSON doc.

  ...
},
  "colorScheme":{
    "1":{
      "name": "strength",
      "primary": "strength",
      "secondary": "empowerment",
      "accent": "authenticity",
      "iconBG": "balance",
      "iconBoundary": "authenticity",
      "background": "strength",
      "meetingText": "balance",
      "speakerText": "authenticity",
      "languageText": "balance"
    },
    "2":{
      ....

 

I then wrote the following function to a JSX file:

{
"getColor": function(dropDownMenu, colorSchemeProperty, jsonData){
  var selection = jsonData.colorScheme[dropDownMenu][colorSchemeProperty];
  return data.color[selection]['hex']
}

I created a variable called 'property' on each layer which was equal to which property of the color scheme object it was to use. I then passed "property" along with the colors scheme dropdown control and the JSON data to this function as an argument in the hexToRGB() built in expression. The function would look at the JSON color scheme object, find the property passed in, and store the name of the color. It then went up to the color section of the JSON data, looked up the color by the name stored in the previous step, and returned its hex value.

var scheme = comp("Regional Graphics Master Layer").layer("###Master").effect("Color Scheme")("Menu");
data = footage("SLM Graphic Data.json").sourceData;
lib = footage("SLM Template Functions.jsx").sourceData;
property = 'iconBoundary';
hexToRgb(lib.getColor(scheme, property, data))

 

I did a few tests and every was working great so i was able to go from the old code of if-else hell (30ish lines of expression code per layer, for 15-20 layers), and only use 6 lines of code for each layer. I bundled the template and sent it off. Then i tried it in premier the next day on one of the editors machines and... nothing. WTF. so i then spent 4 hours trying to figure out how to make it work in all sorts of hacky ways with very limited success. Adding the json as a layer and refencing it would only allow me to access the top layer but couldnt drill down using dot notation or names. If i was to go that route i would have to use position arrays and my brain was already mush. I then realized I might be working too hard and may have just wasted several hours of my life trying accomplish something super simple. 

 

I then copied my old mogrt that wasnt working and broke into it. (If you dont know how to access the AE project stored in a template its super easy. Just change the name of the file from "something.mogrt" to "something.zip" and unzip the resulting file. Open the file and then change the "project.aegraphic" to "project.zip" and unzip again and you will then have the AE file.) When i opened the AE file there were no JSON or JSX files in the project so i added them to the master comp in the original AE project and exported that template and did the whole process again. Lo and behold, I know had my JSON data, JSX library and all the features I built were now working.

 

Hope this helps someone at sometime, somewhere.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

LATEST

Thank you for posting this!

 

Including 'complex' items such as JSON files or data, video files & etc in mogrts isn't easy or always even possible at times. The ways it can be "handled" are like this, very non-obvious.

 

But really desperately needed when they are needed!

 

Neil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines