Skip to main content
Participant
June 9, 2025
解決済み

sampleImage bug (or user error?)

  • June 9, 2025
  • 返信数 1.
  • 228 ビュー

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

 

 

解決に役立った回答 Dan Ebberts

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)

:

 

返信数 1

Dan Ebberts
Community Expert
Dan EbbertsCommunity Expert解決!
Community Expert
June 9, 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)

:

 

Evan_Mather作成者
Participant
June 10, 2025

Thanks Dan. That did the trick.