Skip to main content
Inspiring
May 24, 2023
Open for Voting

Expressions access to media replacement comps

  • May 24, 2023
  • 11 replies
  • 1531 views

The potential of Media Replacement in MOGRT's for creating responsive design is huge, but it is hamstrung by the inability for expressions to access any information about the media itself. A simple, concrete example is that I am building some MOGRT's for photo treatments, with a simple white frame that needs to match the aspect ratio of the photo the editor drops into it. This would be trivial in After Effects using footage replacement, but with Media Replacement through Essential Properties in AE or in Premiere, when expressions reference the footage they only see the original footage used in the template. This means the editor has to manually adjust the dimensions of the photo frame using fiddly controls in the EG Edit panel.

11 replies

DaciaSaenz
Community Manager
Community Manager
May 24, 2023

Thanks for this request @Aaron Cobb 

Its something we have definitely heard in the past. There is an innate limitation for your example workflow 

> A simple, concrete example is that I am building some MOGRT's for photo treatments, with a simple white frame that needs to match the aspect ratio of the photo the editor drops into it. 

 

The Media Replacement Control is bound to the dimensions, duration, and frame rate of the image or video that the control was created with. So there is no way for the frame to match the aspect ratio of the new media even if you had access to it with expressions if you were also trying to use Media Replacement. 

This is set in stone and was foundational to get the feature working to begin with so I don’t see it changing any time soon. But I’ve seen some interesting workarounds by creating a control that has the largest possible dimensions and using alpha / non-alpha information to drive the response of other elements in the design. Maybe that is a possible pathway?

The concept is that the shape looks for the area in where there is no alpha so the white frame could be set up to "see" the boundary where the replaced image and the alpha of the MR Control (with larger dimensions) meet and frame the new new image via expressions. sampleImage() is what you can use to sample the alpha channel. Depending on your design you may get mileage out of it. Fair warning sampleImage() is performance intensive and will slow down your mogrt a fair bit. 


But! We do still need to add more access to the replaced media for other use cases. So thank you for the Feature Request.  

 

Thank you,

Dacia

- Dacia Saenz, AE & PR Engineering Teams