7
Mask Node for Cycles
Cycles allows you to use simple gradients could we also use Blender's Masks as vector sources to derive gradients? I have been making false perspective animations with image mapped planes, using offset parallax mapped but I need to animate masks on the images based on their 3D view. Could it be possible to use Blender's Mask tool as input to Cycles nodes? I could still use the UV/Image editor to draw over the texture source there? Or could I load the source image into the MCE and animate the mask over time? I guess that the problem is that the Mask is produced "after" 3d image drawing but before post processing? That is why Masks are available to the VSE and compositor? I think that this would be a very beneficial tool for Cycles as a Motion Graphics device. I'm not sure if the same functionality could be incorporated into Eevee? That would make Motion Graphics production blisteringly fast. Thank you for reading
Mask Node for Cycles
view on imgur.com

Login to comment

Comments(5)

slugfiller · 4 months ago (edited 4 months ago)

It seems like you either want to use complex shapes in material nodes (This could be done with some math over the UV, but that is admittedly unpleasant), or to outright have multi-pass rendering which allows you to use a render as a texture.

The prior is actually not significantly simpler than the latter. The only difference is that it renders a 2D image rather than a 3D one. And/or that you’re limiting to specific shapes (Quadrilateral and circle). Neither case would work very well as a node.

Using a render as a texture was probably requested a few dozen times already, but it’s incredibly complex. It would require setting up multiple “passes” to build the first render and then use it in a second one. It would require extra UI design, to determine what exists in each pass. Actually, one such suggestion was made just before yours, by a person called "Oscalon", in the "Rendering" section

An alternative solution to your use-case, however, might simply be using boolean operations on the projected plane, to “cut out” the masked area. It won’t allow partial transparency, but for quadrilateral cut outs like your demonstration, it would work. Or maybe I’m misunderstanding what you’re trying to achieve.

1 point reply
3pointedit [OP] · 4 months ago
Thank you I really appreciate the detailed response. I am grateful that you could clear up the actual pitfalls. Yes I understand now what I was asking. Unfortunately I 'was' implying graduated transparency without showing it. Sadly the boolean approach seems more memory intensive as it requires a much larger mesh density to allow fine detail. Thanks to your suggestion I will instead focus on curve object booleans. Interestingly, in the past I have faked transparency by displacing the surface of an object toward camera and using the depth pass as alpha. So this sort of comes back to a type of vertex paint, which is another kind pre-render isn't it? Seems like defining these values from another source object might be the only way. Thanks again for your time on this matter ;-)
0 points reply
3pointedit [OP] · 4 months ago
Ok so it turns out that if you spend enough time trying to make something happen you will finally succeed. I was able to cobble together shaders to do exactly what I suggest above.
1 point reply
lsscpp · 4 months ago (edited 4 months ago)

Interesting. What comes to my mind, is that you can place planes with holdout shader, and animate them with tranformation and/or shape keys. Maybe it’s also possible to link them to Motion tracker data?

0 points reply
3pointedit [OP] · 4 months ago
Deforming planes requires more and more geometry, I was hoping to restrain geo to leverage spline shapes that could be rasterized by screen space via material.
0 points reply
artistcdmj · 4 months ago
I also think something similar is how we use the render layers as Mask Layers, so any object there can be used to mask out of the rest of the layers or a single layer. I woudl like to see the MCE masks from tracking be able to be inputs to Viewport at least so that the plane/object in view could be masked based on the animated mask in the MCE. BUt I admit this is all kind of above my understanding at the moment, and I need to dig into the example file you provided.
0 points reply
3pointedit [OP] · 4 months ago
Layers can get messy when you want to mask per object. I would like to use the transparency in 3D view instead of waiting for the compositor to add the alphas up.
0 points reply
Choose a category
Upload an image