Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all 47983 articles
Browse latest View live

I want to rotate objects around a Null, but have them stay upright...

$
0
0

I have 3 object parented to a null, and I want to rotate the null to have the objects in orbit around it, but I want the objects to stay upright... would this be done with an expression?


Linear wipe through multiple layers

$
0
0

Hi, I am trying to set up a project where by i can drop multiple stills images into a comp and have a linear wipe go through them one by one, all controlled by expressions.

similar to vfx breakdown's you get on Youtube

MPC Prometheus VFX breakdown! - YouTube

Being an intrepid novice to expressions I though "I can do that, no problem!"

So I have a comp with the images in it and another comp with the wipe effect in it. Inside the wipe effect comp I have 2 layers, a null with two sliders and a solid with a linear wipe effect.

wipeEffectComp.png

The first slider (called pause) controls the length of time before the wipe effect begins and 2nd (called wipeSpeed) controls speed of the wipe:

 

if (time < thisComp.layer("Controls Wipe").effect("pause")("Slider")){

0

}else{

((time - thisComp.layer("Controls Wipe").effect("pause")("Slider")) * thisComp.layer("Controls Wipe").effect("wipeSpeed")("Slider"))

}

 

This works great I can apply a set channels effect to each image layer that takes its alpha channel from the comp with the wipe effect.

footageComp.png

But this is just the first step after this I have become stumped, searching the web unsuccessfully for information, I hope I can get some advice here.

What I think needs to happen next is once the transition % for the wipe has reached 100 the time (play head for the comp) needs to go back to frame 0 and the whole process begins again.

Each time the cycle has run the upper most layer in the stack, that is visible, needs to be made invisible, that way each new layer below can be revealed and the whole layer stack is played through sequentially.

I hope that makes sense and there is someone out there that can help. Thanks for your time.

Felix

Syntax Error on Mac

$
0
0

I am trying to use the following expression:

 

Math.sin(time * effect(“Speed”)(“Slider”)) * 45

I got the expression from this tutorial:  AFTER EFFECTS TUTORIAL - Animate Butterfly / Bird - YouTube

I've not worked with expressions before... but some Googling showed several folks running into the issue of this not working on a Mac.


Can anyone offer any advice?  Thanks!

Text layer bounds expression problem

$
0
0

I was working on something with this, and funky stuff seems to happen when there's any lower case letter with a decender (qypj) the box acts kinda funny.

In this image[2] you can see I'm using it to center the anchor point, but the words on the left with the decenders think the text box is way bigger than it is or something and puts the anchor point up a bunch, also screwing up a beautiful set of expressions I had keeping those words in the boxes and doing all sorts of other exciting stuff.after effects.PNG

The expression: myTextLayer.sourceRectAtTime().height/2; 

(I'm only centering the y axis so pay no attention to the anchor point not being in the middle of the x axis)

This is the first time we've had this feature so maybe I'm missing something or it's a lil funky still? Any help would be appreciated!

Math.sin(Math.PI) strange result

$
0
0

Hi,

 

In my AE expression Math.sin(Math.PI) gives a result of 1.22E-16, in stead of the expected zero.

Does anyone know why?

expressions problem

$
0
0

i write two expressions in a layer,(loopOut(type = "cycle", numKeyframes = 0);  [z,y,x]),only one expression can work,([z,y,x]for exchange x and z value),i want those expressions can work,what should i do?

Constant text speed animation

$
0
0

Hi All!

I need to animate different text layers with start / end selectors. This text layers can have from 20 characters to 60 characters

 

I've tried to use time expression; but it didn't works because a layer text with 20 characters ends at the same time as a layer text with 60 characters. So one goes very fast, and the other very slow, i want a constant text speed

 

my actual expression: text.animator("Animation 1").selector("Range selector 1").start+time*40

 

I would like to get the speed at 1 character at frame, then if i've got 20 characters it will take 20 frames to animate and if i've got 60 characters it will take 60 frames to animate.

 

hope you could help me!

 

ty all!

Expression to select all active audio layers?

$
0
0

I'm trying to get an Array of all audio layers in the current comp that are currently ON and in frame (ie. In point < CTI < Out point).

 

Any tips on how to do this with expressions?


Tracking puppet pin tool with null object track(HELP)

$
0
0

I'm trying to track my puppet pin tool to a null object.

 

I am using the code

 

n=thisComp.layer("NullObject_Name");
nullpos=n.toComp(anchorPoint);
fromComp(nullpos);

 

But ever time I assign the name of the null obect tp the puppet pin (eg. hair_bottom_left0)

 

n=thisComp.layer("hair_bottom_left0");
nullpos=n.toComp(anchorPoint);
fromComp(nullpos);

 

The pin tracks a different position and not the null object.

 

How do I get the pin to track to the null object I assigned it too?

How to get the footage's current frame number in expression?

$
0
0

There are 2 layers.One is text layer,one is sequence layer.

Footage has begun from the 20th frame.

Therefore, the number of composition's current frame number and footage's frame number has shifted.

 

I want to show footage's frame number in text layer . not composition's frame number.

How to get the footage's current frame number in expression?

 

 

Tatsuya

3D WARP/3DBEND: geometry expression no show?

$
0
0

"3D warp" as seen on tv.adobe "What's New", does not seem to be available on my version of CS6 AE (from disk). I'm not getting the geometry option even though,I have the 3D box checked and it is a pixel based layer. I do get the other expression options such as transform and material options. Can anyone help me bend stuff?

Expression Get Project Path or Name

$
0
0

Hi,

 

I am new to After Effects as in I have just seen it for the first time today!

 

What I'd like to know is, is it possible to write an expression to return either the current project name or file path?

 

I'm assuming no as I cannot find any reference to this in the language reference. How would I go about integrating a script with the project to return the project name?

 

I have tried something basic like:

 

Expression code:

 

var currpath = $.evalFile(filepath);

 

filepath is the path to my script file, the script is like the below:

 

GetPath()

 

function GetPath() {

 

return app.project.name;

}

 

With this I get an error similar to method name 'Global' not found - not at my work computer so can't remember the exact message.

 

Any help would be appreciated.

 

Thanks,

 

Mark

Effect > Expression Controls > Layer Control

$
0
0

Possible ways to create a control Panel with Layer Control?

I need a control to create a template with secure and unique choices for peoples.

 

  1. Way - "Layer Control" control another "Layer Control"?
  2. Way - "Layer Control" hide unwanted layers, showing only specific layers?
  3. Way - "Layer Control" show as choice external layers, of another Comp? ("Comp B" the comp with layers that need to be accessed). Instead of layers of the same Comp ( "Comp A" where the effect "Layer Control" is)

 

  • Why have two "Layer Control" (twice "Layer Control" for "3. Way") that need to choose separate layers, now I want to join the two "Layer Control" into one layer externally with more a "Layer Control" (totaling 3 Effects), to control the two Effects previous, working like a panel.
  • The "Way 2." would not be necessary two "Layer Control" in layers separated, only a mode of hide layers for each Layer Control Effect who are in the same layer (Or until put in another layer, if necessary to achieve the result.) in Main Comp "Comp A".
  • And in "Way 1." Also need to three "Layer Control", but it would be necessary an expression that links the choices of layers of Comp where are the Layer control effects external, with the Layer Control of Main Comp ("Comp A"), which will be the panel.

 

Or otherwise.

 

Thanks.

Can I link a path vertex to a position property via an expression?

$
0
0

I want to have curves and lines draw across or between points in a video clip that has hand held camera moves in it.

 

I've motion tracked the points I want to use and assigned the tracking data to a null at each point. Ideally I'd like to then link a vertex in a shape path to a null so I can have a stroke animate in and join up the tracked points and then the vertices can "stick" with the video as it draws on.

 

It's not possible to stabilise the shot animate then "de-stabilise" the shape layer as there's some parallax as the camera turns through a small angle.

 

There's a couple of Tuts that suggest work arounds, such as using the Beam or Path Text (dots and dashes) effects on a solid layer as they have vertexes that can be pickwhipped to position properties. I then have to use multiple layers and timings to create the illusion of a single line moving through the space.

 

There's also a RotAE script that I've come across:

http://www.fxfx.org/index.php/2011/03/27/how-to-attach-a-mask-point-to-a-layer-in-after-ef fects/

 

However I wanted to check if it's actually impossible and these workarounds are the only options?

how do I separate a layer from being effected by expressions on the layer above?

$
0
0

how do I separate a layer from being effected by expressions on the layer above?


AE expression for "length of text layer" for lower thirds nameplate

$
0
0
Hello everyone,

Is there a way to measure the total width (and height) of a text layer, to automatically update the length (and height) of a shape layer? I produce web news segments with 7-15 lower thirds displays for each video. I'm looking for a more efficient way to re-size each nameplate. Currently I manually re-size each shape layer to fit the name. Is there an expression that will update the shape layer, based on the length (in pixels) of the text layer?

See an example video of what I'm talking about:
http://dallasvoice.com/dvtv_track.php?s=345
(look for the nameplates that animate in at the beginning of each interview)

I've read everything I can get my hands on, but nothing has helped. Any help would be appreciated!
-RY

Ultimate CC Sphere / Comp Camera linker

$
0
0
I found a couple competing expressions to link an AE camera to CC Sphere.

One is by Dan:
http://forums.creativecow.net/thread/227/11894

And another is really complicated, but can also link an AE light too.
http://forums.creativecow.net/thread/227/452

What's the best, quickest running, most feature complete expression?

Accurate Timer For Sports

$
0
0

Hi all. I'm trying to make an expression you apply to a text layer to time sports videos accurately. So far, I have the minutes and seconds figured out, but can't seem to get the milliseconds to work. They keep adding extra values past 100 which is what i dont want. Whenever it reaches 100 it should start over.

 

milli = Math.floor(time*100);

sek = Math.floor(time%60);

min = Math.floor(time/60);



if(sek<10)

{

   "0" + min +":0" + sek + ":" + milli;

}

else

{

   "0" + min +":" + sek + ":" + milli;

}

delay scale parameter from the shape layer repeater

$
0
0

Hi,

 

 

I want to animate the scale parameter of the repeater effect and delay it on several shapes.

 

 

I've tried with this expression using 2 expressions sliders but without success

 

 

thisIndex=thisProperty.propertyGroup(3).propertyIndex;

effet=effect("repetition echelle")("Curseur");

delai=effect("delai")("Curseur")*thisComp.frameDuration*(thisIndex - 1);

[effet.valueAtTime(time - d),effet.valueAtTime(time - d)]

 

 

I've searched through the web but didn't find anything about it and I'm wondering if it's even possible

 

 

Any clue ?

Detecting keyframes

$
0
0

Hello

I want to detect if layer property has keyframe.

Two properties: position and opacity.

I need something like this:

 

p = transform.position;

o = transform.opacity;

 

if(p.hasKeyframe on current time){

    

          o = 100;

 

               }else{

 

               o = 0

                    }

Viewing all 47983 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>