Skip to main content
Known Participant
July 5, 2025

UI Fails to Display Correct Values for Expressions Combining posterizeTime(0) and sampleImage()

  • July 5, 2025
  • 7 replies
  • 314 views

I think I found a bug; here's an AI assisted report:

Bug Report: UI Fails to Display Correct Values for Expressions Combining posterizeTime(0) and sampleImage()

Product: Adobe After Effects  Version: 25.3.1  Operating System: Windows 10

Summary

When an expression utilizes posterizeTime(0) in a chain that includes the sampleImage() function, the After Effects user interface (UI) fails to display the correct calculated value for the affected property. Instead, it shows a "default" value (e.g., black for a color swatch, or 0 for a scalar property like Opacity).

 

Critically, the underlying render engine correctly calculates and uses the accurate value, ensuring that the final render is correct. This bug is exclusively a UI display issue. This can be verified by displaying the property's real-time value on a text layer, which consistently shows the correct data despite the erroneous UI display.

Steps to Reproduce

Base Setup:

Create a new composition.

  1. Create a solid layer (e.g., a red solid named "Source"). This layer will be sampled.

  2. Create a Shape Layer.

  3. Add an Effects > Expression Controls > Color Control to the Shape Layer.

  4. Apply the following expression to the Opacity property of the Shape Layer's Transform group, referencing the Color Control:

    effect("Color Control")("Color")[0] * 100;

 

Test Case 1: posterizeTime(0) on sampleImage() property ONLY

  1. On the Color Control effect, apply this expression:

    posterizeTime(0);
    targetLayer = thisComp.layer("Source");
    value = targetLayer.sampleImage(targetLayer.transform.position, [1, 1]);

    Result: The Color Control swatch incorrectly displays black. The Opacity property incorrectly displays 0%.

 

Test Case 2: posterizeTime(0) on downstream property ONLY

  1. On the Color Control effect, apply this expression (NO posterizeTime):

    targetLayer = thisComp.layer("Source");
    value = targetLayer.sampleImage(targetLayer.transform.position, [1, 1]);
  2. On the Opacity property, apply this expression:

    posterizeTime(0);
    effect("Color Control")("Color")[0] * 100;

    Result: The Color Control swatch correctly displays red. The Opacity property incorrectly displays 0%.

Verification of Underlying Values

To confirm that the bug is limited to the UI display, the true underlying values can be displayed on a text layer:

  1. Create a new Text Layer.

  2. Apply the following expression to its Source Text property:

    // Get the values from the Shape Layer's properties
    colorVal = thisComp.layer("Shape Layer 1").effect("Color Control")("Color");
    opacityVal = thisComp.layer("Shape Layer 1").transform.opacity;
    
    // Display the values
    "Color Value: " + colorVal + "\n" + "Opacity Value: " + opacityVal;

 

Observation: In both Test Case 1 and Test Case 2, the text layer will consistently display:

Color Value: 1,0,0,1
Opacity Value: 100

 

This confirms that the expression engine is calculating the correct values, and the bug is a failure of the UI to accurately display them.

Analysis:

This demonstrates that the UI display bug is triggered whenever posterizeTime(0) is involved in an expression chain that includes sampleImage(). The UI fails to retrieve the correct value, even if the posterizeTime(0) call is in a downstream expression that is merely referencing the result of sampleImage(). The verification step definitively proves this is a UI-to-engine communication issue rather than a calculation error.

7 replies

FizzrockAuthor
Known Participant
November 13, 2025

AE 25.6 released, and no fix for this bug...

Very disappointing @JohnColombo.

This is a crazy bug, that takes a DIFFERENT LOGIC PATH for UI compared to the render engine.

The bug is messing with my marketplace template big time, and not even worth a fix?

I guess Adobe thinks it is too specialized to bother fixing??

Please provide an update for those of us that need this fix...

JohnColombo17100380
Community Manager
Community Manager
October 15, 2025

Hi @Fizzrock,

Thank you for all that additional information! I will make a note in our bug ticket for this issue about the additional symptoms you shared. I don't have an update on any fix at this time, unfortunately.

 

Cheers,

- John, After Effects Engineering Team  

FizzrockAuthor
Known Participant
September 26, 2025

Hello,

 

@JohnColombo3491446, I'm following up on this bug report with a new, and significantly more severe, set of findings. The original issue, where the UI fails to display the correct value for properties affected by the `posterizeTime(0)` + `sampleImage()` combination, has a critical downstream effect that goes far beyond a simple visual glitch. It creates a "split-brain" scenario where the After Effects UI and the render engine are operating on two different sets of data.

 

The core of this new problem is that when a downstream expression uses conditional logic (an `if/else` statement) that references a bug-affected property, the UI and the render engine evaluate the condition differently. The render engine correctly uses the true, calculated value of the property and executes the correct logical path. However, the UI's property display (e.g., the value fields in the timeline, or a layer's transform handles in the composition viewer) evaluates the same condition using the *incorrect* default value it sees, and therefore displays a result based on the *wrong* logical path.

 

This results in a complete desynchronization between what the user sees in the interface and what is actually happening in the composition. For example, the UI might show a layer's position is `[100, 100]` (from the `else` block of an expression), while the layer itself is correctly rendered at its original position (from the `if` block). This makes it impossible to debug expressions, trust the UI's feedback, or interact with layer controls directly, elevating the bug from a cosmetic issue to a fundamental workflow-breaking problem.

 

Here is a simplified test case to demonstrate this "split-brain" behavior:

 

### Steps to Reproduce the UI/Engine Desynchronization

 

**1. Base Setup:**
 * Create a new 1920x1080 composition.
 * Create a new red Solid layer named `"Source"`.
 * Create a new Text layer named `"Test Layer"`.

 

**2. Create the Bug-Affected Controls:**


 * On the `"Test Layer"`, add an `Expression Controls > Color Control` effect and name it `"Buggy Color"`. Before adding an expression, set its color to pure black (`#000000`).
 * On the `"Test Layer"`, add an `Expression Controls > Checkbox Control` effect and name it `"Buggy Checkbox"`.

 

**3. Apply the Expressions:**


 * Apply this expression to the **Color** property of the `"Buggy Color"` effect. This triggers the original UI bug.

posterizeTime(0);
thisComp.layer("Source").sampleImage([100,100], [1,1]);

*Observation:* The color swatch will incorrectly display black.

 

* Apply this expression to the **Checkbox** property of the `"Buggy Checkbox"` effect.

// This checkbox should be ON (true) because the sampled color is red.
if (effect("Buggy Color")("Color")[0] > .01) {
  1; // True
} else {
  0; // False
}

*Observation:* The checkbox will incorrectly appear to be OFF (unchecked).

 

**4. Create the "Split-Brain" Position Expression:**


* Apply this expression to the **Position** property of the `"Test Layer"`.

isVisible = effect("Buggy Checkbox")("Checkbox");

if (isVisible == 1) {
  // The RENDER engine will use this path.
  thisProperty; // Use the property's current value (center of the comp)
} else {
  // The UI will use this path.
  [100, 100]; // Top-left corner
}

 

### **Observed Result:**

* **Render/Preview:** The `"Test Layer"` will correctly appear in the **center of the composition** (its original position).


* **UI Display:** The `Position` property values in the timeline will incorrectly show `[100.0, 100.0]`. The layer's transform handles in the composition viewer will also be incorrectly located at `[100, 100]`.

 

This proves the render engine is correctly evaluating `if (isVisible == 1)` while the UI is incorrectly evaluating the `else` branch. This desynchronization makes direct manipulation and debugging impossible.

 

**Note:** At any time, commenting out the `posterizeTime(0);` line in the `"Buggy Color"` expression will cause all UI elements to immediately update and display the correct values, confirming it as the trigger for this entire chain of behavior.

 

FizzrockAuthor
Known Participant
September 26, 2025

Any updates on this bug @JohnColombo17100380 ?

 

I have identified more significant downstream consequences of this bug; I will report them here soon.

 

Please bump up this bug to be a fix priority; it is creating havoc in one of my marketplace templates.

 

Thanks.

FizzrockAuthor
Known Participant
July 21, 2025
Hello,

I'm following up on this bug report with a new, significant finding. It appears the UI display issue has a more problematic downstream consequence than just being a visual glitch: it prevents After Effects from correctly updating expression references when a control name is changed.

We know from previous discussions that for After Effects to update a renamed control within an if/else statement, the expression path containing that reference must be "live" (i.e., the condition must be true).

However, when a property is affected by this posterizeTime(0) + sampleImage() UI bug, this standard workaround fails. Even if the conditional statement is set to true, the expression will not update to reflect the new name of the control, leading to a broken expression.

For example:

if (true) {
  // This reference should be updated when the effect is renamed
  effect("Value_to_Use")("Slider") * 100;
} else {
  0; // This path is not active
}

Now, rename the "Value_to_Use" effect to something else, like "New_Value_to_Use". The expression on the Opacity property does not update. It still references "Value_to_Use", and the expression breaks.

The UI bug is interfering with the expression engine's ability to track dependencies for renaming. This makes the bug significantly more disruptive to a workflow, as it can cause expressions to break unexpectedly.

I hope this additional information is helpful.

Thanks again
FizzrockAuthor
Known Participant
July 9, 2025

Great, thanks John.

Give a shout if it ends up fixed soon in the beta; it's really messing with the workflow on my current project.

Thanks

JohnColombo17100380
Community Manager
Community Manager
July 9, 2025

Hi @Fizzrock,

Thank you for reporting this issue. We are also able to reproduce it and now have a ticket open for further investigation.

 

Thanks again,

- John, After Effects Engineering Team