ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Creating an ocean of text... problems with Particular and Form

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris MellorCreating an ocean of text... problems with Particular and Form
by on Apr 25, 2012 at 3:00:56 pm

I am creating a sea of text, where the words flow up and down like subtle waves. It is in a 3d environment where a camera can dynamically move through them.
First, I tried this in Trapcode Form. The displacement map (a pre-comp with Fractal Noise) worked excellent, my only problem is that the particles (the words) won't orient along their path... the words do not rotate as they go up and down like waves. Doesn't look natural at all.
Second, I tried Particular because I knew that there is a "orient along path" option for particles... but now I cannot get my static sea of words to react to my "displacement map" layer. I don't think there is a way to displace the particles with a map layer within Particular.

So is there something I am missing within either of these two plugins? Can I auto-orient particles in Form, or create a 3d displacement map in Particular?

Or is my only option to use literal duplications of my word layers, hundreds of them, all dynamically linked via expressions?? If that is the case... is there a way to use a displacement map layer to offset the yPositions of hundreds of layers, so they appear to be waves of water, using expressions?

whew, I know that's a lot of questions... but you guys are always a huge help when I am in a bind.

Best,
Chris


Return to posts index

Matthew KeaneRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 7:23:22 am

Hi,

When you say that you want the text to rotate, do you want it to look as if it is lying on the surface of the water and reacting to the waves? Rather than an auto-orient option, I wonder whether you could reuse your noise precomp as a Layer Map for the rotation of the particles. You could set the particles to be flat initially, then use your noise layer to rock them back and forth with the waves.



Return to posts index

Chris MellorRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 2:24:12 pm

Matthew, thanks for the response!

I am not quite sure what you mean by "use as a Layer Map for rotation"... I don't know if that is possible within either Particular or Form. Maybe with some expressions??
Just to make sure I was coherent enough in my original post, I made a little diagram:
This is what I am trying to do:


And this is what I am getting (from Form):


Of course, this isn't as simple as animating the Text along a path, because I also have these words spread through Z space. Hope that clarifies a bit.

In other news, I *kind of* got this to work by making literal duplicates of the word layers, randomly dispersing them on a plane with expressions, and offsetting their Y Position by sampling the luminance of the displacement map. WIth "Orient along path" on for each layer, they move like the ocean. However, the "orient along path" option is very buggy, and layers often freak out and jitter all over the place. Unless there is some way to smooth out the orientation (expressions maybe??) then I ideally should keep my approach within Trapcode or Form.

Best,
Chris


Return to posts index


Matthew KeaneRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 2:38:57 pm

The images make it much clearer, thanks!

Assuming you have Form version 2 (not sure this existed in v1), one of the twirly-down effects settings sections is called 'Layer Maps'. I assume you're using a custom sprite (logically, you can't set rotation settings on 'sphere' particles), so you should see the last Layer Map setting for Rotation.

Layer Maps use a grayscale image to drive the animation of a parameter - so you should be able to select your Fractal Noise layer, already used for the displacement, as the layer for the Z-Rotation.

One problem I can see is that the Layer Map will map the luminance range from black-white to 0-100% change to your rotation, but you want both the peaks (white) and troughs (black) to be zero rotation. So you might find you need to duplicate your noise comp and apply an effect - maybe Colorama? - to shift the luminance range.

On the other hand, if you're already playing with an image-sampling expression you might find it easier to tweak your expression to affect the rotation as well as the y-position.



Return to posts index

Chris MellorRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 3:50:23 pm

Oh man I never noticed that Layer Maps of sprite particles has a "rotation" option! I tried what you suggested and it looks amazing. It is soooo close. I even used Colorama to map the White>Grey>Black of the Rotation Map to Black>White>Black so the rotation reads correctly.

Still one problem, and it might be the make-or-break for Form...
When the word goes into the trough of the wave, it rotates down to 30 degrees (per the Rotation Map settings). When it reaches the trough, it has rotated back to 0 degrees. This looks PERFECT. However, when the word begins to rise back to the peak of the wave, it rotates back to 30 degrees. To look natural it should be rotating to -30 degrees... I can't image how you would accommodate this with a Layer Map, considering the Black value will have it rotate 100% in only one direction.

This is why I was originally so fixated on the Auto Orient to motion idea, because it seems the rotation will have to correspond to the movement of the particle, not based off of a 50% grey value.

Any more ideas would be appreciated. I feel like we're so close to solving this!

Best,
Chris

-Chris


Return to posts index

Matthew KeaneRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 6:58:38 pm

The problem, as you say, is that the black-white gradient can only generate positive values... so I wondered whether a bit more fiddling around with Colorama to massage the gradient might do the trick to get the text to rotate over the peak... but then I think you're going to run in to the same problem with the trough.

So, perhaps the image-sample expression is the way to go - if you sample a little way either side of the current pixel you'll be able to work out whether the gradient is rising or falling and apply a positive or negative rotation as appropriate...


Return to posts index


Chris MellorRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 8:25:49 pm

My thoughts exactly. Unfortunately this is the most processor-heavy approach, especially when there's 500+ duplicate layers, but I guess there's no feasible alternative. I have spent all day now making an expression for the Z rotation of my Words. Here's what I have so far:

// z 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 // difference between current lum and lum from one frame before

if (delta > 0) {
if (lum < .5) {
ease(lum, 0, .5, 0, -30)}
else {
ease(lum, .5, 1, -30, 0)}
}
else {
if (lum > .5) {
ease(lum, 1, .5, 0, 30)}
else {
ease(lum, .5, 0, 30, 0)}
}


The problem is when the word shifts between all of these if() statements, it tweaks out. Any coding advice would be appreciated.

-Chris


Return to posts index

Matthew KeaneRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 8:45:36 pm

OK, off the top of my head (and this is a total guess), I would think that maybe the ease function is being interrupted by a change in the 'if' condition before it gets to the end, which might be what's causing the twitching. You might want to head over to the expressions forum and see if Dan Ebberts has any suggestions.


Return to posts index

Chris MellorRe: Creating an ocean of text... problems with Particular and Form
by on Apr 26, 2012 at 8:50:37 pm

Scratch that previous expression. I realized I shouldn't be sampling the Lum (0-1) to base my rotation on, but instead the Delta.
Here is the revised version as it stands. It makes more sense in theory... but the outcome is even jerkier motion... I'm getting too deep into these expressions! Help!!


// z 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

if (delta >= 0) {
ease(delta, 0, 4, 0, -30)
}
else {
ease(delta, 0, -4, 0, 30)}


-Chris


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]