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

sampleImage() in 4-color gradient issue

Participant ,
Sep 01, 2013 Sep 01, 2013

Copy link to clipboard

Copied

hi there

I am trying a technique for logo/element removal that I saw in a post from a couple years back, where a tracked, solid "patch" is placed over the unwanted element, and a 4 color gradient effect is applied to the patch, which then uses the sampleImage() method to grab local colors around the element.

I've gotten it working fine with the below code, except for one problem: when I parent my null (acting as a "color picker" position) to the original tracking info, the color no longer samples properly. Unparenting the null makes the sampling work fine, but then, I have to hand key the null, which is a pain and doesn't produce great results.

myPoint = thisComp.layer("Null 1").transform.position;

target = thisComp.layer("myAwesomeFootage.avi")

target.sampleImage(target.fromWorld(myPoint), radius = [1, 1], postEffect = true, t = time)

Any tips on getting around this parenting problem?

thanks!

ML

TOPICS
Expressions

Views

773

Translate

Translate

Report

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

LEGEND , Sep 01, 2013 Sep 01, 2013

You need to add an extra toWorld() layer space transform to convert the layer coordinates to comp/ world coordinates.

Mylenium

Votes

Translate

Translate
LEGEND ,
Sep 01, 2013 Sep 01, 2013

Copy link to clipboard

Copied

LATEST

You need to add an extra toWorld() layer space transform to convert the layer coordinates to comp/ world coordinates.

Mylenium

Votes

Translate

Translate

Report

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