Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
oBe
Topic Author
Posts: 4
Joined: Wed Dec 05, 2007 8:07 am

Help using Random

Wed Dec 05, 2007 9:55 am

Greetings noble enhancers,


I'm a bit of a self-educated After Effects fanatic and only recently discovered the lovelyness that is "expressions". I'm usually a bit afraid of all things code, but expressions are just amazing. I still have a long way to go though, because I mostly just wiggle a lot.

Now, I'd like to create an effect, and I would like some help, as I can't get it to work like it should.

I have a 3D scene, a landscape with mountains and trees, and I'd like to have it flash in pure black and white, like a Sin City style lightning.

So I set up an animation preset:
1) Saturation:0
2) Contrast: 100

3) And I guess I need a Invert with a random expression, setting the blending with original being either 0 or 100, but I'm not to sure how to set up that to begin with.

x=random(1,100)
x<1>99

just gives me x<1
I do this because I want the parts that become black, alternating with white and vice versa. So, when the landscape and trees flash black, the sky flashes white.

And then I suppose I'd to make all these happen at the same time, but at random points in my timeline, and though it sounds easy, I'm not too sure if it's even possible.

Any thoughts?
 
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: Thu Jun 17, 2004 9:27 am
Location: New York City, NY
Contact:

Fri Dec 07, 2007 3:27 pm

you want your image to invert randomly?

here's an example of randomly animating opacity to make a flicker, maybe you can get some clues from there:

http://aenhancers.com/viewtopic.php?t=93

-Lloyd
 
oBe
Topic Author
Posts: 4
Joined: Wed Dec 05, 2007 8:07 am

Sat Dec 08, 2007 8:30 am

Ah, someone cares, excellent!

This is at least half of what I needed, perhaps I more.

I thank you.
 
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: Thu Jun 17, 2004 9:27 am
Location: New York City, NY
Contact:

Sat Dec 08, 2007 9:23 am

I am no completely clear from your example what you are trying to do so if you explain it a bit more I might be able to help you out some more.

-Lloyd
 
oBe
Topic Author
Posts: 4
Joined: Wed Dec 05, 2007 8:07 am

Sat Dec 08, 2007 10:03 am

Ah great.

Now, your expression does what I want perfectly. Except now, I'd like to have the entire animation preset (saturation, contrast, invert with wiggle) to flicker on and off.

My best guess for now would be to place a duplicate over my original comp, a duplicate with the invertexpression, and wiggling that opacity, but I'm thinking it could be more simpler. Any ideas?

Also, my compliments on your website. The BG renderer is now my new favourite thing.
 
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: Thu Jun 17, 2004 9:27 am
Location: New York City, NY
Contact:

Sat Dec 08, 2007 10:50 am

One idea would be to put the animation preset on an adjustment layer and flicker the opacity of the adjustment layer. Would that achieve the effect you are going for?

-Lloyd
 
oBe
Topic Author
Posts: 4
Joined: Wed Dec 05, 2007 8:07 am

Sat Dec 08, 2007 11:03 am

Not really, as the original comp is precomposed a couple of times, and the flickering one is within it. Not sure of all this makes much sense. But I'll just try the duplicating thing for now.

Also, BG renderer performs better then the "real" one.

Thanks a lot man.

EDIT:
I used a an adjustmentlayer, rendered it out, made it invisible, and overlayed the video over the endresult.

Mission succesfull.

Who is online

Users browsing this forum: No registered users and 3 guests