[solved] A different possibility to create a Layer

Post questions on how to use or achieve an effect in Inkscape.
User avatar
bastman
Posts: 3
Joined: Wed Aug 06, 2008 5:52 am
Location: Berlin

[solved] A different possibility to create a Layer

Postby bastman » Wed Aug 06, 2008 5:59 am

Hey guys and geeks,

I'd like to create the difference of two layers / paths but I'm used to work with "sectional planes" (I don't really know the English word for it) in Adobe PhotoShop.
So: How can I create the difference of two layers while the upper layer still completely exists but it's viewable parts are only above the lower layer?

Sorry for my bad English and thank you very much in advance,
bastman

Update:
I made a picture, in case you don't understand my text:
Image

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: A different possibility to create a Layer Difference?

Postby microUgly » Wed Aug 06, 2008 7:39 am

I'm pretty familiar with Photoshop, but not familiar with "Sectional Planes". Can you point me to an online resource where I can read about them.

To look at you screenshot I would say you need to use a Clip. You can read about them in the Inkscape Guide. But the terms you've used suggest this might not be what you are looking for.

User avatar
bastman
Posts: 3
Joined: Wed Aug 06, 2008 5:52 am
Location: Berlin

Re: A different possibility to create a Layer Difference?

Postby bastman » Wed Aug 06, 2008 9:42 am

Ok, I finally found out that it's English term is "Clipping Mask" (In Photoshop).
Image
Image

So "Masking" or "Clipping" comes really close to what I'm searching for and I already tried out both functions but I'm not happy with the results.

Image

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: A different possibility to create a Layer Difference?

Postby prkos » Wed Aug 06, 2008 10:17 am

you have 2 objects "P" and a circle. You want the circle to be clipped to the "P" shape.

You need to duplicate the "P", it will be created on top, select the duplicated "P" and the circle and do Object > Clip > Set

The clipping object must be above the clipped and it will disappear after the clipping, you can change this behaviour in Inkscape preferences.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
bastman
Posts: 3
Joined: Wed Aug 06, 2008 5:52 am
Location: Berlin

Re: A different possibility to create a Layer Difference?

Postby bastman » Wed Aug 06, 2008 10:29 am

prkos wrote:you have 2 objects "P" and a circle. You want the circle to be clipped to the "P" shape.

You need to duplicate the "P", it will be created on top, select the duplicated "P" and the circle and do Object > Clip > Set

The clipping object must be above the clipped and it will disappear after the clipping, you can change this behaviour in Inkscape preferences.

This worked, thanks a lot (also to you, microUgly)!

Is there any chance to keep the whole circle intact so that I can move it after clipping and don't just move it's clip?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: A different possibility to create a Layer Difference?

Postby prkos » Wed Aug 06, 2008 12:08 pm

The circle is intact actually, it doesn't become a different path after the clipping. When an object is clipped it always carries its clipping path, you can unclip it and get your circle back.

When you move a clipped object, you're also moving the clipping the path together with it, as if they are one object.
If you really want to cut your circle to a new shape "forever" you should use boolean operations - those under Path menu (Division, Cut).

There is a trick to "lock" the clipping path so that you can move the clipped object, but not the clipping path, I guess this might be what you're asking about. Group the object you want to clip, even if it's just one object. Then clip that group. The visual result is the same, but this way you can Ctrl + click on the group to enter it, and then you can move the object within the group without moving the clipping path.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: A different possibility to create a Layer Difference?

Postby microUgly » Wed Aug 06, 2008 6:20 pm

bastman wrote:Image

I wanted to suggest you think about this differently. Hopefully I can explain this well, if not just ignore me :)

You'll note that in Photoshop when you create a mask, it masks a base. You don't start with a P and mask it to the shape of P. In your example you should have three objects. The first is the base which can be a large yellow rectangle. Then you have your little circle above that. And finally you have your P shape which will be used as the clip/mask. Group the square and circle then clip it with the P shape.


Return to “Help with using Inkscape”