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

sampleImage bug (or user error?)

New Here ,
Jun 09, 2025 Jun 09, 2025

Hello.

 

I am trying to dyamically return the color value of a text layer based on the color value of the layer underneath its position (which is a video). This is my expression. It is applied to the Source Text of the text layer. All I get is [0,0,0,0] no matter where the text layer is location within the composition.

 

sampleImage(transform.position, radius = [8, 8], postEffect = true, t = time)

 

It is this a bug or ... user error?

 

Evan

 

 

TOPICS
Error or problem , Expressions
177
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

correct answers 1 Correct answer

Community Expert , Jun 09, 2025 Jun 09, 2025

If you're trying to sample the layer below the text layer in the layer stack, I'd try it this way

thisComp.layer(index+1).sampleImage(transform.position, radius = [8, 8], postEffect = true, t = time)

:

 

Translate
Community Expert ,
Jun 09, 2025 Jun 09, 2025

If you're trying to sample the layer below the text layer in the layer stack, I'd try it this way

thisComp.layer(index+1).sampleImage(transform.position, radius = [8, 8], postEffect = true, t = time)

:

 

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
New Here ,
Jun 09, 2025 Jun 09, 2025
LATEST

Thanks Dan. That did the trick.

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