ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

No loops but I get timeout while waiting for the engine

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jerry Witt
No loops but I get timeout while waiting for the engine
on Jun 18, 2012 at 6:59:39 pm

I have, what I think is, fairly simple expression code attached to a light in my comp. It is designed to drive the intensity of a light based on the muzzle flashes of a layer.

multiplier = 800;
driverLayer = thisComp.layer("HDfootage.mov 2");
samplePoint = [400,700];
sampleSize = [780,720];
lightnessSample = driverLayer.sampleImage(samplePoint,sampleSize);
driverLightness = rgbToHsl(lightnessSample)[2];
thisComp.layer("Light 2").Intensity = driverLightness * multiplier;


When I step through my footage I see the intensity of the light is changing based on the flashes (20% to !40%). However, every time I render this comp I get an error " timeout while waiting for the engine"

Why? I have no loops. I cannot see where I am going wrong.



Return to posts index

Darby Edelen
Re: No loops but I get timeout while waiting for the engine
on Jun 18, 2012 at 8:29:04 pm

Your sample size for the sampleImage() function is pretty large. That may have something to do with it. Also the first part of the last line of your expression is bad practice, instead I'd recommend just using:

driverLightness * multiplier;

Try baking the expression before rendering and see if that helps. Select the light's intensity and go to Animation > Keyframe Assistant > Convert Expression to Keyframes. It may take a while to calculate the frames with the sample size you've chosen, but be patient and you should get a good result. This will also allow you to use Render Multiple Frames Simultaneously, which is usually disabled when using the sampleImage() function.

If you're still experiencing an error with the baked expression then the problem lies elsewhere.

Darby Edelen


Return to posts index

Jerry Witt
Re: No loops but I get timeout while waiting for the engine
on Jun 18, 2012 at 9:43:13 pm

Thanks for the reply Darby. Those were all great ideas. It made me realize that I was also sampling off the edge of the image. (Maybe that makes a difference?) So I implemented the changes you recommended and came up with this:

multiplier = 800;
driverLayer = thisComp.layer("HDsource.mov 2");
samplePoint = [500,900];
sampleSize = [400,400];
lightnessSample = driverLayer.sampleImage(samplePoint,sampleSize);
driverLightness = rgbToHsl(lightnessSample)[2];
driverLightness * multiplier;


When I went to bake the expression it processed for about 20 seconds and threw the same error. I then lowered this:
sampleSize = [200,200];

I moved to a few frames and saw that it was giving me something close to the results I wanted. When I jumped to the 5th frame I got the same error: "Timeout while waiting for the engine. Expression disabled"

There is nothing tricky about this comp. No time remaping, obviously no looping. After Effects has 1.8 gigabytes and I'm ordering more ram, but I doubt it's a memory issue.

Is there a way to trace the expression output in real time?



Return to posts index


Dave LaRonde
Re: No loops but I get timeout while waiting for the engine
on Jun 18, 2012 at 11:00:05 pm

[Jerry Witt] "After Effects has 1.8 gigabytes and I'm ordering more ram, but I doubt it's a memory issue."

Um, no, it could very well be a memory issue. It's pretty much standard practice to assign 2-4 gigs PER CORE to AE, plus more memory for the operating system, any applications you like open at the same time, etc. If you're trying to use multiprocessing with only 1.8 gigs, you'll have problems.

You'll also have problems if you try to accelerate rendering with Open GL. It's never worked as advertised, so turn it off & leave it off.

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Darby Edelen
Re: No loops but I get timeout while waiting for the engine
on Jun 18, 2012 at 11:26:08 pm

Do you get the same error on frames after the 5th frame? Have any layers changed on the 5th frame?

Darby Edelen


Return to posts index

Jerry Witt
Re: No loops but I get timeout while waiting for the engine
on Jun 19, 2012 at 12:09:22 am

Hi, I guess I should have been clearer. I was just clicking around at random points in the timeline. I am not adding or subtracting any elements in this section where the light plays.

I have gone in and manually animated what I wanted. However, I can see the power of expressions and am still interested to solve this if it is possible, even if it is just an academic exercise at this point.



Return to posts index

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