Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

sampleImage() in 4-color gradient issue

$
0
0

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


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>