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

Trigger animation with comp markers - glitch during render

Community Beginner ,
Jun 21, 2024 Jun 21, 2024

I've used Dan Ebbert's trigger animation with markers expression for years and I occasionally have an issue where an animation...glitches for lack of a better term... for a single frame during a render. When I preview the animation in AE, it plays fine. It only seems to happen once if I have multiple comp markers setup for animation.

 

This is the code I've applied to the Time Remap property of my precomp.

try{
//Trigger and Retime Precomped Animations: Apply to Time Remap
action = comp(name);

n = 0;
if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
        n--;
    }
}

if (n == 0){
    0
}else{
    m = marker.key(n);
    myComment = m.comment;
    try{
        actMarker = action.marker.key(myComment);
        originalStart = actMarker.time;
        originalEnd = originalStart + actMarker.duration;
        newStart = m.time;
        newEnd = newStart + m.duration;
        linear(time,newStart,newEnd,originalStart,originalEnd);
    }catch (err){
        0
    }
}
}catch(err){value}

 

Here's how it looks in a GIF.

Test_GIF.gif

 

The glitch is happening when my "Out" marker triggers.

Screenshot 2024-06-21 at 11.19.27 AM.png

There aren't any keyframes or changes between comp markers. In this case, no changes between my "Transition" and "Out" markers.

Screenshot 2024-06-21 at 11.20.01 AM.png

I first thought it might be a framerate issue, but I've verified every comp is using the same frame rate. I've tried rendering to MP4, MOV, GIF. The glitch happens in all of them. Any ideas? Thank you

TOPICS
Expressions
1.2K
Translate
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 Beginner ,
Jun 21, 2024 Jun 21, 2024

Wanted to add that the frame the glitch happens, it's not the whole frame disappearing. In this case, my text goes slightly transparent and parts of it are cut off. Here's the single frame from the GIF.

Test_GIF-12.png

Translate
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 ,
Jun 21, 2024 Jun 21, 2024

It's hard to tell without seeing the project. What does the time remapping look like in the graph editor?

Translate
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 Beginner ,
Jun 21, 2024 Jun 21, 2024

I've included a stripped down version of my project file. Here's the graph editor and a screenshot of my comp where I have the expression applied to Time Remap and all my markers.

Comp.png

GraphValue.png

Translate
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 ,
Jun 21, 2024 Jun 21, 2024

To see the Time Remap graph, you have to turn on the Show Post-Expression Graph gizmo for the Time Remap property of the Ribbon layer in the Main comp (and turn on Edit Value Graph), but once you do that, the graph looks good. There's nothing jumping out at me that would explain your glitch in terms of what the expression is doing.

Translate
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 Beginner ,
Jun 21, 2024 Jun 21, 2024

Crazy that you can still learn new things that have been right infront of your eyes for years.
I'm reusing that ribbon a handful of times where I'll need to adjust timing so I thought this was a good implementation of that expression, but perhaps I'll have to go without it or time remap with keyframes.
Thank you for taking a look Dan!

Translate
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 ,
Jun 21, 2024 Jun 21, 2024

Please report back if that makes the glitch go away.

Translate
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 Beginner ,
Jun 24, 2024 Jun 24, 2024
LATEST

I was able to render it fine when using keyframes. However, using hold keyframes still resulted in the glitch during render, as if I was still using the expression and markers. So it seems related to when the time remap jumps in time?
For example, in my Ribbon comp, I have my "Transition" animation occur from 10:00 - 11:00 and my "Out" animation occur from 20:00 - 21:00. In the main comp, when the time remapped Ribbon layer skips from 11:00 to 20:00, it produces the glitch. When I just let the keyframes playout, it renders as it should. Which I guess is fine in this case since I don't have any animation occuring during that time.
In these screenshots, layer #9 renders correctly. Layer #10 and #11 produce the glitch.

Glitch_Keyframe.png

Glitch_GoodGraph.png

Glitch_BadGraph.png

Translate
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