Masking Problem

Post questions on how to use or achieve an effect in Inkscape.
briancpearl
Posts: 6
Joined: Fri Jan 28, 2011 11:04 am
Location: Raleigh, NC

Masking Problem

Postby briancpearl » Tue Mar 22, 2011 1:03 pm

I'm about to throw myself out a window here...I'm missing something basic, but crucial.

I'm trying to make a reflection of an image. I duplicate/clone the image, then flip it and move it below the original. I then cover the flipped image with a gradient going from black to white. I then select both (I've tried numerous time selecting top or the bottom first), go to 'Mask' > 'Set' and voila...the image that is supposed to be the reflection is all white.

Help? Thanks!

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: Masking Problem

Postby BobSongs » Wed Jun 15, 2011 7:05 am

I'm just going through some unanswered posts and saw yours.

I'm not sure if you'll return to read this, but I thought I'd just state that I'd love to have a tutorial on masks work. It's one of those features I'm puzzled about in Inkscape.

Anyone?

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Masking Problem

Postby llogg » Wed Jun 15, 2011 8:55 am

http://inkscapetutorials.wordpress.com/ ... y/masking/

Do you have any specific questions about masking? The basic functionality is pretty straight-forward. I've attached a pic showing a source jpg, a gradient mask, the jpg with mask applied, and a mask with a blue to gray gradient applied. The polka dot background is to make the point that masking works on the alpha channel. The blue-gray mask is to point out that it takes the lightness value from the HSL fill and applies it to the mask. This value is the same for the blue and gray stops on the gradient and the result is a uniform effect across the source jpg.
masking.png
masking.png (160.64 KiB) Viewed 1666 times

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Masking Problem

Postby ~suv » Wed Jun 15, 2011 11:44 am

briancpearl wrote:I duplicate/clone the image, then flip it and move it below the original. I then cover the flipped image with a gradient going from black to white. I then select both (I've tried numerous time selecting top or the bottom first), go to 'Mask' > 'Set' and voila...the image that is supposed to be the reflection is all white.

Is the 'Affect:' option to move gradients along with the object turned off? Activate it and redo the reflection. [1]
The icon on the controls bar: Image

Just curious - did you follow this tutorial: "Reflection | Aqeel Zafar"?

[1] At the far right on the controls bar of the select tool are 4 option toggles (labeled with 'Affect:). They influence how transformations (move, scale, flip, etc) affect certain attributes of objects. The third one keeps gradients in sync with objects and is required to be active if using a translated+flipped clone with a gradient as mask.

A more technical analysis of what is happening is here (comment #7)

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: Masking Problem

Postby BobSongs » Wed Jun 15, 2011 11:55 am

Thanks Llogg...

Would it be possible to give a step-by-step process (tutorial, if you will) on how to apply a mask, explaining its benefits?

Thanks!

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Masking Problem

Postby llogg » Wed Jun 15, 2011 12:53 pm

BobSongs wrote:Thanks Llogg...

Would it be possible to give a step-by-step process (tutorial, if you will) on how to apply a mask, explaining its benefits?

Thanks!

http://tavmjong.free.fr/INKSCAPE/MANUAL ... sking.html

For the example I gave:
1. Import jpg.
2. Draw rectangle and fill with linear gradient from black to white, both stops at full opacity.
3. align rectangle over jpg and select both. Do Object>Mask>Set.

The benefits are hard for me to explain, as I'm not much of real designer/artist, but most tutorials that I've found use it for blending objects. You can achieve some nice fade out effects for reflections. I've used it to create a graphic that morphed a migraine scotoma into an EEG tracing. Maybe some others can explain the benefits a little better.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Masking Problem

Postby brynn » Thu Jun 16, 2011 9:50 am

I'm just going through some unanswered posts and saw yours.

I saw this message when it was originally posted, but couldn't answer it, because I'm not very familiar with masks. I kept hoping someone else would, but didn't realize it was never answered at all. Every couple of weeks to a month, I also go through unanswered messages, and bump up those which would seem to have an answer, even if I don't. But in April I was dealing with painters in my apartment, so wasn't able to. So my apologies for missing it Image

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Masking Problem

Postby llogg » Thu Jun 16, 2011 11:40 am

Hopefully the attached tutorial is helpful.
Image

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Masking Problem

Postby llogg » Thu Jun 16, 2011 12:12 pm

Maybe a more meaningful example than that last bit.
I used this pic as a source image.
Image
I duplicated it and applied the desaturate filter. I then used rectangular masks with gradient fills in opposite directions on each jpg. Aligning the two gives the effect of blending a drawing with a real photographic image.
Image


Return to “Help with using Inkscape”