Inkscape.org
Beginners' Questions New to InkScape with a masking question
  1. #1
    andrew1957 andrew1957 @andrew1957

    I have a simple and unique need, and I hope someone can tell me if InkScape will suffice.

    I want to import a base JPEG image onto Layer 1.

    I then create VSG graphic images with my custom Excel Application.  (Basically these are simple slices of a pie chart...)

    I want to paste and position these onto layer 2.

    I then want to have another layer, that allows me to draw opaque boxes or shapes on top of the VSG images allowing portions of the base image to shown through the VSG layer.

    I am able to accomplish this using GIMP and MASK layers, but it's ability to handle the VSG images is slow and cumbersome.

    I would be happy to upload or share a simple example if that helps explain 

     

     

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Sound quite straightforward... should not have any issues.

  3. #3
    andrew1957 andrew1957 @andrew1957

    Thank you for the encouragement. however, my newbie status is showing.

    I have read the online manual about masking and I don't fully understand a few terms, and the link to the term doesn't exist. what is Z-order?

    My test file has three layers

    1. is named Base with a JPG image
    2. is named SVG with the SVG graphic image copy pasted from excel
    3. is named Cut with a triangle made from straight lines and filled black RGB0,0,0

    The triangle is above the SVG file that I want to mask it allowing the lower base JPEG image to show through.

    I have created a link sharing my test file using my Microsoft one-drive account.

    my sample image

    Whenever I select the top triangle and the SVG that I want to mask, then choosing OBJECT MASK SET, the entire SVG file appears to dis-appear.

    If you are active on Upwork, I would be glade to create a project for paid assistance to help me create repeatable steps to make this work when I occasionally need to do this.

    Advise is greatly appreciated.

    Thanks. 

     

     


     

  4. #4
    Polygon Polygon @Polygon🌶

    Make sure the mask is a white color filled shape and above the object you want to mask.

  5. #5
    Tyler Durden Tyler Durden @TylerDurden
    *

    Z-order (or stacking) refers to background/foreground relationships of objects in the document. Higher in the z order = closer to the viewer. Objects higher (closer to the viewer) might obscure objects further from the viewer (lower). 

    If you want to punch holes in an imported image (to show an image/objects behind it), group the imported image before setting an inverted mask or clip.

     

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

  6. #6
    andrew1957 andrew1957 @andrew1957

    Watching the examples from @Polygon and @TylerDurden  make it look easy, but sadly I am overlooking something.

    The @Polygon example appears to have a layer set to transparency, and accomplish this using masking.

    While @TylerDurden appears to be grouping the SVG with a Circle on the same layer and using the clip option.

    I am able to group the SVG image with a circle, and the circle is filled white,  but the clip action does nothing and my circle remains grouped with my SVG clip.

    Both options appear to do the job, but I am hitting the wall.

    @TylerDurden  -  The ellipse is filled white, is there any other special setting on the ellipse?

     

     

     

     

     

  7. #7
    Polygon Polygon @Polygon🌶
    *

    No - if you´re up using "Mask" put a white shape over the image go Object->Mask->Set  done. Masking is based on hue.

    (The transparency was already there in your file.)

    For clipping put a shape instead over the image and go Object->Clip->Set - done. Clipping is based on vector shapes. That´s all to it. 

  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    I group the image (not the background) before clipping with the circle.

  9. #9
    andrew1957 andrew1957 @andrew1957

    My masking efforts result in the area under my shape being retained. I want the area of the SVG clip to disappear allowing the JPEG file on layer one to show through.

    And my clip efforts are failing.

    If I may, I have created a new sample with the link below

    box sample

    Let me provide background.

    My custom program creates arcs that represent the horizontal viewing angle of cameras.

    I then want to paste these over various forms of images that may be google earth views of buildings, blue prints, etc.

    I will position the camera view from a specified location and aim it towards one of more buildings.

    Then I want to manually add boxes, triangles, or polygons over the areas where the camera will not be able to see so the underlying image shows through.

    Only the area the camera will see remains of the SVG clip.

    Note there could be a dozen SVG clips pasted onto a large drawing of many buildings to show the areas of no camera coverage based on where cameras are located.

    Does this help?

     

     

     

  10. #10
    Tyler Durden Tyler Durden @TylerDurden

    Here is a more literal example of what I presume you would like.

    Example svg file is attached.

     

  11. #11
    andrew1957 andrew1957 @andrew1957

    You hit the nail on the head.

    It looks as if you are doing this on a single layer. Is that right?

    I think I am close, 

    I have the Layer 1 on the top listing of objects, then my void area, a simple box.   IS the translucent green color of your freehand boxes important?  can this just as easily be black?

    If That is important, what are the settings to get that?

    I think I am doing everything right, but obviously not as the SET inverse LPE after I group the field of view and the void1 path does nothing.

    I really appreciate the fast and steady replies....   Thank You...

     

     

     

    Inkscape Test
  12. #12
    andrew1957 andrew1957 @andrew1957

    I just noticed that I keep getting a down arrow next to the field of view graphic.   I seem to be having trouble keeping the order correct.

     

  13. #13
    Tyler Durden Tyler Durden @TylerDurden

    I use a translucent object(s) in this case, to adjust the shape while seeing the map behind. The clip operation ignores object color and uses only the geometry. Transparency can be adjusted in the Fill/Stroke dialog.

    I note that the Field of View object is locked. It would need to be unlocked, to be included in a clip operation.

  14. #14
    andrew1957 andrew1957 @andrew1957

    There must be something different going on.

    I import a JPG image of a blueprint,  and I can rename the image to blueprint.

    I then have my Excel VBA create an excel graphic for a new camera field of view, and I select it in from the excel spreadsheet,  and past it into the Inkscape drawing.

    But I can't edit the name, and it always appears with a different symbol under the CM column in the objects view, and has the down arrow and when clicked it expands and shows name beginning with "USE"

    The same thing occurs if you insert a shape from the excel menu into a spreadsheet and copy paste that image from excel into InkScape.

    I Think I have taken too much of your time. Does the forum support or endorse asking to pay someone for offline remote assistance?  Venmo, paypal, etc..

      

     

     

    Paste Difference
  15. #15
    Tyler Durden Tyler Durden @TylerDurden

    No worries... we are users helping users.

    Feel free to donate to the project though... 👍

     

    You're 90% there.

    The "use" label is related to the type of object. If you look at the status bar, it may say "clone of... use Shift+ D to find original.."  (more on clones)

    To edit the label, the clone's link to its original* must be cut. The label needn't be changed to make the operation work though. The object is not a path, so it will need to be grouped (group of one) for clipping operations to work on it.

    *The original may be on the canvas, or in a non-visible part of the document called "defs".

     

  16. #16
    andrew1957 andrew1957 @andrew1957

    Thank you, and the last 10% is kicking my back side.

    I will ultimately have to show others how to reliably accomplish what I am struggling to do.

    I continue to strike out.   What am I doing wrong?  

    1. Create the required camera views.  These will reside in an excel spreadsheet and will be copied and pasted into the Inkscape drawing.

    2. Import the base JPG image into layer 1 and label it appropriately.

    3. Copy and Paste the first camera view into the drawing on layer 1.

    With the camera field of view pasted into the drawing, must I then select this, and press shift D?

    Do I want the
    or
    With it selected do I make a group?
    But assume I want to rename it.....

    Then once I know what to do with this image.

    4. Move and rotate and scale the view to the proper location on the drawing.

    5. Draw a shape that represents the area to be removed from the view that will show through from the original map.
    you can make this any color and translucent so that you can easily identify the area to uncover.

    In the Objects view the listing should show
    Layer 1 at the top
    The base drawing should be at the bottom.
    The camera view should be 2nd from the bottom
    The drawn images to uncover should be above the camera view.

     

     

     

     

     


     

     

     

  17. #17
    andrew1957 andrew1957 @andrew1957

    Basic Success,  I am able to do the following.

    Import my base image.

    Draw a BOX as if it were the field of view image

    Draw an ellipse and position it over the box,

    Then setting a clip the circle area shines through.

     

    But the holy grail eludes me.

    I don't know or understand just what I need to do to the camera's field of view graphic after I paste it onto the drawing.

    Experimenting with masks, I had the area that I wanted to go away stay, and the area I wanted to keep disappearing.  (Just my luck)

     

     


     

     

    Basic Success
  18. #18
    Tyler Durden Tyler Durden @TylerDurden
    andrew1957

    I don't know or understand just what I need to do to the camera's field of view graphic after I paste it onto the drawing.

    I'd group it, then perform the inverted clip. The group can be named for convenience.

  19. #19
    andrew1957 andrew1957 @andrew1957

    OK,

    Batter success, and maybe I overthought this.

    When I copy-paste the camera field of view,  sometimes it acts as if it is already grouped,  Does Inkscape do a lot of remembering?

    Anyway, after I pasted the HFOV, I select ungroup, then group a 2nd time.

    Then I make my void area,  Then SHIFT and select the two items, and choose clip (reverse) and voila'.

    I'll keep practicing this until I fully understand what is happening.   I don't where the SHIFT-D comes into play. I suppose you reference the need to do this to rename the area so they make sense.

    I appreciate your patience during my Inkscape Infancy,  and I will donate $100 to the cause and note your name on the gift.

    Thanks - Andy

     

     

    Better Success
  20. #20
    Tyler Durden Tyler Durden @TylerDurden

    That looks like the expected result.

    Shift-D can trace the clone's source, which is not germane to this task, as far as I can tell. 

    The project will be grateful for the donation, thank you.

    Feel free to chime back if you need more assistance.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions New to InkScape with a masking question