Skip to main content
Participating Frequently
June 21, 2024
Question

Trigger animation with comp markers - glitch during render

  • June 21, 2024
  • 2 replies
  • 1883 views

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.

 

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

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

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

This topic has been closed for replies.

2 replies

Dan Ebberts
Community Expert
Community Expert
June 21, 2024

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

Participating Frequently
June 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.

Dan Ebberts
Community Expert
Community Expert
June 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.

Participating Frequently
June 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.