How Do I cut lines into a shape?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
skygazer
Posts: 19
Joined: Tue Aug 16, 2016 4:59 pm

How Do I cut lines into a shape?

Post by skygazer »

Hi there!

I'm struggling with simply cutting lines into a shape. I know how to erase by hand with the tool or cut a whole, but I just don't know how to cut a straight line from one end to the other. You know, like adidas stripes in the logo.
Hope this picture explains it and is simplified, because of course I would be able to work around some simple squares :D
The right shows how it should look like

Seems like I'm to stupid adding a preview here with an image

https://imgur.com/a/vvxJSl7
Image
User avatar
hayasidist
Posts: 3831
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: How Do I cut lines into a shape?

Post by hayasidist »

many ways (as is usual with Moho) - each with its own benefits depending on exactly how you're going to use the result.

if they're on the same layer - select all the points in your green and red shapes then, with the Select Points tool still active, push the "Weld Crossings" button. Now you can delete the bits of the red that hang over the edges (use the Delete Edge tool); then delete the fills and strokes (use the Delete Shape tool - that one's icon looks like a hollow X); then select one by one the groups of points that make up the residual rectangles and use the Create Shape tool

OR:

just draw 3 rectangles

OR:

use masking e.g.
Group - masking reveal all
> green rectangle - mask this layer
> red rectangles - subtract from mask
skygazer
Posts: 19
Joined: Tue Aug 16, 2016 4:59 pm

Re: How Do I cut lines into a shape?

Post by skygazer »

Don't think that really works on a komplex design and the masking also didnt work

I need this for more complex stuff like hair or faces
https://imgur.com/a/REcXqGK
User avatar
Maestral
Posts: 584
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: How Do I cut lines into a shape?

Post by Maestral »

It seems like you're making some sort of an effect with red rectangles.
If masking does not work - could it be done outside Moho, in a video editor (i.e.), on exported character's layer (png image sequence)?
User avatar
hayasidist
Posts: 3831
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: How Do I cut lines into a shape?

Post by hayasidist »

dunno why you couldn't get masking to work... this hack shows how to do it: https://www.mediafire.com/file/gepe99ma ... r.zip/file
there are two files in the .zip -- a PSD grabbed form your "complex" upload and a .moho - I've guessed the shape of the green behind the red bars - it's untidy and it'll be wrong, but the result is good enough to demonstrate the principle. And, even though they're image layers the same principle holds for vectors..

or - as Maestral suggests - chromakey out the red (or any other more appropriate colour) bars in post
User avatar
MrMiracle77
Posts: 189
Joined: Mon Jun 24, 2019 2:30 am

Re: How Do I cut lines into a shape?

Post by MrMiracle77 »

If you've already drawn the shape, you can add lines by connecting a new line from one side of the shape to the other, then using the fill tool on the new line with only 'Lines' selected in the tool options at the top. The limitation of this is that the new line and the original outline will have to use matching colors and baseline widths.

Another option, if your lines are really complex, is to create a stripe texture with a transparent background. You can even do this with moho. Draw your stripes, export as a png, then import using your fill options.

It's worth learning 'hide all' masks for this purpose, though.
- Dave

(As Your GM)
skygazer
Posts: 19
Joined: Tue Aug 16, 2016 4:59 pm

Re: How Do I cut lines into a shape?

Post by skygazer »

Thx guys!
@hayasidist that file really helped. I use most of the time Anime Studio 11, cause so far I haven't been a fan of MOHO13. I did the exact same masking you used in the file zipped and in AS11 it doesn't work, in MOHO13 it's all fine
User avatar
slowtiger
Posts: 6237
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: How Do I cut lines into a shape?

Post by slowtiger »

Unfortunately Moho doesn't have boolean operations for cutting parts out of shapes. Some workarounds I have used:

- do this part in Illustrator of Affinity Designer and import as SVG (as long as it's only one shape this is OK)
- create a guide layer with a sketch first, then on a new layer build this shape from discrete shapes, select all and create fill.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
User avatar
Greenlaw
Posts: 10383
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How Do I cut lines into a shape?

Post by Greenlaw »

skygazer wrote: Tue Oct 12, 2021 9:20 am I'm struggling with simply cutting lines into a shape. I know how to erase by hand with the tool or cut a whole, but I just don't know how to cut a straight line from one end to the other. You know, like adidas stripes in the logo.
Moho has a handy feature called Weld Crossings, which allows you to slice up vectors. You can also merge shapes to create inverted spaces, much like how boolean tools work in a 3D modeling program.

Here's an example of using weld crossings to create an 'adidas' logo.

First, let's make the leaf shape...

1. Draw an ellipse using the circle tool.
2. Peak the top and bottom points.
3. Duplicate and position the shapes.
4. Use the flip shape button for the third shape.

Image

Next...

1 Draw three rectangles where you want to cut out the stripes.
2. Kill the shapes so you only have the paths.
3. Select all the points and use Weld Crossings.
4. Use the Delete Edge tool to clean up the result.
5. Create the shapes and you're done.

Image

Note that it's not necessary to remove all ''unnecessary' edges and points. If fact, in some situations, keeping the extra points and curves outside of the shapes makes it easier to maintain the shapes during animation or makes it easier to edit when you need to. So long as there are no shapes or strokes applied to those segments, they won't render anyway.

Alternatively, you can use the merged shapes trick to subtract the stripes from the leaf. This is essentially a boolean trick, and you can find threads about this topic elsewhere in these forums. (Sorry, I would show an example but I have to work.)

Hope this helps.
Last edited by Greenlaw on Tue Oct 12, 2021 5:58 pm, edited 3 times in total.
User avatar
synthsin75
Posts: 10253
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How Do I cut lines into a shape?

Post by synthsin75 »

Remember, mask results may not display correctly in the workspace. Render a frame to verify.
User avatar
Greenlaw
Posts: 10383
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How Do I cut lines into a shape?

Post by Greenlaw »

Here's how to do this using the masking technique other users described above...

1. Draw the leaf in a layer.

Image

2. Draw the rectangles in another layer beneath the leaf layer.

Image

3. Group and apply this mask setting for the rectangles layer.

Image
4. Done

Image

BTW, I just realized that the shape merging trick I mentioned earlier would involve a bit of masking too, so use this method instead; it's easier.

Between this method and the Weld Crossings method, which is better? It really depends on how you intend to animate it.
Last edited by Greenlaw on Wed Oct 13, 2021 4:58 pm, edited 1 time in total.
skygazer
Posts: 19
Joined: Tue Aug 16, 2016 4:59 pm

Re: How Do I cut lines into a shape?

Post by skygazer »

Thanks a lot for this detailed tutorial!
Have a great day :)
User avatar
Hoptoad
Posts: 716
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: How Do I cut lines into a shape?

Post by Hoptoad »

Greenlaw wrote: Tue Oct 12, 2021 5:48 pm Moho has a handy feature called Weld Crossings, which allows you to slice up vectors.
I didn't know about Weld Crossings. That is a feature I could've used a time or two, and the results would've look better than my work-around. Thanks for the excellent tutorial with illustrations.
User avatar
Greenlaw
Posts: 10383
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How Do I cut lines into a shape?

Post by Greenlaw »

Glad you found that helpful!

I should explain the following step better since, as of 13.5, we now have two ways to do this...
Greenlaw wrote: Tue Oct 12, 2021 5:48 pm 2. Kill the shapes so you only have the paths.
Method #1 (the 'old' way): Select the Delete Shape tool and 'scribble' (drag) over all the shapes you wish to delete.

Method #2 (in 13.5.x): Select the Select Shape tool, click on the new Select All button and press the delete key.

Method #2 is much quicker when you have a lot of shapes in the layer. Note that the Select All button is also useful for changing any properties for all the shapes in a layer, like stroke thickness, color, etc., all at once. This tool is also useful when editing the overall look of a custom mesh.

Method #1 is still useful when you really just want to kill a few specific shapes in the layer. It's also the only option available in previous versions of Moho.
Post Reply