Activity › Forums › Adobe After Effects Expressions › Linking Camera to Fractal Noise
-
Linking Camera to Fractal Noise
Posted by Roland R. kahlenberg on August 25, 2008 at 4:27 amHi 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!
RoRKDarby Edelen replied 17 years, 9 months ago 3 Members · 7 Replies -
7 Replies
-
Dan Ebberts
August 25, 2008 at 1:24 pmRoland,
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
-
Roland R. kahlenberg
August 25, 2008 at 2:59 pmThanks Dan! I’ll give the Expression a nice gentle stir as soon as I can.
Gracias!
RoRKbroadcastGEMs.com – the leader in customizable royalty-free animated backdrops
-
Darby Edelen
August 25, 2008 at 6:29 pmSo 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 -
Roland R. kahlenberg
August 26, 2008 at 3:48 amAcccccccccCCCKKK!!!
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!
RoRKbroadcastGEMs.com – the leader in customizable royalty-free animated backdrops
-
Darby Edelen
August 26, 2008 at 8:26 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 -
Roland R. kahlenberg
August 26, 2008 at 9:00 amI’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
RoRKbroadcastGEMs.com – the leader in customizable royalty-free animated backdrops
-
Darby Edelen
August 26, 2008 at 4:07 pmGood deal, you know what you’re after 🙂
Darby Edelen
NVIDIA
Santa Clara, CA
Reply to this Discussion! Login or Sign Up