Search found 320 matches

by Dan Ebberts
July 25th, 2007, 3:20 pm
Forum: Expression Discussion
Topic: distance from camera expression issues...
Replies: 9
Views: 24148

toWorld() does one specific thing, and that is to convert coordinates from a layer's layer space (where the upper left corner is [0,0,0]) to world space. So the only thing you would want to feed toWorld() would be coordinates represented in layer space. This is why you always see anchorPoint used in...
by Dan Ebberts
July 25th, 2007, 2:30 pm
Forum: Expression Discussion
Topic: distance from camera expression issues...
Replies: 9
Views: 24148

I think scaling should only affect the results if it causes the Anchor Point to move. What are seeing exactly?

Math.abs() just takes the absolute value and gives you a posative number, like length() does.

Dan
by Dan Ebberts
July 25th, 2007, 1:11 pm
Forum: Expression Discussion
Topic: distance from camera expression issues...
Replies: 9
Views: 24148

It doesn't look like you posted the entire expression, but give this a try:

Code: Select all

d = Math.abs(thisComp.activeCamera.toWorld([0,0,0])[2] - toWorld(anchorPoint)[2]);
easeOut(d,startFade,endFade,Q.effect("Levels (Individual Controls)")("Output Black"),0) 
Dan
by Dan Ebberts
July 25th, 2007, 8:34 am
Forum: Expression Discussion
Topic: projectile motion
Replies: 2
Views: 9003

This should launch at the first layer marker: vel = 300; //velocity - pixels per second angle = -45; // launch angle - degrees g = 300; // gravitational constant if (marker.numKeys > 0 && marker.key(1).time < time){ t = time - marker.key(1).time; theta = degreesToRadians(angle); x = vel*Math...
by Dan Ebberts
July 10th, 2007, 3:13 pm
Forum: Scripts Discussion
Topic: script for this?
Replies: 4
Views: 11156

It seems like you should be able to do this. Assuming your text is an AE text layer, you should be able to add an opacity selector, duplicate the layer once for each character, and set the range selector parameters to make only that character visible. Might be quicker to do it by hand unless you hav...
by Dan Ebberts
June 26th, 2007, 6:51 pm
Forum: Scripts Discussion
Topic: Retrieving a camer'a auto-orientation setting?
Replies: 2
Views: 7011

An autoOrient layer attribute has been added for CS3 and does appear to work for cameras.

Dan
by Dan Ebberts
June 17th, 2007, 5:36 pm
Forum: Expression Discussion
Topic: Time question
Replies: 2
Views: 7694

Sure, like this:

freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;
timeToStart = 5; // start time (seconds)

t = Math.max( time - timeToStart,0);
amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)


Dan
by Dan Ebberts
May 27th, 2007, 3:44 pm
Forum: Expression Discussion
Topic: A script that converts a movieclip into a raster image?
Replies: 9
Views: 17695

I think you just have an extra right paren in there:

exp = "thisComp.layer(2).sampleImage(transform.position, [2, 1.5], false, time);";


Dan
by Dan Ebberts
May 16th, 2007, 1:27 pm
Forum: Expression Discussion
Topic: A script that converts a movieclip into a raster image?
Replies: 9
Views: 17695

What a fun project. I think it would have to be an AE CS3 script that would construct the appropriate sampleImage() expression and harvest the results to decide which image to place at each location in the grid for each frame. It would probably take a long time to run, but it would be very cool.

Dan
by Dan Ebberts
May 8th, 2007, 9:44 am
Forum: Expressions Library
Topic: Animate your paint strokes
Replies: 5
Views: 36358

I cooked this up specifically for Paint effect strokes. I don't think it will work with stroked paths.

Dan
by Dan Ebberts
May 8th, 2007, 9:07 am
Forum: Expressions Library
Topic: Animate your paint strokes
Replies: 5
Views: 36358

You would get that result if you pasted the expression into the layer's rotation property rather than the brush's. Is that possibly what happened?

Dan
by Dan Ebberts
May 8th, 2007, 8:24 am
Forum: Expression Discussion
Topic: Faster random binary number generator
Replies: 6
Views: 13225

This generates a 128x12 random binary block that seems to render quite a bit faster than other methods:

Code: Select all

s = "";
for (j = 1; j <= 12; j++){
  for (i = 1; i <= 4; i++) s += (4294967296 + Math.floor(random(4294967296))).toString(2).substr(1);
  s += "\r";
}
Dan
by Dan Ebberts
April 27th, 2007, 6:15 pm
Forum: Expression Discussion
Topic: increment and hold until event
Replies: 4
Views: 11807

That method is kind of a last resort, but sometimes you have to do it. It should do what you need.

Dan
by Dan Ebberts
April 27th, 2007, 2:58 pm
Forum: Expression Discussion
Topic: increment and hold until event
Replies: 4
Views: 11807

This uses time, but play around with it and see if it does what you want:

stepTime = 2;
opacityIncrement = 20;
currentStep = Math.floor(time / stepTime);
value - currentStep*opacityIncrement



Dan
by Dan Ebberts
April 14th, 2007, 4:40 pm
Forum: Scripts Discussion
Topic: Set Slider Range ( min / max)?
Replies: 3
Views: 11240

I would guess not, since you set those in a dialog.

Dan