Hi guys,
having worked on a stereoscopic 3d project I came across a problem. all neat comp tricks involving sloppy drawn bezier masks had to be thrown out the window for obvious reasons.
the primary reason being: "you can never match the bezier mask from one eye to the other, and if you don't match them perfectly you will see it."
so I utilized the idea I got from the foundry's website about 2,5d relighting, but instead of using a Pcamera pass like in my other thread, I rendered out a Pworld pass
[ Attachment: You are not allowed to view attachments ]
as you can see the setup is easy don't forget to render in floating point exr to get the desired bit depth as values will go above 1 and below 0
the resulting image looks like this
[ Attachment: You are not allowed to view attachments ]
to be able to see what the scene actually looks like here is a scene pic
[ Attachment: You are not allowed to view attachments ]
now I am able to use this render to extract a soft mask originating from any point in the 3d scene
I built a nuke gizmo to streamline the process. But I am sure this can be done in fusion as well (maybe Mike would give it a try).
[ Attachment: You are not allowed to view attachments ]
you can pic a point in the image and the gizmo makes a soft 3d mask for you.
[ Attachment: You are not allowed to view attachments ]
from any point in the scene
[ Attachment: You are not allowed to view attachments ]
the nuke setup consists of a couple simple expressions
[ Attachment: You are not allowed to view attachments ]
the first one basically is :
(red-(X-(range/2)))/range
(green-(Y-(range/2)))/range
(blue-(Z-(range/2)))/range
where X,Y and Z are the equivalent of the rgb values you pic to determine where your mask should originate from
range is a value I get from the rage slider in the gizmos UI.
ather this expression I invert the values and then merge them together with operator set to multiply.
then I clamp between 0 and 1.
[ Attachment: You are not allowed to view attachments ]
the second expression is:
pow((red*4),NoOp1.pow)
pow((green*4),NoOp1.pow)
pow((blue*4),NoOp1.pow)
where I perform a power function with the exponent coming again from the gizmos UI.
[ Attachment: You are not allowed to view attachments ]
lastly the third expression :
red*green*blue
simply multiplies the values together to get a greyscale image to use as a mask
after that i shuffle the rgb value into a new channel called mask and at the bottom merge the original image back into the channels to
be able look at either the original or the mask.
here is the scene if anyone uses nuke.
[attachment=10]
to recap:
the reason this is useful especially in stereoscopic 3d compositing is that you can create a mask that will instantly match in both eyes as the values are in world space.
it is maybe not exactly the same as a bezier mask but it has a lot of potential.
Unfortunately I found this solution to late to implement it in our current production, but I will sure use it in future projects.
anyway, I hope someone gets something out of it
P.S:
It should be easy to modify the gizmo so that it has a range and power slider for X,Y and Z instead of one for all channels, that way you can dial in even more precise where you want to mask things.
btw if you guys know of a more elegant way to do this with less nodes in nuke, that would be highly appreciated. I am really not that good at expressions.
P.P.S:
I didn't actually attach the preset, although I posted this in the preset forum. But I thought it is sooooo easy that I shouldn't have to.
