Vignette effect
Does anyone know of a way to create a vignette effect which you could lay over video output in a window? I want to be able to use motion tracking to move the vignette around, showing only small areas of the video that's playing.
You could simply use two jit.gl.videoplane, one at normal size and one that is really scaled down. You just have to set the videoplane you want on top @layer 1, or at a greater layer than the one below. You can then change the content and the position of this videoplane, using your favorite motion tracking tool... Maybe try blob tracking?
Have fun!
I use jit.gl.sketch to draw a white oval where I want the vignette, maybe blur it, and then multiply it by the source video, using (jit.gl.slab xxx @file co.multiply.jxs).
Auvi object au.cropsoft, http://auvi-software.com
tr.vignettes.jxs
it has no center parameter but it could be good solution to combine it with what gpvillamil suggest.
Hey gpvillamil, could you provide an example patch of what you mean? I'm not really sure i understand. Kurt and yoann, i'm checking out your solutions just now, thanks all
Just to further pile on with another suggestion, Recipe 38: BrightLights comes with a shader that generates a feathered, circular mask.
https://cycling74.com/tutorials/jitter-recipes-book-3/
I made this patch a while ago which is a controllable vignette video fx. u can control x and y stretch, overall size, and the amount of feathering (labelled gain). it has come in useful for some tour visuals i've been working on where we film ppl in the crowd...
Andrew's excellent jit.expr tutorial was the source of inspiration for creating this effect, sort of a way of proving i had demystified jit.expr - thanks Andrew!
Justin, Andrew, thank you. That is exactly what i was looking for. I'm now trying it out within my patch, the vignette looks amazing! I'm trying to use jit.rota to control the position of the vignette overlay, is this possible?
thats one way of doing it... or if you're feeling brave, you could try adding an offset within the jit.expr equation! the second approach should be more efficient in terms of FPS (but its likely to be marginal).
i assume that u are talking about my patch, which is not shader based. although you could probably apply the same approach with a shader version of jit.rota (i forget the name now).
justin
Ah, i'm still getting into Jitter so i'm trying to quickly learn all this for my masters project. I assumed your patch included the vignette effect as a separate layer, so i could move it about on the top of the static movie using jit.rota. So is using a shader the only way to separate the vignette from the movie then?
i'll try what gpvillamil has suggested though i'd heard that slab stuff was fairly complicated? uuuugh!
my patch creates an alpha layer which you could offset using jit.rota, but you need to be careful to offset the alpha layer and not the rest of the RGB matrix (otherwise everything will shift).
if you're new to jitter, i would recommend getting to grips with basic CHAR processing rather than the open GL / shader / slab method. it's not that much more difficult but there will be many other hurdles to cross if you are unfamiliar with open GL.
How about if i could generate an alpha layer (playing from jit.qt.movie, or as an image) 'underneath' the vignette, with the two summed together, and jit.rota controlling after the op@op object... then i can move the 'circle' around with a transparent layer underneath.
Then i could have another jit.qt.movie object with the movie matrix output. Combine the two with op @ op then the vignette can still be moved around separately from the static second movie output? I'm maybe missing something here...
My method above works well enough, i'm sure it's almost the least efficient way of fulfilling this task but it'll do for the submission! Thanks all. On to motion tracking fun now!
Thank you justin, it works great! How can I make it a rectangle instead of a circle?
i dont have time to knock up a rectangular version at the moment. however, you could have a look at andrew benson's jit.expr tutorial (check C74 articles). this should give you the tools to change the equation so that it becomes a rectangular gradient as opposed to circular.
hope that helps,
Justin