Skip to main content
Known Participant
August 9, 2021
Question

Green Values in the Composition Panel?

  • August 9, 2021
  • 1 reply
  • 831 views

I have added an expression to a value in my composition panel. Instead of the expected red numbers, I'm getting green numbers that evaluate over time, and turn red once they find the expected value. However, if I RAM preview the comp, everything calculates much quicker than if I do a frame at a time. I should mention that the expression works as expected with no issues.

Does anyone know what these green values represent?

 

 

For reference, the expression in question is:

x = 960;
y = 0;
searchLayer = thisComp.layer("EKG Precomp");
lumaTolerance = 0.9;
searchRadius = [1, 1];
for (i = 10; i < thisComp.height; i++){
lumaLookup = searchLayer.sampleImage([959, i], searchRadius, false, time);
if (lumaLookup[0] < lumaTolerance){
y = i;
break;
}
}
y += (content("Ellipse 1").content("Ellipse Path 1").size[1] / 2);
[x, y]

 I know that it's rough and inefficient; it was just a quick proof of concept for a coworker. It sets a layer's Y value based on the highest black pixel in a column of pixels in another layer.

This topic has been closed for replies.

1 reply

Community Expert
August 9, 2021

Already answered in your previous thread. You have a recursive loop. The green numbers tell you that the frame is trying to make the calculations and it's just not done yet. It's the look back again and again for a sample image value chat that causes the problem. Your expression does not contain javascript errors, it's just recursive. Look here, does it match, no, look somewhere else, does it match, no, look somewhere else, does it match, no until if finds a yes. It does that on every frame and once in a while it just hangs up. That's the problem. It may render OK, or in some cases, the render may hang forever. 

 

You need to redesign the expression. I'm not sure how to do it in the most efficient way but I would probably do it in a different way. I would probably use the values that are driving the EKG pre-comp that you are looking at. It could be as simple as a simple linear(t, tMin, tMax, value1, value2) interpolation method.

Known Participant
August 9, 2021

Thanks for your help, Rick. I made another post because Adobe support requested it.

 

I'm not looking for help with the expression; it was just a proof of concept that I used to demonstrate a point to a coworker. I'm interested in this green value UI feature that I've not seen before.


Do you know anything more about the specifics of what the green indicates? I ask because the whole project previews extremely quickly; I only get sluggishness when going to a random frame. Also, I've had loops in expressions before and haven't had green values. Is it a new UI feature?

Maybe green values indicate a loop that takes more than a pre-determined amount of time? I assume that it's sluggish in its calculation on a frame only because it's limiting the amount of calculations that an expression can evaluate, per frame, while not rendering. This would also explain why it runs slow on random frames, but not during render. However, this is pure speculation; I'm just trying to make sense of what I'm experiencing.

I wish that there was information in the manual on this specific item. I'm just trying to understand the software as best I can so that I can make efficient tools going forward and it's somewhat frustrating that I can't find any official documentation about this UI element.

Community Expert
August 10, 2021

When you pick a random frame it has to start at the first frame and start calculating. That's the problem with recursive expressions. You're just waiting for every previous frame in the composition to calculate the position of the transition.