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

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.


opacity of an image 0 or 100 tied to voice volume keyframes?

$
0
0

This is probably going to be stupidly easy, but I'm relatively new to AE, and I'm stumped.

 

So what I'm trying to do is make a little speaker symbol (similar to what you see in your taskbar) that reacts to audio.
For the quieter stuff, only one bar becomes visible, and for the louder/max stuff two/all three become visible.

 

And I mostly have it. But the different bars have a range of opacity. I just want them on/off within that range.

 

For example, the opacity of this .png is pick-whipped to a slider on the audio track. The slider has this expression on it: linear(value,2.6,4.9,0,100)

 

Works pretty good, but the opacity needs to be an on/off kind of thing, and not a 0-100% kind of thing.

 

Here's a screenshot:

Imgur: The most awesome images on the Internet

 

I've been trying to learn some if/then expressions, some checkbox stuff, and some 0 else 100 stuff... but correctly implementing any of them for this specific task has, so far, been unsuccessful.

 

Thank you for your help.

 

Message was edited by: derick white, typos

offset corner pin with different x y offset values

$
0
0

Hello!

 

Suppose you have a keyframed corner pin effect. Is there a way to extend a pin point (example: top left corner point) with different offset values for X and Y using expressions?

I tried everything, but I can't get it to work: the extended point doesn't stick with the right proportion over the animation.

This expression is one of the many i applied without any success. It works only if offset X and Y values are equal (ex.

Any suggestion? Thanks.

 

 

// CALCULATE CENTER COORDINATES

TL = effect("Pin")(1);

TR = effect("Pin")(2);

DL= effect("Pin")(3);

DR = effect("Pin")(4);

var vertices_x = [];

var vertices_y = [];

var min_x = Math.min(TL[0],TR[0],DL[0],DR[0]);

var max_x = Math.max(TL[0],TR[0],DL[0],DR[0]);

var min_y = Math.min(TL[1],TR[1],DL[1],DR[1]);

var max_y = Math.max(TL[1],TR[1],DL[1],DR[1]);

var mid_x = (min_x + max_x) / 2;

var mid_y = (min_y + max_y) / 2;

center = [mid_x,mid_y];

 

// OFFSET

offset = [20,50];

 

// TOP LEFT VECTOR

vector = normalize(TL - center);

 

// CALCULATE NEW TOP LEFT

x = TL[0] + * vector[0] * offset[0];

y = TL[1] + * vector[1] * offset[1];

[x,y]

expression problem with CC 17

$
0
0

Hi guys,

I found an error in After effect expression. Actually I built a project using some expressions and I surprised that the project is not working with AE CC 2017 and 2015 but it's work fine with AE CC 2014 for same project.

Any idea about this issue or shall I report that to Adobe?

 

Here the project built in CC14. and you can check with two versions.

Loop Out Stop expression

$
0
0

I was wondering if it's possible to create a stop/smooth ending to a LoopOut expression on Rotation and Position keyframes.   I am currently using OSX 10.9.3 After Effects CS6 and I have tried a couple of things that haven't worked for me.

 

adding a checkbox expression control to the layer and an expression for loopOut()

 

if (effect("Checkbox Control")("Checkbox")==true){

loopOut();

}else{

value;

}

 

 

loopOutDuration(“cycle”,2)

 

Unfortunately neither of these seems to work.  I was wondering if someone had a solution they have come across.

 

Thanks very much

 

Ira

After Effects Universal Expressions

$
0
0

1. What are universal expressions?

  • I want examples of applications of universal expressions and how to identify non-universal expressions.


  • When my project use non-universal expressions, I can use a plugin called "ExpressionUniversalizer 2" to support all languages.

2. But there's another way to get the result of transforming the non-universal expressions in universal without use the plugin?

 

Please provide me all possible details.

 

I need to create a template that uses expressions and need that the template supports all languages.

 

Thanks!

clamp a wiggle expression

$
0
0

How do I go about clamping a wiggle expression?

 

I am using the mosaic effect with a wiggle expression on it. The only thing is that I never want the number to become 1, only 2 or higher as with 1 the mosaic effect make vertical lines that I don't want.

 

Cheers

Disable expression error popup (AE)?

$
0
0

Hello,

 

It is possible to disable the error popup when editing expressions in After Effects?

I regularly want or need to click outside the expression typing box. When there is an error in the expression an error message pops up. It is getting annoying to click that away before I can continue.

Most of the time I know the expression is not correct, I'm just not finished yet. The yellow warning triangle is clear enough for me.

 

TIA


Expression on checkbox to control opacity of other layers

$
0
0

I'm making a template with multiple color schemes, and I'd like to work backwards a little:

 

Typically when I make a template, I'll have a pre-comp with multiple background layers in it and I'll use a Null in my main comp with an appropriate amount of Expression Control checkboxes to control the respective BG layers' opacities – pretty normal stuff.

 

The downside is that if I want to reuse this background layer in different comps I have to duplicate it and change the expression to match the location of the null each time it moves.

 

I'd like to work backwards (if possible) and instead apply an expression to the checkbox itself that references a single BG precomp. This way I can copy the null to my 20 different template comps, while the expressions always reference a single pre-comp, thus enabling me to simply copy the null from one comp to another without ever having to change the expressions.

 

Is that possible?

Can I write an expression to get a value from the comp you're looking at, rather than from one particular comp?

$
0
0

I know I can point an expression to a particular layer in a particular comp to get a value, eg. comp("OpeningTitle01").layer("TITLENAME").text.sourceText will get the value from the layer TITLENAME in the comp OpeningTitle01, but I want to make multiple comps (so I can add them all to the render queue at once) where each will change the value of the underlying comp.  Can this be done?  The comp where I will use the expression is nested about 5 levels below the top level, and I want to put the value in a layer in each of the new comps.  Any help is appreciated- thanks guys!

Integers and decimals / Slider Control

$
0
0

I am trying to count up from 00.0 to 27.3, using where each number is made up of 2 digits and 1 decimal place - so for the single digit numbers, there will still be a 0 ahead of it (ex: 3 would be listed at 03.0 when counting up). I found the expression to keep 1 decimal point at all time, even for integers:

 

effect("Slider Control")("Slider").value.toFixed(1);

 

But can't figure out how to have the single digit numbers have a zero in front of them. Does anyone know how to do this?

Parent to layer but offset time (expression wanted). Thanks!

$
0
0

Hi,

 

I've looked around online for this but can't find anything that seems to work!

 

So, I have several layers scaling up from zero. I want them all to do this one after the other, and I want to do it by parenting each layer to a single null so that I can modify the speed to all of them at once if I want to change it later on. But if I parent all the layers to the null, then they all scale up at the same time. I want to offset each layer from the one before it by about half a second.

 

Does anyone know an expression for this?

Thanks in advance.

 

-- Tim

Enhanced Editable Text within Premiere

$
0
0

Hello AE Community

 

After years of requesting enhancements to the Editable Text in Premiere via the comp settings/advanced 'Template' checkbox, and not getting any interest from either the AE user community or PREM, I have finally been inspired by Jarle's post to build what I need using expressions and text parsing.

He uses text parsing to extract number values that can be entered within Premiere to drive AE functions.

 

In spite of years of fiddling, I'm an utter novice with AE scripting.

 

I work at a facility that uses CC, with 5 Premiere based edit suites, and AE for creating most of our Graphics packaging- which I principly create.

A common Packaging element is our Lower Third / Name Key.

These need to be quick and easy for video editors, who are not necessarily AE users to use, all day every day.

 

What is needed to make the Template option a viable 'workhorse' tool:

 

User control of text size, and tracking values, within Premiere- to accommodate variability in text length. This must be user controlled, not automated.

 

I have been able to figure out the tracking value linking to layer source text, using a script found here [by the amazing Dan Ebberts]:

txt = thisComp.layer("Name_TRACKING").text.sourceText
parseInt(txt)

 

But I'm unable to sort out the 2 dimensional values for XY scaling of the on screen text, as I don't understand how to build an array from 1 a dimensional value.

 

Screen Shot 2016-07-05 at 11.54.47 AM.png

Here is a stripped down AE project that the above screen capture is taken from

AE_Template Text test.aep - Google Drive

 

 

It's a simple trick, but I cannot get it figured out [ been trying all morning].

 

Pls forgive me if I'm double posting, and someone else had established a thread on this- I spent quite a while trying to hunt it down if they did..

 

Many thanks to anyone who can assist.

 

This is just the beginning of an expanded toolset that will aid editors and the Graphics teams who facilitate them, and I intend to get it working well and share broadly.

 

Cheers!

David

substring() not a function?

$
0
0

Hi!

 

trying to do the simple task of separating 6 characters (numbers) and adding a space after the first 3.


My script reads:

 

 

siffror = parseFloat(Math.round(thisComp.layer("Räknare Slider").effect("Slider Control")("Slider")));

s1 = siffror.substring(0, 3);

s2 = siffror.substring(3, 6);

"Co2 saved: " + s1 + " " + s2 + " ton";

 

it says siffror.substring is not a function.

 

What am I doing wrong here?

haw use 2 code loop and code motion2 ?

$
0
0

hello
help me

haw use 2 code loop and code motion2

example

motion 2 script

try {

 

  amp = effect("Rotation - Overshoot")("ADBE Slider Control-0001") / 2.5, freq = effect("Rotation - Bounce")("ADBE Slider Control-0001") / 20, decay = effect("Rotation - Friction")("ADBE Slider Control-0001") / 20, n = 0, 0 < numKeys && (n = nearestKey(time)

            .index, key(n)

            .time > time && n--), t = 0 === n ? 0 : time - key(n)

        .time, 0 < n ? (v = velocityAtTime(key(n)

            .time - thisComp.frameDuration / 10), value + v / 100 * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t)) : value;

 

 

} catch (e$$4) {

    value = value;

}

 

and use loop code

loopOut(type = "cycle", numKeyframes = 0)


attach positional data to 4 corners of a shape with rotation

$
0
0

So here is my dilemma. I need to attach positional data to 4 corners of a box that I can then animate and rotate.

 

I've tried pre-comping, parenting null objects with offset, using corner pin, and CC Power Pin. All to no avail. Currently this is the expression I am using:

 

L = thisComp.layer("Rectangle");

offset = [50,50];

r = L.sourceRectAtTime(time,false)

L.toComp([r.left,r.top]) + offset

 

The main problem is the rotation. I have this expression on all 4 of the different positions, with slightly different offsets to put them on the 4 corners. But when I rotate the box, the points stay in the same place. Because their offset is based of the rectangle source anchor which doesn't translate rotation.

 

The goal is to create ripples under the wheels of a car in a top down view. I'm using wave world to create the ripples and each ripple source has a position data point that I need to tie to each car wheel corner, or in this case, a box that I can animate and "drive" around.

 

Thank you for any assistance you may provide.

 

- Ryan

Multiple checkbox related to each other with expressions Enquiry

$
0
0

Hello Guys,

Basically I need to do three colour options only one of them must be selected at a time so for example if I select Red colour then the other two options (Blue & Green) will be deselected automatically.

I've been trying quite hard to get this to work but I can't seems to figure it out alone.
Here's what I did.  3 checkbox controls, all in one layer (R, B, G) to control three colour or anything. And the rule for that is "if R checked in the box then the others un-checked at a time and vice versa".

The idea is a three way checkbox selection which coordinates with each other in the following way:

  • checkbox 1 - if ( (B ==1) || (G == 1)) false; else true;
  • checkbox 2 - if ( (R ==1) || (G == 1)) false; else true;
  • checkbox 3 - if ( (R ==1) || (B == 1)) false; else true;

It's seems like all work fine but when I checked the boxes nothing would change on the effected layer that I linked it with all checkboxes.
If you managed to understand what I'm trying to do, I'd love to hear your thoughts about this and what I am doing wrong.



I use this expression for each checkbox
R checkbox:

R = effect("R")("Checkbox"); T = effect("B")("Checkbox"); C = effect("G")("Checkbox");  if ((T == 1) || (C == 1)) {false} else  true;

B checkbox:

R = effect("R")("Checkbox"); T = effect("B")("Checkbox"); C = effect("G")("Checkbox");  if ((R == 1) || (C == 1)) {false} elsetrue;

G checkbox:

R = effect("R")("Checkbox"); T = effect("B")("Checkbox"); C = effect("G")("Checkbox");  if ((T == 1) || (R == 1)) {false} elsetrue;

The effected layer I did this rule:
Red = thisComp.layer("Red").effect("Fill")("Color"); Blue = thisComp.layer("blue").effect("Fill")("Color"); Green = thisComp.layer("Green").effect("Fill")("Color");  R = thisComp.layer("Controler").effect("R")("Checkbox"); B = thisComp.layer("Controler").effect("B")("Checkbox"); G = thisComp.layer("Controler").effect("G")("Checkbox");  if (R==1)  Red; else if (B==1) Blue; else if (G==1) Green; else value;

 

The project file in this link Project checkbox test


 

Expression to constantly change color of a spectrum

$
0
0

Hi,

I'm running a music channel where I upload music regularly, and I need an expression for the color effects on my audio spectrum layer (Inside Color/Outside color)

Basically, I need a way to keep this spectrum constantly changing in a rainbow form, if not I can put in my own colors if needed, if you don't understand what I mean look at the spectrum at the back of the black spectrum, I need an expression that can do that.

Bag Raiders - Shooting Stars (Onderkoffer Remix) - YouTube

Thanks In advance! Also it would be great if it smoothly blended into each color

 

Text Box for selected words

$
0
0

Hi everybody;
I'm trying to create a dynamic link template and I stuck on this problem. Basically I need to create text boxes for selected words.
Screen Shot 2017-07-14 at 8.58.13 PM.png
I'm using sourceRectAtTime expression plus range selector (word mode) to create text box for selected word. Text layers will be single line and left aligned.All I need to do is, finding right expression for the position line.
For example; if I want to highlight first word, it works well; as you can see, I've added scale animator and got rid of normal text. Only highlighted text stays, so text box gets scale from this layer.

Screen Shot 2017-07-14 at 9.11.01 PM.png
But if I select second word from range selector, it gets the scale of second word but I need to add correct expression to position to fit textbox to the second word.Screen Shot 2017-07-14 at 8.57.10 PM.png
Ps.Sorry for my poor English, thanks in advance.

Expression to change text in precomposed comp from main timeline

$
0
0

If I have a pre-composed animated comp for some lower thirds, is it possible to set it in a way that the text inside it can be changed from the main timeline?

 

I would like to be able to place the the lower thirds comp on the timeline, then change an expression on it for the string used for source text, without having to modify the precomp's contents.

 

Will need to use the precomp multiple times, so I would like to avoid having to duplicate it each time I need to change the text in it.

Viewing all 47983 articles
Browse latest View live


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