355 posts
  • Helped protect Envato Market against copyright violations
  • Sells items exclusively on Envato Market
  • Has been a beta tester for an Envato feature
  • Has sold $10,000+ on Envato Market
+5 more
mothinkers says

Or if just the wiggle bit should be integers…

w = wiggle(10,10)-value;
w = [w[0].toFixed(), w[1].toFixed()];
w + value;

Thanks felt_tips! Didn’t get to understand this one but i will try! :)

808 posts
  • Has sold $10,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Has referred 1+ members
+3 more
GrizzleFX says

I have a question!

How do you disable a camera with expressions?

2 posts
  • Has been part of the Envato Community for over 1 year
blubbmade says

Hey, i want to animate an effect from middle left to middle right of a textlayer. My Problem is: the position and all effects etc of this animation have to be dynamicly linked to one single layer. Ive found an expression which is able to find the borders of the textlayer with the sampleimage function but it is way too slow to run every frame because i use many layers with this code. (http://www.aenhancers.com/viewtopic.php?f=6&t=931) The Layer itself doesnt move, so i thought i could run the code once if the layer appears. but it doesnt seem possible to save any variables during the expression execution. Ive tried many different methods to solve this problem. I even tried to put the expression into a slider and read the result with another expression. I am simply not able to find a possibility to save values over time from an expression.

my goal is to run:

[linear(time,thisLayer.startTime,(thisLayer.startTime + framesToTime(20,fps = 1.0 / thisComp.frameDuration)),left-120,right+120),((bottom-top)/2)+top]

or something like that while i only have to scan for the coordinates once. as you can see it animates a centerpoint of an effect horizontally across the layer.

If there is a completely other way to do that i would be glad if someone would give me a tip. btw it has to be an expression, not a script because i want to use it as animationpreset with another script. I would simply edit the script i want to use but it and it is jsbin compiled and there is no way to get to the sourcecode .

Greetings BluBb_mADe

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips Moderator says

Setting Camera to the Default Camera’s Position


I have a question! How do you disable a camera with expressions?

You can’t disable a camera with expressions, but you could set it to the position of the default camera (i.e. where Ae looks at the scene from if there is no camera present).

On position:
C=thisComp;
if(thisComp.layer("Controller").effect("Disable Camera")("Checkbox").value) {
   [C.width/2,C.height/2, -C.width/2*(50/18)];
} else {
    value;
}
On zoom:
C=thisComp;
if(thisComp.layer("Controller").effect("Disable Camera")("Checkbox").value) {
   C.width/2*(50/18);
} else {
    value;
}
5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips Moderator says

Hey, i want to animate an effect from middle left to middle right of a textlayer. My Problem is: the position and all effects etc of this animation have to be dynamicly linked to one single layer. Ive found an expression which is able to find the borders of the textlayer with the sampleimage function but it is way too slow to run every frame because i use many layers with this code. (http://www.aenhancers.com/viewtopic.php?f=6&t=931) The Layer itself doesnt move, so i thought i could run the code once if the layer appears. but it doesnt seem possible to save any variables during the expression execution. Ive tried many different methods to solve this problem. I even tried to put the expression into a slider and read the result with another expression. I am simply not able to find a possibility to save values over time from an expression.

my goal is to run:

[linear(time,thisLayer.startTime,(thisLayer.startTime + framesToTime(20,fps = 1.0 / thisComp.frameDuration)),left-120,right+120),((bottom-top)/2)+top]

or something like that while i only have to scan for the coordinates once. as you can see it animates a centerpoint of an effect horizontally across the layer.

If there is a completely other way to do that i would be glad if someone would give me a tip. btw it has to be an expression, not a script because i want to use it as animationpreset with another script. I would simply edit the script i want to use but it and it is jsbin compiled and there is no way to get to the sourcecode .

Greetings BluBb_mADe

You can’t do it, I’m afraid. Text and shapes have no source, so no measurable width or height. No variables persist from frame to frame in After Effects.

Scripts can do it no problem (and without having to do complicated stuff like sample pixels from the layer). If you’re able to write a script, I’d consider writing a simple script to do it and putting it in with your project.

The only workaround I can think of for expressions is to put the expression in place (and yes, the calculations will send the render and preview time through the roof). But then get your users to adjust the text, then bake an expression that works out the bounding box of the layer, and bake it on just one frame. (Set the work area to one frame, then use Keyframe Assistant -> Convert Expressions to Keyframes). That calculates the size of the text, turns it into a keyframe that your other expressions can then use.

2 posts
  • Has been part of the Envato Community for over 1 year
blubbmade says

I have to be able to save the whole process into an animationpreset. Nothing else will work, i guess. Because of the goal to use it with the script. My goal is to import an Karaoke timing from an .ass file into ae. The script i want to use applys an animationpreset to every syllable of the karaoke and scales the animation time right. Is there any possibility to script this discharge in a ffx preset file or something like that? The expression needs per layer and per frame ca 2 sec. to run. I have 1 layer for every syllable. Do i have to say anything else? T-T aftereffects “prerenders” the behavior of the expressions for the whole comp after every change i do, so ae is going to be completely inuseable. Maybe i have to to it like you told me with the expressiontokeyframes. Ive already found this function, but as you know this would give me only static animations for every layer. I hoped it would be possible to use keyframes to save data over time. if it could be possible to transport information only 1 frame forward everything would be ok – . - But now you have completely destroyed my illusion :crying: I have to deal with it :( Thanks nevertheless for your help.

Greetings

BluBb_mADe

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips Moderator says

I have to be able to save the whole process into an animationpreset. Nothing else will work, i guess. Because of the goal to use it with the script. My goal is to import an Karaoke timing from an .ass file into ae. The script i want to use applys an animationpreset to every syllable of the karaoke and scales the animation time right. Is there any possibility to script this discharge in a ffx preset file or something like that? The expression needs per layer and per frame ca 2 sec. to run. I have 1 layer for every syllable. Do i have to say anything else? T-T aftereffects “prerenders” the behavior of the expressions for the whole comp after every change i do, so ae is going to be completely inuseable. Maybe i have to to it like you told me with the expressiontokeyframes. Ive already found this function, but as you know this would give me only static animations for every layer. I hoped it would be possible to use keyframes to save data over time. if it could be possible to transport information only 1 frame forward everything would be ok – . - But now you have completely destroyed my illusion :crying: I have to deal with it :( Thanks nevertheless for your help.

Greetings

BluBb_mADe

I suspect you’re coming from a background of having programmed Javascript or Actionscript etc., and in coming to Ae where expression data does not persist from frame to frame, are finding it rather frustrating.

But there’s a very good reason for it. All frames in After Effects remain independent. The same frame always looks the same, regardless of where you start or stop the animation. Ae is not a dynamic, coded animation program. It’s a keyframed animation program that provides dynamic links between other layers on that frame. It was never anything else.

I think you need to accept the program as it is, get into that mindset and look at the challenge you have afresh. I suspect that scripting is the way that you should go. After Effects provides plenty of tools for you to use:

The interface – presets – expressions – scripting – the SDK …. take your pick. :-)

414 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Contributed a free file of the month
+3 more
nemanja_reMAKE says

Is there any expression that can animate particular to move from one null object to other. I got exported camera and 2 dummy objects as null objects for the city. Now I have to animate particular to fly from one city to other. So is there any expression to do that cause manually is impossible to do that

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips Moderator says

Is there any expression that can animate particular to move from one null object to other. I got exported camera and 2 dummy objects as null objects for the city. Now I have to animate particular to fly from one city to other. So is there any expression to do that cause manually is impossible to do that

You generally attach Particular’s emitter to a null. If you’re talking about moving a null between two other nulls, then sure – it’s easy.

If you’re talking about moving the entire Particular effect, it gets difficult, because you don’t have control of the particles once they’ve been emitted. You’d need to position the entire world. There are many ways to do it.

But your first task is to frame the problem better. What you describe above is vague, whereas expressions are very technical and specific. I’d need to understand exactly what you want to achieve before I can even begin to think of an answer.

414 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Contributed a free file of the month
+3 more
nemanja_reMAKE says

Ok situation is next. I asked for help yesterday. I need to create flying stroke from one city to other ( just one of the shots: http://www.youtube.com/watch?v=6QYh6PkSArI&feature=youtu.be ) At the first only thing I got from client was that footage, but now I have exported camera data from 3D program where that animation is created to AE as a script. Now I have footage and camera data ( also I can get script with camera data + 2 null objects with positions of those two cities ), but still don’t manage to create that flying stroke to fly from one city to other. When I create light emitter particular is acting strange and position of particular after animating and setting point A and point B is….well don’t know how to explain. I will try with these pictures…. pay attention at the first keyframe https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-prn1/20930_10151539689958516_83089373_n.jpg and https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-prn1/886658_10151539690038516_1352939579_o.jpg. You see at the first picture it is positioned where it has to be, but maybe 15 frames later it stay’s on the same position and it looks bad…not natural movement at all and when I move it it moves also at the beginning where it was good before moving and that’s logical because it’s the same keyframe. Question is how to get that particles to fly natural, to lock first and last keyframe to the point A and B ( city 1 and 2 ) to act like part of the scene if I already got that camera data…can I use those two null objects ( cities ) and write some expression on particular to fly from one null to other. Hope I was not that confusing and that you understand now what’s the problem :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by