ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expressions don't update previews when they are changed

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Christian Simpson
Expressions don't update previews when they are changed
on Sep 22, 2017 at 4:38:53 pm

It doesn't matter what machine I'm on but expressions seem incredibly unreliable in updating when a change has been made. For example I have a checkbox control that is linked to text layers, opacity of other layers, etc. It's connected to few different things. For some reason no matter what machine I work with or whatever expression I use if the expression becomes more complex than the very most basic of expressions After Effects cannot seem to update the preview correctly. I also have tried to go ahead and render out a clip to see if it will snap into place but it also renders out the clip incorrectly just as the preview. I have had this problem for years and it's incredibly frustrating. I know this is not a specific question but is this something others have dealt with and if so have you ever found a solution? And yes I have purged memory but the only thing that seems to help is to restart After Effects which is very annoying.


Return to posts index

Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 4:53:46 pm

The only time I really see anything like that is when there are two or more expressions where each expression is dependent on the results of the others (e.g. trying to simulate radio buttons with checkboxes), creating an unstable dependency loop. I've never run into complexity being an issue.

Dan



Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 6:03:25 pm

Forgive me but I am not familiar with what a radio button is unfortunately. To explain my situation a little better i have null object with 30 or so checkbox controllers. I have several parameters connected to each checkbox controller. I have several layers that have opacity at 100 or 0, and some text layers that have certain source text when checked. I only have one box checked at a time so as to not display multiple results. So if I understand correctly a checkbox controller is not the way to approach a situation like this? Is there any place you recommend that has information on radio buttons? I could not seem to find any info on it pertaining to After Effects.

Thanks


Return to posts index


Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 6:20:10 pm

As long as you don't have checkboxes connected to each other, you should probably be OK.

Radio buttons are a control where only one option can be selected--selecting one turns the others off. Unfortunately, there is no expression control that operates that way, and trying to simulate it with checkboxes will inevitably lead to frustration.

One alternative would be to use a pseudo effect dropdown list to indicate your selection, but that's a whole different learning curve.

Dan



Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 6:31:43 pm

No they are not connected to each other in anyway and I only check one at a time so its really throwing me for a loop. It's doubly odd that restarting After Effects clears up the problem but that's not a very reasonable way to work. Maybe I should look into your alternative method.

Thanks for the help as always.


Return to posts index

Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 6:36:09 pm

I should have mentioned that it doesn't have to be a direct connection between the checkboxes. For example if you have one checkbox controlling the opacity of a layer and another checkbox that references that layer's opacity in its expression, that's a connection. If something that is controlled by the second checkbox affects the expression for the first checkbox, that creates an unstable loop.


Dan



Return to posts index


Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 9:36:30 pm

Ok that's good to know. However I suppose my situation is the inverse of that. I have one check box controller controlling multiple parameters across many different layers. I also wanted to mention that after I quit and restart after effects it always works perfectly. It's only after I've exported and then I try and update it by checking a new checkbox that it begins to fall apart. With the solution being perfectly repeatable every single time that makes me think for some reason after effects isn't updating correctly or there is a cache issue. I suppose the next thing I will try is to create a control layer for every different layer and parameter i want to manipulate. That's getting almost as tedious as just changing it all manually however. Unless there was a way to have a master checkbox control layer that all the other checkbox control layers were linked to.


Return to posts index

Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 22, 2017 at 10:03:18 pm

>It's only after I've exported and then I try and update it by checking a new checkbox that it begins to fall apart.

That's entirely consistent with what I'm talking about. And it's not just with checkboxes. Try this. Create two slider controls. Give each of them an expression that is the value of the other slider + 20. You'll probably get 20 for the first one and 40 for the second. Now turn both expressions off and then turn on the second expression first and the first expression second. Now you'll get 40 for the first one and 20 for the second one. The conditions are exactly the same, but the results are different depending on the order that the expressions evaluate because they're dependent on each other. That's an unstable result.

With the symptoms you've described, I'd be surprised if there isn't a sneaky feedback path in there somewhere that is expression-evaluation-order dependent.

Dan



Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 23, 2017 at 12:52:40 am

If that's the case do you recommend simply creating multiple control layers so that every parameter I have to change has its own control layer?

Thanks for all your help


Return to posts index


Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 23, 2017 at 12:59:46 am

The key is to make sure that no expression has, as an input, any value whose calculation includes (however indirect) the output of that same expression.

To make any specific recommendation, I think I'd have to see how you have it set up now.

Dan



Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 26, 2017 at 8:15:48 pm

Hey Dan I attempted to lay out in more detail how I have set everything up in this word doc. I appreciate any time you could devote to taking a peek at my setup. I suppose I could have written this all out in a forum post but that may have been too much. Thank you again for all your help.

11714_expressionbreakdown.docx.zip


Return to posts index

Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 26, 2017 at 8:53:33 pm

I don't see anything in there that would cause the behavior you're describing, so I'm baffled. I guess I'd recommend you replace all the checkboxes with a pseudo effect dropdown list and use a switch() statement instead of those cascading if/else constructs.

One small thing (I'm sure it doesn't have any bearing on your problem) is that where you specify the colors like this:

([0,83,154,1]/255)

I'd do it like this:

[0,83,154,255]/255


Dan



Return to posts index


Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 26, 2017 at 10:30:49 pm

Hey Dan thanks a lot for taking a look. May I ask what is a switch() statement on how would that apply in this case or what would be an example of it pertaining to my situation?


Return to posts index

Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 26, 2017 at 11:13:01 pm

Simple example (with 3 teams):


ctrl = // link to your dropdown control
switch(ctrl){
case 1:
str = "Falcons";
break;
case 2:
str = "Zips";
break;
case 3:
str = "Crimson Tide"
break;
default: // just in case
str = "xxxx";
break;
}
str



Dan



Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 27, 2017 at 12:14:58 am

I ended up using the code below to control my source text with a popup in a psuedo effect and it seems to work. However I am not familiar with all the different things I can modify and the correct way to type them out. For example how would I use this method but change the color value? I am also curious what is being modified in your example? Or what layer and property is your example meant to be applied to? Also how would I apply this to specific team logos being shown? Would it simply be a matter of affecting the opacity layer or is there a better way?

var num = comp("!Scores-Lower-Third").layer("Null 1").effect("Home Team")
("Home Team").value;
var theText = "";
switch(num) {
case 1:
theText = "Air Force";
break;
case 2:
theText = "Akron";
break;
case 3:
theText = "Alabama"
break;
default:
theText = "Team Name"
}
theText


Return to posts index


Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 27, 2017 at 1:34:20 am

So I got my pseudo effect installed with a popup but for only 3 teams to test it out first. For this test I only had 2 text layers and the color property of a solid layer that were going to be linked to the pseudo effect popup. And much to my extreme frustration and cursing the same exact behavior occurred again. It works perfectly until I render it out but after the render it doesn't update correctly based on my selection in the pop-up. Upon preview it randomly flashes the entire set of options contained in the pop-up. I am completely stumped. I suppose this is simply a bug?


Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 27, 2017 at 2:11:09 am

Here is the project file if you'd like to take a look at it. When you first open it up just go to the effects controls for the null and select an option from the pop-up. Render this out and then after the render try and select a new option. Doesn't work every time. This is a real head scratcher.

11716_testproject.zip


Return to posts index

Dan Ebberts
Re: Expressions don't update previews when they are changed
on Sep 27, 2017 at 4:36:42 am

That's very strange. It certainly looks like a bug to me.

Dan



Return to posts index

Christian Simpson
Re: Expressions don't update previews when they are changed
on Sep 27, 2017 at 1:48:58 pm

It must be a bug. However a friend of mine suggested I export via media encoder and not after effects itself and amazingly everything works just fine. My guess is whatever process that re-reads the expressions after a render is where the corruption happens but I guess by taking it directly to media encoder it bypasses that problem. I was able to get stable results several times in a row so I guess for now the workaround is simply exporting from media encoder.
Thanks for all your time and effort in helping Dan, you're doing lots of good out here!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]