- January 18, 2021 at 7:33 pm
I am attempting to affect the position of a layer based on a layer of fractal noise. The layer is keyframed to move and I want it to be affected by the fractal field, much like particles in particular.
Is something like this possible? and how might I go about achieving this?
I attempted to use Displacement Map, however, it effects the look of the layer by warping it.
- January 19, 2021 at 12:26 pm
Check this tutorial based on one of Dan’s expressions:Some contents or functionalities here are not available due to your cookie preferences!
- January 20, 2021 at 5:14 pm
Thank you for sending me this information.
I am little stuck, not sure if you can shed some light not this.
I have a layer (which is a flower) with 2 position key frames, moving the flower from left to right.
I am applying this expression to the Anchor Point to move the flower based on a fractal noise layer, as it moves across the composition.
x = thisComp.layer(“Gradient”).sampleImage(transform.position, [2,2]/2, true, time);
however, this is kicking back an error “expression result must be of dimension 2, not 4”
- January 20, 2021 at 6:20 pm
Yes, you’re sampling the image and that gives 4 values in an array [r, g, b, a]
Position needs 2: [x,y].
So you’ll have to do some kind of calculation on the color to translate it into a position-value.
For example add this final line:
And it will use red and green (0th and 1st element of x] with white moving 20px, black zero…
Log in to reply.