FORUMS: list search recent posts

Make properties of video footage affect other layers

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
wilhelm Hagberg
Make properties of video footage affect other layers
on Sep 29, 2016 at 11:22:21 am

I wonder if it's possible to make properties of video footage affect other layers.

Say that you have filmed a character against green screen with flickering light in his face to suggest that he is watching TV. You rotoscope the guy into footage of a room and now you want the same flickering in that room.
Is it possible to "analyse" the brightness of the footage with the character and make it control a "brightness/contrast" effect or similar on the layer with the room?

Best-

Wilhelm



Return to posts index

Fredrik Åkerlund
Re: Make properties of video footage affect other layers
on Sep 29, 2016 at 4:42:17 pm

Interesting. I have no idea if this works but here's a spontaneous idea:

Bring up an exposure plugin and open up an expression
ConvertRBGtoHSL in the flickering image, so you get the light value.
sampleImage() a part of the layer with flicker yiu see clearly.

now you should have a value that says something about the lightness. Convert this value to something in the range of whats workable with the exposure.
Return the new value and you might have a flicker that corresponds with your green screen footage..

Like I said, I have no idea if this works but it would be interesting if it did. You should try. I know I will, if I have the time. :)


Return to posts index

Fredrik Åkerlund
Re: Make properties of video footage affect other layers
on Sep 29, 2016 at 5:33:11 pm
Last Edited By Fredrik Åkerlund on Sep 29, 2016 at 5:34:10 pm

So now I am home from the supermarket so I tried this. I made a test with a scrolling black and white gradiant ramp and a photo and it seems to work. Try this:


On the layer you are using to create the fake flicker, bring up the Exposure plugin.
Alt click on the stopwatch so you can write an expression.
Paste this expression:

sample = thisComp.layer("yourGreenScreenLayer").sampleImage([10,10]);
hsl = rgbToHsl(sample);
value = hsl[2] *10;


change "yourGreenScreenLayer" to your layer.
change the sampleImage point to some pixel that works in your footage.
adujst "hsl[2] * 10" to something that works for you.

What this does is that it samples one pixel at the coordinates 10, 10. "sample" gets an rgbArray and I don´t want that. So I convert it to HSL (hue, saturation and lightness). Lastly, I return the lightness value (that is, hsl[2]) and the exposure plugin reacts to the point I sampled. hsl[2] is apparently a value between 0-1 so I multiplied it with 10 just so I could see the effect clearly.

Let me know if it works for you. This is of course a proof of concept, so you may want to tweak it. Probably a lot. But it´s hopefully a start. :)


Return to posts index


wilhelm Hagberg
Re: Make properties of video footage affect other layers
on Sep 29, 2016 at 9:29:36 pm

Thanks a lot! Great idea, I will try it out when I'm back at work Monday. I see many other possibilities with this approach - why not let one layers darkness properties affect particles on another layer. Or make a sound layer affect color of another layer and so on. Unfortunately I'm not that great with scripting! :-)

Best-
Wilhelm



Return to posts index

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