Inkscape.org
Beginners' Questions Issue with masking path-type objects
  1. #1
    mathew.mulligan mathew.mulligan @mathew.mulligan
    **

    Good day,

    I have an SVG file that contains 6 Path type objects. I imported a PNG file and ran trace to bitmap so that I could create a mask to texture the 6 objects. I made sure the texture was on top, selected all the objects, went to Object>Mask>Set. Instead of 6 textured objects, everything goes blank. I can still see the outlines when viewed that way, but I am not sure why it is not working as I hoped it would. What should I do?

     

    I was following this video here, but I do not get the same result: https://ardentdesigns.ca/texture-masking-inkscape-tutorial/

    I have a Mac running 10.13.6 with Inkscape 1.0.2 installed with .dmg

    Edit: I deleted the video for more space

     

     

  2. #2
    Marco Riva Marco Riva @zerocinquanta
    👍

    If you look at the video, it shows two different techniques: a boolean one (the mask is a traced image, become a path to be used with the target paths), the second uses the Mask function, using directly an IMAGE (not converted) as mask on target paths.

    Could be this?

     

  3. #3
    mathew.mulligan mathew.mulligan @mathew.mulligan
    **

    Thank you! That was it. It was suppose to stay an image, not traced as bitmap, then I could mask!

    Do you happen to know why this issue would occur when I try to do it the first way?

     

    I traced the top layer to bitmap like the video, I do not have the paths for the bottom layer united because when I do that they all become one white color, and I need the white and red to stay as they are. When I click difference, just the top layer remains and it turns white.

     

    Edit: I deleted the video for more space.

  4. #4
    mathew.mulligan mathew.mulligan @mathew.mulligan

    After I masked the image, I enlarged the vector and found that where it masked, it looked more pixelated at the edges while everything else looked sharp. My goal is to be able to scale it to any size and still have it look clean. The destructive way seems to give me that solution, if I could make it work, unless there is yet another way.

  5. #5
    Marco Riva Marco Riva @zerocinquanta
    *

    Don't know why, I'm unable to see the video.

    Pixelation could be due to some blurring along the mask edge. The more sharp the mask is, the better.
    Maybe you can manually trace the png mask to have a path to use is a destructive (boolean) way, remember in this case to perform Difference on two paths only, time by time. Trying to select all paths and performing Difference on them, bring at unpredictable results.

    Attached, the introduction to boolean operation I've written for my book [ENG].

    Edit: video seen, I confirm not only you are trying to make Difference on too many object, but some of these are Clones, not paths, so they would be ignored in any case.

  6. #6
    Tyler Durden Tyler Durden @TylerDurden
    👍*

    I edited the OP's posts to make the videos attachments, rather than non-functioning embedded images. They now can be downloaded and viewed.

  7. #7
    Marco Riva Marco Riva @zerocinquanta

    Thanks, @TylerDurden !

  8. #8
    mathew.mulligan mathew.mulligan @mathew.mulligan

    Thank you @TylerDurden for the help with the videos. Marco, I cannot find the clones. When I select my texture object, it just says there are 94816 paths.

  9. #9
    Marco Riva Marco Riva @zerocinquanta

    At the very beginning of the video, when you select all, the status bar stated there are clones into the selection. Usually this gives an error, a stop in the operation (my 1.0.2 on Mac crashes, to say one), or some unpredictable results. 

  10. #10
    mathew.mulligan mathew.mulligan @mathew.mulligan

    Got it. I was able to unlink the clones and I removed most of the unneeded paths to help declutter the texture. I tried to do the difference again, but it appears to have the same issue. Only the texture remains and it goes white. What else could I be missing?

    I deleted the previous videos in the post so that I could upload this latest one to show the issue.

  11. #11
    Marco Riva Marco Riva @zerocinquanta
    🏆

    You are performing Difference on multiple objects. Try to Combine all the scratches to make them as a single path. Then perform difference with the path immediately below. To keep the difference works as predicted, it should be applied only on 2 paths at once.

  12. #12
    mathew.mulligan mathew.mulligan @mathew.mulligan

    Thank you so much, @zerocinquanta. That solved it! Here is what I did:

    - I selected all of the nodes for my Texture layer, then I went to Path>Combine, and it made it into one path.

    - I did the same think with the Main and Shadow layer that I had.

    - I duplicated the Texture layer into a separate layer (Texture 2).

    - I made only Texture and Main layer visible, selected both, then went to Path>Difference. That resulted in exactly what I needed.

    - I did the same thing with Texture 2 and Shadow layer.

    - Then I deleted the Texture layers and was left with just the Main and Shadow layer. Exactly what I needed!

    Now, when I try to resize the Main and Shadow, with the Texture layer now Pathed onto them, it results in a clean resolution with no pixelation! Thanks again @zerocinquanta!

  13. #13
    Marco Riva Marco Riva @zerocinquanta

    Very well, my pleasure!

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Issue with masking path-type objects