7
$\begingroup$

Intro:

Ok, so I'm new to blender and have looked all over the internet, and blender is not working as expected (and all the usual that seems to be the required greeting on this site...)

Question.

I can use masks created in the movie clip editor (or the UV/Image editor) in the compositor to combine elements.

enter image description here

How can I use masks to combine shaders and textures?

I could render the mask as an image sequence ,and plug the images as a texture in the material editor. But then every new adjustment that has to be made in the mask means that the sequence has to be re-rendered. Not the best workflow. Masks being vectors have so many advantages over pixel based files, on top of that it is easy to rotoscope using tracking tools, also they are quite easy to animate and allow fine control when it comes to feathering.

Is there some python amazing script, animation node, add-on, or secret menu for the initiated that allows the mask information to be used interactively on the material editor?

enter image description here

$\endgroup$
  • 4
    $\begingroup$ You're new to Blender? Wouldn't guess $\endgroup$ – Mr Zak Mar 4 '18 at 22:48
  • 5
    $\begingroup$ @MrZak I've been new to it for quite a while... $\endgroup$ – cegaton Mar 4 '18 at 22:50
  • $\begingroup$ Haha that opening made me laugh, you only has 53.3 points after all. Pfff... beginner! $\endgroup$ – Duarte Farrajota Ramos Mar 4 '18 at 23:30
  • 1
    $\begingroup$ Oooh don't make masks like that :0 you should split the subject into parts. Imagine a jointed marionette. Make a piece for the head, another for the neck the torso and so on. Otherwise you can end up with verts that crawl around the shape and leave you dense or sparse in some area. Also it will be more work than simply rotating an arm piece for example. $\endgroup$ – 3pointedit Mar 6 '18 at 0:51
  • 2
    $\begingroup$ Perhaps you could use the rendered output from another scene's compositor file output node, as a source for the texture? You use 'frame count' placeholder with a null frame at the start. $\endgroup$ – 3pointedit Mar 6 '18 at 12:23
6
$\begingroup$

No, the MCE or UV/Image editor's masks will not translate upwards to the 3D view.

They occur in the post phase of Blenders sequence of operations. Also I am told that its to hard to make a rasteriser for arbitrary material parameters. I guess they would have to operate at screen space? You can see a more thorough breakdown of this at my blog.

The work around is to use Curve objects edited to an appropriate shape. You can use the tracker to map Hook objects in the camera view, these can be used to distort the curve object. Then project your texture onto the object as required.

Hook constraints

Use an empty to control all dimensions. Empty controller

You might notice that you cannot have a feathered edge for the same non rasterising reason. You can place a beveled glass object above then use its transmission ray to to fake a falloff, but you will be stuck with the shape of that object not your mask.

$\endgroup$
  • $\begingroup$ I still find it paradoxical that there is no way to do real 3d compositing in blender.... "its hard to make a rasteriser for arbitrary material parameters" How do Fusion and Nuke get away with vectorial masks? $\endgroup$ – cegaton Mar 5 '18 at 15:06
  • $\begingroup$ A long time ago a certain Blender senior staffer went to visit the foundry, upon return he was not so enamored with 3D compositing. Take from it what you will ;-) $\endgroup$ – 3pointedit Mar 6 '18 at 0:48
  • $\begingroup$ Also... IKR, the Blend texture is almost there, you'd think it could just take a geometry vector of some sort to determine distance to an edge. I've tried but to no avail. Also I have no maths ability... so theres that. I guess an OSL shader could do it, but that wont be supported by the graphics card :( $\endgroup$ – 3pointedit Mar 6 '18 at 0:54
  • $\begingroup$ I had thought that a combination of rendered output and render layers of mask objects in the Mask Layers would make this kind of work possible. $\endgroup$ – Craig D Jones Mar 7 '18 at 4:03
  • $\begingroup$ Well yes you can sort of hack it in the compositor with a UV pass but its not ideal and you don't get decent cast shadows from alpha mask in the 3view. See my blog entry above for examples $\endgroup$ – 3pointedit Mar 7 '18 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.