-
Creating an ocean of text layers, all reacting to a displacement map
here is the history of my issue. I decided to move the discussion here because my problem is now strictly involving expressions.
I am trying to create a sea of text layers, where each word rises and falls like a wave. After Particular and Form failed me (refer to the link to other thread) I now must make the 500+ duplicates of my layers and have them linked through expressions. I created the bed of Words no problem. They sit above a Displacement Map (pre-comp’d Fractal Noise) and are vertically displaced according to the luminance value using the sampleImage() and rgbToHsl() expressions. Now the tricky part is getting the Rotation to work.
Here is what I want to happen:

From here, I have been trying to map the rotation of my layers from the Displacement Map. Here is the code I have so far:
// sampling
target = thisComp.layer("Turbulence Layer");
samplePoint = [position[0],position[1]];
sampleRadius = [1,1];
rgb = target.sampleImage(samplePoint, sampleRadius, true, time);
lum = rgbToHsl(rgb)[2];
rgbOld = target.sampleImage(samplePoint, sampleRadius, true, time-thisComp.frameDuration);
lumOld = rgbToHsl(rgbOld)[2];delta = (lum-lumOld)*100 // change in luminence
if (delta > 0) {
ease(delta, 0, 4, 0, -30)
}
else {
ease(delta, 0, -4, 0, 30)}This makes sense to me; if the change in luminance is positive (meaning the Word layer is rising on a wave) then the rotation should ease from 0 to -30. If it is negative, then it should rotate accordingly in the opposite direction.
But the rotation is extremely jittery. It kind of looks right, but it tweaks out all over the place.Any help would be super appreciated!!!
-Chris
