transparency and combined paths

Post questions on how to use or achieve an effect in Inkscape.
dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

transparency and combined paths

Postby dasadler » Thu Sep 04, 2014 12:51 pm

I am new to Inkscape so I may have my terms and concepts a little off. I have this svg - see attached and I have combined the two paths. What I want to do but cannot figure out how to do it is to first fill the svg with green such that image fills except the triangle in the center... or, the entire image fills and I set the triangle as transparent.

Then, I want to be able to add an oval, fill it with yellow so that I end up with a yellow oval containing a green image with a yellow triangle in the middle. Yellow because the triangle is either not filled or the triangle is set to transparent.

I just seem to have no success doing this.

Is there a particular trick or technique I should use?
Attachments
testimg.svg
(2.42 KiB) Downloaded 183 times

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: transparency and combined paths

Postby Maestral » Thu Sep 04, 2014 8:01 pm

dasadler wrote:.. so that I end up with a yellow oval containing a green image(?!) with a yellow triangle in the middle...


It seams to me that you made it more complicated than it should be. Could you draw the final result, by hand or in some other app?
Still, have to ask - You are aware of the Path Operations and/or Clipping and Masking in Inkscape, right?
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: transparency and combined paths

Postby Lazur » Thu Sep 04, 2014 8:08 pm

Hi.

Check for the non-zero fill rule at the bottom:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Fill-Stroke.html

To make the hole "appear" you need to reverse the subpath's direction:
select the triangle's nodes with the node tool and click on path/reverse direction.

dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

Re: transparency and combined paths

Postby dasadler » Thu Sep 04, 2014 11:56 pm

I appreciate the help.. I am still working on it. I attached what I want to achieve - did it in another application. This is just a working image to figure out what I need. Once I learn how to do it I will be using the technique for pictures where I have cut a person out of a jpg and the person is standing with one hand on their hip such that there is a 'hole' between their arm and their torso. I need to have that hole be transparent so when I place the image of the person on another background that the background will show through the hole.

Does that make sense? It does to me... just not sure I explained it correctly.
Attachments
testimg2.png
testimg2.png (35.87 KiB) Viewed 4603 times

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: transparency and combined paths

Postby Maestral » Fri Sep 05, 2014 12:12 am

It does make sense but what would be your "weapon of choice" is up to you ,)

I`d go with this or you can go with that.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

Re: transparency and combined paths

Postby dasadler » Fri Sep 05, 2014 1:08 am

Thus far when doing this with people images, I used the Bezier tool to create an outline path around the entire image... Then, using the Bezier tool again, I created another path outlining the gap between the arm and the torso. I combined the two paths then used Object|Clip|Set to extract what I wanted.

So far so good but when I try to fill the fill the image - to create a silhouette - the entire image fills, including the 'hole' (second path). In any case, whether I make a silhouette or not, I need to have the hole transparent.

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: transparency and combined paths

Postby Maestral » Fri Sep 05, 2014 1:30 am

And if you could now add the Path operations to your arsenal - woohoo! ,)
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: transparency and combined paths

Postby Lazur » Fri Sep 05, 2014 2:18 am

Do you want to end up with something like this?
Image

Or is there a special reason for not masking the photo to a transparent png in gimp for example?

dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

Re: transparency and combined paths

Postby dasadler » Fri Sep 05, 2014 2:55 am

@Maestral: I know you're being helpful but I don't understand what you mean. Being new to this having only ever used powerpoint or microsoft publisher for any graphic work, this program is overwhelming and I believe my head is having a tough time moving from a raster paradigm to vectors. I will get it eventually.

@Lazur URH: That is exactly the effect I am hoping to achieve where the 'holes' do not fill and, indeed, are transparent allowing any background image or color to show through. I do not use gimp and I like the sounding masking to a transparent png but don't know how to do that. The only photo/graphic applications I have are Photoscape and Inkscape.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: transparency and combined paths

Postby Lazur » Fri Sep 05, 2014 3:47 am

That's two different thing.

Masking a photograph may work better in a raster editor program, while, if only the silhouette is needed, it's better kept in a vector format.

With gimp, once you opened the jpeg, you can crop the image to the right size,
add a layer mask to it, and use black and white brush strokes to make clean cuts on the image, then export it as a png with transparency.

While, with inkscape, the path you would use for clipping, can be filled with whatever colours itself, and no need for any modifications.

dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

Re: transparency and combined paths

Postby dasadler » Fri Sep 05, 2014 4:01 am

Lazur,

I was able to successfully use Inkscape to make the path for clipping - problem is that I have two paths - total outline and the 'hole' between arm and body. When I fill the path, the entire outline fills including the 'hole'. I am trying to find a way to keep the hole transparent. Is that possible?

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: transparency and combined paths

Postby Maestral » Fri Sep 05, 2014 4:18 am

Maestral wrote:
dasadler wrote:.. so that I end up with a yellow oval containing a green image(?!) with a yellow triangle in the middle...


It seams to me that you made it more complicated than it should be. Could you draw the final result, by hand or in some other app?
Still, have to ask - You are aware of the Path Operations and/or Clipping and Masking in Inkscape, right?


Don`t get me wrong but have you checked those Path Operations?
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

Re: transparency and combined paths

Postby dasadler » Fri Sep 05, 2014 4:43 am

Thanks for the link... I looked but did not find your original reference to path operations - don't know how I missed it. So far, this looks promising - the exclusion operation seems to be what I needed.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: transparency and combined paths

Postby Lazur » Fri Sep 05, 2014 7:12 am

dasadler wrote:Lazur,

I was able to successfully use Inkscape to make the path for clipping - problem is that I have two paths - total outline and the 'hole' between arm and body. When I fill the path, the entire outline fills including the 'hole'. I am trying to find a way to keep the hole transparent. Is that possible?




May I bump my previous reply solving the problem.

Lazur URH wrote:Hi.

Check for the non-zero fill rule at the bottom:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Fill-Stroke.html

To make the hole "appear" you need to reverse the subpath's direction:
select the triangle's nodes with the node tool and click on path/reverse direction.

dasadler
Posts: 16
Joined: Sun Aug 24, 2014 2:54 am
Location: San Bernardino, CA, USA

Re: transparency and combined paths

Postby dasadler » Fri Sep 05, 2014 8:00 am

@Lazur URH: I probably did it incorrectly but I did reverse the path direction and it had no discernible effect on the image but, as I said, I probably did it wrong. I will continue to try, though, as I am sure there is more than one solution to my problem.

By the way, the exclusion path operation is based on the non zero rule. I was trying to figure out how to apply that rule and as I experimented with clicking, selecting, combining, and breaking apart paths, I must have just done it wrong. In any case, that path operation based on non zero seems to have provided what I need for now. I will push forward until I learn this thing then be back to offer advice to others in my position.

Thanks for your indulgence.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: transparency and combined paths

Postby tylerdurden » Sat Sep 06, 2014 8:22 am

Maybe illustration?
ReversePath.jpg
ReversePath.jpg (177.94 KiB) Viewed 4450 times


Hope this helps.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/


Return to “Help with using Inkscape”