Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Linking Camera to Fractal Noise

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Linking Camera to Fractal Noise
by Roland R. Kahlenberg on Aug 25, 2008 at 4:27:05 am

Hi folks, I think Dan posted a solution to this some time back but the Search doesn't seem to provide the answer.

I'm rotating my camera and I'd like Fractal Noise, Offset (I think) to be affected by the camera's rotation.

HELP!!!
Gracias!
RoRK

Respond to this post   •   Return to posts index

Re: Linking Camera to Fractal Noise
by Dan Ebberts on Aug 25, 2008 at 1:24:34 pm

Roland,

Here's one for Offset Turbulance that's based on the camera's POI:

C = thisComp.activeCamera;
z=C.pointOfInterest[2]-C.position[2];
y=C.pointOfInterest[1];
x=C.pointOfInterest[0];
xAngle=radiansToDegrees(Math.atan(y/z));
yAngle=radiansToDegrees(Math.atan(x/z));
[thisComp.width/2 - yAngle*12, thisComp.height/2 + xAngle*12]


Dan



Respond to this post   •   Return to posts index

Re: Linking Camera to Fractal Noise
by Roland R. Kahlenberg on Aug 25, 2008 at 2:59:00 pm

Thanks Dan! I'll give the Expression a nice gentle stir as soon as I can.

Gracias!
RoRK

broadcastGEMs.com - the leader in customizable royalty-free animated backdrops

Respond to this post   •   Return to posts index


Re: Linking Camera to Fractal Noise
by Darby Edelen on Aug 25, 2008 at 6:29:41 pm

So I posted this to the Media Motion list, but I wanted to make sure that it went up here as well. The way I usually link fractal noise with the camera is by using a 3D null as a reference point for the offset turbluence, scale and rotation of the fractal noise. Those expressions are below. "Target" is the 3D Null layer.

For Offset Turbulence:

l = thisComp.layer("Target");
fromComp(l.toComp(l.anchorPoint));

For Scale:

c = thisComp.activeCamera;
l = thisComp.layer("Target");
pc = c.toWorld([0,0,0]);
pl = l.toWorld(l.anchorPoint);
value * c.cameraOption.zoom / length(pl, pc);

For Rotation:

l = thisComp.layer("Target");
v = l.toCompVec([1,0,0]);
radiansToDegrees(Math.atan2(v[1], v[0]));


Darby Edelen

NVIDIA
Santa Clara, CA

Respond to this post   •   Return to posts index

Re: Linking Camera to Fractal Noise
by Roland R. Kahlenberg on Aug 26, 2008 at 3:48:25 am

AcccccccccCCCKKK!!!

My camera's a one-point camera -no POI. I'm doing a very simple y-rotation of the camera. And no Null's too cos of the simple camera move.

I ended up using the Ease Interpolation Method and came up with this script -
-------
yRot = thisComp.activeCamera.transform.yRotation;
ease(yRot,333.8,700,[360,value[1]],[900,value[1]])
-------

But thanks for those scripts. They'll come in extremely handy for more complex camera moves - which will be coming up shortly.

FWIW, I'm using Fractal Noise to mimic a night sky - so interpolation is almost a must to ensure that the relative movement of the clouds/sky is more realistic.

Gracias!
RoRK




broadcastGEMs.com - the leader in customizable royalty-free animated backdrops

Respond to this post   •   Return to posts index

Re: Linking Camera to Fractal Noise
by Darby Edelen on Aug 26, 2008 at 8:26:48 am

[Roland R. Kahlenberg] "My camera's a one-point camera -no POI. I'm doing a very simple y-rotation of the camera. And no Null's too cos of the simple camera move."

I'm not quite clear on why this doesn't allow you to use a Null? If anything using the 3D Null technique to simulate clouds on a horizon should work better with a simple pan/rotation than with translation.

I really think you'll be impressed with the results if you apply all 3 expressions to your 2D fractal noise layer and play with the camera...

Darby Edelen

NVIDIA
Santa Clara, CA

Respond to this post   •   Return to posts index


Re: Linking Camera to Fractal Noise
by Roland R. Kahlenberg on Aug 26, 2008 at 9:00:09 am

I've got over 100 layers in the comp. That makes me wanna go the minimalist route on other thingies. And it's a night sky, so the clouds are subtle. It looks alright with the translation. The rotation actually looks good - maybe too good. :-)

I've got loads of things happening on the floor area so the cloud/sky area is bestest if left subtle.

But I'll give your Expressos a whirl once I'm done with this and get to work with a more day-like sky BCK.

Cheers
RoRK

broadcastGEMs.com - the leader in customizable royalty-free animated backdrops

Respond to this post   •   Return to posts index

Re: Linking Camera to Fractal Noise
by Darby Edelen on Aug 26, 2008 at 4:07:35 pm

Good deal, you know what you're after :)

Darby Edelen

NVIDIA
Santa Clara, CA

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]