Colin Braley
Forum Replies Created
-
Time remap should work with audio as well as video. That trick is ridiculous by the way, I’ve never seen a half-flip late flip before,
~Colin
-
Colin Braley
August 1, 2007 at 6:12 am in reply to: How can you create the perfect corkscrew spiral in After Effects? -
Colin Braley
August 1, 2007 at 5:46 am in reply to: How can you create the perfect corkscrew spiral in After Effects?That’s really a funny coincidence, I created a spiral expression yesterday while waiting for a render to finish. Try this out:
//begin expression
//Expression by Colin Braley
//Modify these first few variables to change the effectcenterPoint = [360 , 270];
beginRadius = 25; //pixels
endRadius = 100; //pixels
startTime = 0; //seconds
endTime = 3; //seconds
howManyRings = 3;
clockwise = false;
//if you want the spiral to spin the other way make clockwise = false;//--
t = time;
if( time < startTime ) t = startTime; if( time > endTime )
t = endTime;
radius = linear( time , startTime , endTime , beginRadius , endRadius );
theta = linear( time , startTime , endTime , 0 , (2 * Math.PI ) * howManyRings );
if( ! clockwise )
theta *= -1;
x = radius * Math.cos( theta );
y = radius * Math.sin( theta );
//--
[x , y] + centerPoint
//end expression
If you want to see how the created motion path looks, apply the expression to the brush position parameter of the write on effect to see it as a stroke. Also, if you set either of the radii to negative values, you can get some cool effects.
~Colin
-
Try this:
cameraPoi = thisComp.layer(“Main Cam”).transform.pointOfInterest;
cameraPos = thisComp.layer(“Main Cam”).transform.position;
dist = 100;//distance from point of interest
//–
vec = normalize( cameraPos – cameraPoi );
vec * dist + cameraPoijust pick whip cameraPoi to the camera’s point of interest, and cameraPos to the camera’s position. Change distance to change the layer’s distance away from the point of interest.
~Colin
-
You have the input the value as a number of seconds. To convert from frames to seconds, you can use the function framesToTime( time ) if you really need to do calculations using frames.
~Colin
-
When you refernce a color control, you should get a value back that is an array of length 4, in the format [r, g, b, a]. Each item in this array ranges from 0 to 1. If you wanted to see the values like you would in the color picker, multiply every element in the array by 255. Try something like this:
colors = effect(“Color Control”)(“Color”);
colors * 255However, I don’t see why you would need to do this in most cases, because if you are using this value to drive a color control within another effect, it expects its values to range from 0-1, not from 0-255.
~Colin -
Colin Braley
July 20, 2007 at 10:49 pm in reply to: Expression for keeping layers oriented toward cameraIs there a reason you cant use Layer > Trnasform > Auto Orient towards camera?
-
Speaking of that magnet script you mentioned…I wrote a tutorial for it check it out here if you want:
https://www.colinbraley.com/repel_expressions_tutorial.html
It’s up on my new site which revolves around After Effects expressions/scripting, and some Maya scripting too. I still am working on a lot of things for the site, but check it out if you want.
As for having layers collide like you said, this would be a VERY slow process, because on each frame you would have to recreate all the frames before it. Also, you would have to use sampleImage on all nearby layers, which would be slow too. I have done something similar in the past( without using sampleImage() ) just using colliding circles. I’ll see if I can dig it up and post it on my site in the next few days.
~Colin
-
Place the 3d layers/lights/cameras that you want to go together in your comp, with no other layers between them. Then place a 2d solid with zero opacity above and below your 3d layers. This way, These 3d layers act as their own separate 3d “universe.”
~Colin
PS – I think you could probably use 2d null objects instead of 2d solids with 0 opacity, but you will have to try it out to be sure.
-
Link the variables you want to change globally to an Expression Control. If you dont know how to do this, try searching the term “Expression Control” in the AE help and see what you get, I think theres some info on it tin there.
~Colin