Mask question

Moderator: jsachs

Post Reply
Marpel
Posts: 547
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Mask question

Post by Marpel »

I have tried multiple ways to accomplish this, but have not found an appropriate way.

I am trying to composite two images, with a mask that is quite large (images about 7000 X 5000 and mask takes up at least half of the image). The mask was generated with the spline tool and is sort of dog-leg in shape but quite wide. Actually, I am trying to do multiple mask shapes, but for the purpose of this question, the dog-leg shape will suffice. All masks have very gentle, inside and outside, corners.

I am trying to gradiate (?) the masks so there is a small area of white towards the center and which radiates to black around the outside edges, similar to what the oval gradient tool can do. However because the oval gradient tool can, of course, only do circular or oval shapes, it does not work for my purposes. I guess I am looking for a mask tool which has the shaping ability of the spline tool and the gradient ability of the oval gradient tool.

The problem with the mask radius is the low amount. Not even close to what I need.

Any suggestions on how I can build a mask as described?

Marv

jsachs
Posts: 3234
Joined: January 22nd, 2009, 11:03 pm

Re: Mask question

Post by jsachs »

Have you tried feathering by a negative width? If the maximum negative radius is insufficient, you could try resizing the image smaller and creating the mask on the smaller image -- then save the mask as an image and resize it back to full size.
Jonathan Sachs
Digital Light & Color

tomczak
Posts: 1112
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Mask question

Post by tomczak »

I was thinking that maybe inserting the Mask transformation and making Mask1='dog foot shape oval' and Mask2=an oval gradient (one of mask dialog tools) and then choosing the Mask transformation output to be Mask1(+/-/&)Mask2 could do the trick.

But I'm not sure how to create an oval (or linear) gradient in Mask dialog box - the running man is grayed out.
Maciej Tomczak
Phototramp.com

jsachs
Posts: 3234
Joined: January 22nd, 2009, 11:03 pm

Re: Mask question

Post by jsachs »

If you start with the spline mask, then switch to Overlap mode, and then draw the oval gradient, the oval gradient will be restricted to the region where the spline mask is defined.

To draw an oval gradient, you need to click and drag on the input image to define its location -- then you can adjust it by dragging control points.

The effect of using an oval gradient is somewhat different from negative feathering which softens a mask pixel in proportion to how close it is to an edge, so the softening follows the contours of the original mask.
Jonathan Sachs
Digital Light & Color

tomczak
Posts: 1112
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Mask question

Post by tomczak »

I got it now - thanks. I tried Output = Mask1 & Mask2 (1 being an oval gradient, 2 being the polygon) and it seems it may kind of do what Marv wanted.
Maciej Tomczak
Phototramp.com

jsachs
Posts: 3234
Joined: January 22nd, 2009, 11:03 pm

Re: Mask question

Post by jsachs »

Here is an example of the same mask, first with a negative feather radius and then with an oval gradient.
masks.jpg
masks.jpg (19.7 KiB) Viewed 1498 times
Jonathan Sachs
Digital Light & Color

Marpel
Posts: 547
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Mask question

Post by Marpel »

Thanks very much for the replies. I am working my way through them and trying out the options.

So far, I have tried resize smaller, negative feather, then enlarge to original size. I am attaching two images with the results. One is the initial attempt, and it looks pretty good, except for the upper and lower "corners", where it (visually) appears the negative feather does not occur right at the apex (if that's the proper term) of the corner, resulting in the "spike" leading to both corners. If it would look the same as the third corner mid-left side, it would be perfect.

To try and correct those spikes, I did another image where I just used a straight gradient mask in the lower corner (emanating from the apex towards the center of the shape), then composited that with the result as described above, using Darken as the blend mode. However, as can be seen, it appears to have caused two parallel spikes. Not sure why that happens.

So far, though, it looks promising, and have yet to examine the other suggested methods.

Marv
Attachments
mask test v8.jpg
mask test v8.jpg (14.3 KiB) Viewed 1488 times
mask test v7.jpg
mask test v7.jpg (14.22 KiB) Viewed 1488 times

jsachs
Posts: 3234
Joined: January 22nd, 2009, 11:03 pm

Re: Mask question

Post by jsachs »

The spikes are a well-known optical illusion.

In the meantime I have increased the maximum feather width to 1000 for the next release.
Jonathan Sachs
Digital Light & Color

Marpel
Posts: 547
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Mask question

Post by Marpel »

Thanks for the clarification, and increased feather - I look forward to trying it out.

And didn't want to open a new thread, as I figured this is mask related - It appears either I am doing something wrong or the gradient mask tool is not working:

I tried to do a composite of two images with a straight horizontal gradient (actually same results with any angle).

Composite > Selected two images > New mask > Gradient > Set start and end points > Line visible and green overlay on left image also visible > No change to right image > Clicked on running man (which grayed out) > No change > Click OK and input image only results.

Latest version downloaded.

Marv

jsachs
Posts: 3234
Joined: January 22nd, 2009, 11:03 pm

Re: Mask question

Post by jsachs »

There does seem to be something wrong. I can get it to work if I fiddle with the mask but it does not seem to create the mask the first time when you finalize the gradient. Fixed for the next release.
Jonathan Sachs
Digital Light & Color

Post Reply