Using one video to to mask out another video

edited December 2014 in How To...

I want to create a flashlight effect using an actual flashlight. I'm trying to use the brightness values of a webcam feed to create a mask that cuts out parts of another video. For exampe, the white pixels should cut out everything of the other video, and the black pixels should cut out nothing. The values in between should be mapped.

This should create a flashlight effect, that reveals an underlying video, using an actual flashlight in front of the webcam.

Using blendMode(MULTIPLY) creates exactly the effect I want, only that I want the black areas around the light to display an animation/video.

tl;dr: I want to use a video feed as a mask that only affects one other video.

Answers

Sign In or Register to comment.