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

Expression für: Rotation verfolgt die Position einer anderen 2D Ebene

$
0
0

Hallo AE-Freunde,

 

Ich wollte nur ein "schnelles" script finden um die Rotation einer Ebene (ein Pfeil z.B.) an die Bewegung (Position des Ankerpunktes) einer anderen Ebene automatisch anzupassen.

Die zu verfolgende Ebene ist allerdings zu dem einem Nullobjekt untergeordnet, was für die Expression sicher relevant sein dürfte.

Ich dachte das wäre simpel und habe jetzt alles mögliche durchforstet, aber nichts adäquates gefunden.

 

Wie gesagt, kann ich mir vorstellen, das es eines der ältesten und simpelsten Fragen sein dürfte,

aber nach 2 Stunden Recherche, keinen Erfolg gehabt und zum selber scripten reicht bei mir leider noch nicht.

 

Viele Grüße an da Draussen D Vielleicht kann mir jemand helfen?


Trigger sound from Expression

$
0
0

Hi, is it possible to trigger a sound in the project folder using expressions?

 

eg:

 

PlaySound('ding.wav');

 

Thanks

How to get an Array of all layers in the current comp

$
0
0

In expressions, how do you get a list of all layers in a comp?  The following doesn't work and errors with "property or method named 'layers' in Class 'Comp' is missing or does not exist":

 

allLayers = thisComp.layers;

Basic tween

$
0
0

Hi, I am new to the syntax in Expressions, but I use Greensock TweenLite a lot

 

I was wondering what the equivalent of this would be. The Graphic would be the Current layer, a duration of 3 seconds, and move in from the left -440 pixels with easing

 

TweenLite.from(Graphic, 3, {x:"440px", ease:Sine.easeOut});


This would be applied on the position keyframe.

 

Any advice appreciated

 

Thanks

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?

Snappier Wiggle?

$
0
0

How would you make a wiggle expression that radically reduced the time between values?  Like Wiggle that uses Exponential interpolation as inbetween values? So even though the pace would be something like wiggle(1,50), it would take much less than the 1 second wiggle interval to change between values.

 

Kind of like how a hummingbird feeds? It hovers, hovers, hovers... then snap into a new position.... hover, hover, hover... snap into new position.

 

Any ideas about this?

 

(Also, is the Jagged/Smooth option of the ancient Wiggler available in expression form?)

Randomly rotate layer in specific increments

$
0
0

The random(x) expression is simple enough to randomly rotate a layer to any angle, but what if I want that angle to be to the nearest 45 degrees? So my layer would randomly rotate to any of the following angles: 0, 45, 90, 135, 180, 225, 270, 315, or 360 degrees.  Thanks, Jim

How to get relative position of layer in larger precomp.

$
0
0

The Setup:

 

Comp 1 is 2000x3000 pixels. Comp 1 contains Layer X that is positioned at 1750,1250. (or whatever)

 

I pull Comp 1 into Comp 2 which is 800x600. I scale and move Comp 1 inside Comp 2 by an arbitrary amount.

 

How can I determine Layer X's position using Comp 2's coordinate space?


lengthen or shorten vector

$
0
0

this may seem trivial, but vector mathematics is not my strong suit.

 

if I have a vector between point A and point B, how do I shorten it (or lengthen it), but maintian a center point between A and B, like this

 

  A------------B  old vector

  A  --------  B new vector or

--A------------B-- another new vector

Dan's Audio Beat Counter

$
0
0

I've been trying to figure out how to modify Dan Ebbert's AudioBeat Counter so that it starts counting beats based on the layer's in point rather than on the start time of the comp. IOW, I'm trying to create a series of text layers that count 1, 2, 3, 4 based on the audio but each of these layers start at a different time (every 8 bars or so). You get a few bars, then text that goes 1,2,3,4, then a few more bars, then 1,2,3,4 from another layer and so on.

 

I can't seem to figure out how to start counting beats at the inPoint of the layer. When I offset the layer time based on the inPoint it just shifts the the starting point of the count so that it's out of sync with the audio by time to the inPoint. I want to ignore the beats before the inPoint and only count the beats after the inPoint without having to split the Audio Amplitude layer for each text layer.

 

Thanks.

Very basic Radial Wipe / Opacity expression

$
0
0

Hey Guys

 

Sorry for asking what is probably a super elementary question. Why doesn't my simple expression below achieve the result of dropping the opacity by 25 for each quarter of completion? Am I missing something basic? Instead it stays at 100% until the final quater where it drops to 25. Im pretty fresh at expressions so hope sorry if such a function is written wrong.

 

Cheers

 

EXPRESSION ON OPACITY

trans=effect("Radial Wipe")("Transition Completion");

 

if (trans<=75 && trans>50){

75}

if (trans<=50 && trans>25){

50}

if (trans<=25 && trans>0){

25} else {100};

Expression question: keep adding to value

$
0
0

Hi!

 

I want to animate the cameras z-position based on an audio track. I have converted the audio to keyframes, but now I'm stuck trying to figure out how to feed the audio peak values to the cameras z-position so that they keep adding to each other.

 

Simply linking the camera z-position to the keyframe data will make the camera fly back and forth, but I need it to keep going forward in a pulsating motion. So when there is a peak in the audio amplitude, the camera moves more rapidly forward and when there is a flat waveform the camera stays put or moves only slightly.

 

Is this possible to do?

AE CS6: Render glitches with timeremap expressions

$
0
0

Version:

11.0

 

OS:

Mac 10.7.4

 

Source Footage:

.ai files

 

Problem:

 

First of all, we've been using this method for character animation since AE 7.0.  We have had minor glitches here and there, but nothing consistent enough to a real problem.  We're currently using CS5.5, and considering the CS6 upgrade.

 

I am filing an official bug report for this, but am curious if anyone else is experiencing this.  I don't want to share my project here as it's for a TV show in production.

 

Starting with CS6, we're experiencing random, arbitary render glitches all over the place.  Our character comps are generally two comps deep.  Meaning in the character comp, we have timeremapped comps for sequences of eyes, eyebrows, mouths, etc.  Inside those comps, there is a lot more going on than just an image sequence.  We have mesh warp keyframes and other stuff.

 

All of this is controlled by various expressions that link everything to some simple master controls.  I'm sure this sounds familiar -- it's very similar to the method used in these tutorials, but not even as complex.

 

As for the glitches, they are hard to pin down.  There are different glitches depending on whether the character is continually reasterized in the scene or not, which comp we're in, etc.  Really random.  The problem is resolved by proxying those precomps (the eyes, mouths, etc) with prerendered sequences.  This is an OK workaround for most cases, but we can't depend on it.

 

Thanks for any help.  In the meantime we'll be sticking with 5.5.

 

Bryan

Offsetting time and position of several layers relative to preceding layer

$
0
0

Hello -

 

Pardon the newbie questions, but I've keyframed 'Black Solid' moving along the x axis and basically would like to duplicate the layer (perhaps with a new color) several times so that each 'new layer' follows the previous layer and offsets itself a certain amount of pixels...say 20px for example.

 

I found a simple expression that I applied to the first dup'd layer and it works fine but I can't figure out where to tell it to offset 20px to the left of the main layer.

 

thisComp.layer("Black Solid 1").transform.position.valueAtTime(time -.1);

 

I suppose I'm trying for a cascading effect + offset.

 

Thanks!

gj

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;

}


Access Properties of a Layer Inside a Precomp

$
0
0

First time visiting these forums but they look like a super helpful place so any response is awesome.

 

I'm trying to save myself some headache by creating one animation ("CircleIcon") and then using it over and over again. I'm accessing a property of the precomp by using the following expression:

 

comp("CircleIcon").layer("Parent_Icon_To_This").transform.opacity

 

Here's what I'm creating: A series of circles that animate on, with a different icon in each circle. I want them all to animate on with the same animation but staggered slightly in time. The "CircleIcon" comp has a null object ("Parent_Icon_To_This") which I am hoping I can animate however I want, and then parent each icon to in the main comp.

 

Only problem with this is that when I parent each icon to a different instance of the "CircleIcon" comp in my main timeline, the icons don't get parented to the timing of the instances of the "CircleIcon" comp, they get parented to the original "CircleIcon" comp timing and then the timings for the fade-ins are simultaneous instead of staggered.

 

Basically, I just need help figuring out the syntax to reference the properties of an instance of a precomp, rather than the precomp itself, that way I can have the timing stagger. I found a snippet of code on these forums that looked close to correct, but it's not working for what I'm trying to do:

 

L = thisComp.layer("CircleIcon_01");

L.toComp(L.content("Parent_Icon_To_This").transform.opacity)

 

the basic structure I think I need is like this:

 

thisComp.layer.layerOfThePrecomp.transform.opacity

 

Any help is greatly appreciated. Or if there's another way to do this, I'm open to suggestions. Thanks in advance!

 

-Jeremy

Change opacity precomp layer expression

$
0
0

Hi,

 

I want to control my precomp layers opacity within my maincomp by changing the layername.

For example: If my layer name(in the maincomp) is "A" only the layer called "A" in the precomp will show.

 

I allready wrote an expression:

 

if (comp("Main Comp").layer("A").name == ('A'))

{temp_opacity = 100};

else

{temp_opacity = 0};

temp_opacity

 

But the problem is, there need to be multiple precomps controlled in the main comp. And if both precomps are called "A" the script fails.

So maybe I need to have a control in the expression that will check which precomp it needs to use. (the sourse.layer.)

 

I'm trying the figgure it out last two weeks without succes, so if anyone can help me I'll be very thankfull!

 

JW

How to create a simple bobbing up and down motion expression?

$
0
0

Hi, I have a 3D object that I want to continuously bob up and down but I'm having trouble finding an expression to do this.

 

I would use wiggle on the Z except wiggle creates random motion and I need consistant up and down oscillations.

 

It seems simple but I can't figure it out... any ideas? Thanks.

 

-Pete

Full auto-orient via expression

$
0
0

Hi!

 

I'd like a 3D Null to get the orientation of 3D a layer. (without parenting, it would be too easy )

 

I've tried a lot of solutions, through orientation, rotations, both combined... some results are close, but never perfect.

 

If I'm right, orientation is computed before rotations...

I think the simplest way would be with auto-orientation, or the lookAt() expression on orientation, wich gives me correct X and Y orientations, and then get an expression on zRotation to get a "full" orientation.

 

But what would it be?

How can I get the Z orientation in layer space?

 

Any idea will be appreciated!

 

François

Noob Question: Move a layer in the opposite direction of a different animated layer

$
0
0

So say that I have an icon that I animate on the Y-axis +40px, but instead of trying to hand key the other layer each time, is there an expression I can write to have the other layer move in the opposite Y direction the same amount of units (ex: -40px)?

 

Thanks!

Viewing all 47983 articles
Browse latest View live


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