MrKepzie / Natron

Open-source compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
www.natron.fr
GNU General Public License v2.0
1.49k stars 163 forks source link

Roto Node: What happened to the invert mask feature #224

Closed blackearth2014 closed 8 years ago

blackearth2014 commented 10 years ago

I was testing Natron with the chromakey and roto again. I drew a roto to mask out the body of the talent from the rest of key. I went to invert the rectangle mask roto and there was no ability to do so.

whereistheinvert

Now in Natron v0.9.6 (image below) the Roto node had the invert feature right beside the activate operator. Was there some kind of invert mask issue with new changes in Natron?

natronv0 9 6

MrKepzie commented 10 years ago

We got rid of it because there was some issues with it that were not solvable. Instead we chose to add the Invert mask option on all processing nodes instead, which is a lot easier for us to pull off.

On 19 Sep 2014, at 21:05, Omar Brown notifications@github.com wrote:

I was testing Natron with the chromakey and roto again. I drew a roto to mask out the body of the talent from the rest of key. I went to invert the rectangle mask roto and there was no ability to do so.

Now in Natron v0.9.6 (image below) the Roto node had the invert feature right beside the activate operator. Was there some kind of invert mask issue with new changes in Natron?

— Reply to this email directly or view it on GitHub.

devernay commented 10 years ago

The issue is that it's impossible in openfx to have an infinite non transparent mask, so you got lots of weird behaviors when transforming inverted roto shapes.

devernay commented 10 years ago

Make a donut with the exterior outside of the image instead of a single rectangle to get an invertedmask

devernay commented 8 years ago

All our nodes that use a mask provide an "invert mask" checkbox. I will add an "expand to project size" checkbox to the invert node to invert masks for plugins that don't have that checkbox.

devernay commented 8 years ago

rather than the "expand to project size" checkbox, I will do an "InvertAlpha" node that lets the user chose the minimum size of the output (project size, format size, custom size, as in generators)

blackearth2014 commented 8 years ago

Fred, I like the invertAlpha node idea.

PostPollux commented 8 years ago

Ok, I'm not really in the code, so it's hard for me to judge if something is easy and effective, or not.

But wouldn't it be easier to change the code of the roto node? So that the alpha of the roto is by default black for the whole format. The format would be the project settings, as long as there is no bg input connected. Now if you put an invert node after the roto it should work without the need of an extra InvertAlpha node. I think it would also get rid of this bug https://github.com/MrKepzie/Natron/issues/1256

Well I guess the downside is a performance loss, as you will pass on a full alpha channel and not just a cropped version of it. Would that be a significant performance loss?

devernay commented 8 years ago

OK I'm closing this.

The only clean solution is to put a Crop node to extend the Roto to the desired format, and then an Invert node to invert alpha. That way, the user knows exactly that the extent of the mask is limited to the Crop size.

This is particularly important in the case where there is a Transform node after the Roto. in this case, the transform should of course be placed between the Roto and the Crop, and not after the Crop or after the Invert.

This adds two nodes to the graph, but makes the processing self-explanatory.