Invincible strokes/vector bucket- better cell shading tools

Flesh out your ideas for new or improved Inkscape features before submitting a request.
blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Invincible strokes/vector bucket- better cell shading tools

Postby blurymind » Thu Jan 16, 2014 2:22 am

1. Invinzible strokes
This is a feature that toonboom studio has and also Pencil2d has. The idea of invinsible strokes is that they are there to allow you to divide a fill into shades. These strokes do not render. And they dont greate a gap between fills.
Image

Possible implementations:
-Add a "slice" mode to the Eraser tool. That lets you slice up a fill into two separate objects. (after bucket tool use).
Currently the erase mode (cut out from objects) creates a gap between the two cell tones and also generates a bazillion nodes making it unmanageable. Doing it with a normal stroke creates a gap too.
-Add a new tool for this that allows users to create invinsible strokes. (before bucket tool use)

Current problems with the bucket tool:
It has the same problem as a bitmap bucket tool (its rgb based fill) - leaving small areas unfilled because of threshold. So the user has to go and manually correct that. Pencil2d's fill tool does not suffer from that problem. More over it allows you to close gaps by using invinzible strokes. The pen tool has autosnapping on the start and end of strokes you make- to reduce the chance of having a gap.
-Suggestion- add "vector based" fill mode. It fills areas precisely on the vector shapes surrounding the area.

Here is a video i made to illustrate the issue better and to show a workaround:
http://www.youtube.com/watch?v=XeFgXKzCOlQ&feature=youtu.be

The bucket tool fill shapes do not change when you move the strokes. In pencil2d if you move a stroke, the fill underneath it changes as well - fills get glued to strokes.
- Suggested design solution- allow bucket tool to create dynamic fills that are glued to the lines above them, if those lines are normal strokes

Now I am aware of all the complicated workarounds to these problems (alt+d and lots of clipping masks, select same color-->combine, etc etc) This stuff is time consuming and a pain in the ass.
For that reason it makes more sense to cartoonists to use something like pencil2d for quick tasks over inkscape. The same cell shading work takes more time to do in inkscape and is more complicated.
Image
My suggestion is to open pencil2d and play with it's vector tools. See what can inkscape borrow. The tools may look unfinished and less advanced than inkscape- but the fact is that they beat inkscape's in terms of efficiency and speed.
Last edited by blurymind on Sat Feb 01, 2014 9:44 pm, edited 2 times in total.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Invinzible strokes- better cell shading workflow

Postby hulf2012 » Thu Jan 16, 2014 3:18 am

Hello,

I'm just an user like you. I share your observations. Some tasks aren't (or doesn't seem) easy in Inkscape.

I think that the behavior with the erase tool is a good idea. I also don't know why generates so many nodes. Why it's not possible to apply a median to all those nodes to simplyficate them?. In that path of thinking, I also wish to have the option to simplyficate nodes in a selection of them. Also, some times, in any operation, there are nodes overlapped. Maybe it's a lot of work for developers. How feasible are those improvements?

About the example in your last picture, You coul try: combine the three paths, as they use the same style, then apply the cutting path (which i think it gives better results if it is a closed path).
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Thu Jan 16, 2014 8:37 pm

potentially if the division operator could have multiple 0 width strokes cut through one shape, that would be enough.
Now you have to select each one individually and apply.
Also - even at 0 width, the strokes leave a gap between the two cell tones

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Fri Jan 24, 2014 3:00 am

Hi and sorry for the double post.
I only want to add to my initial post idea.

This should definitely be made as a "slice" eraser tool mode. And it can operate on all selected objects or all objects in general.

To add to the reasons we need it!!!
It is not only for cell shading! This will be much needed for using inkscape to create a character library to be animated in other software!
What do I mean by that? Well, for the pipeline of creating 2d animation- and especially in sprites for games- the animators use something like this:
http://www.brashmonkey.com/spriter.htm
http://www.kickstarter.com/projects/539087245/spriter

it is multiplatform and very affordable.

So we need to cut up the body parts of a character in order to use them in spriter the "puppet" rig.
When you have something complicated- as a drawing- you can only imagine how impossible it is right now to sepparate it into different body parts after you draw it.
Inkscape forces you to draw it from scratch with the design that it will be used in body parts- that creates a lot of painful work for the artist and distracts their attention from the actual quality of the sprite.

If you allow us to cut up complex objects (like Flash can do btw), we will be able to use inkscape more in our pipelines.

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

Re: Invinzible strokes- better cell shading workflow

Postby Lazur » Fri Jan 24, 2014 4:02 am

Hi.

That is an impossible mission right now as I see it.
Inkscape's accuracy is below that level, boolean operations are producing the errors.
The cut tool is using subtraction.
To improve on that, maybe the program would need to be rewritten from it's basics.

Another way would be, to rely a bit less on the svg specification, and adding somekind of new rendering routine to the files.
Right now, each object is rendered in the order they appear in the file's codes.
Maybe, if you could describe with each object, what to be rendered, and where to be rendered in the z field, it would make for a better tool at cel shading.
See idea facing the same problem:
http://www.inkscapeforum.com/viewtopic.php?f=5&t=16468

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Wed Jan 29, 2014 8:20 pm

that seems odd.
It is not an SVG format feature request. More like a tool request to manipulate objects.

Do you really need to touch the format specification in order to allow the user to split fills and lines into two halves? :)
What kind of new information do you need to store inside an svg file in order to allow for that??

You say it's impossible, I say fine then. I will continue to use pencil2d and toonboom over inkscape. Because workflow in inkscape kind of sucks without having the ability to simply slice a fill into two halves.

If there was an indie gogo campaign to improve these operations I'd put my money on it.

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Wed Jan 29, 2014 10:49 pm

Workflow in Inkscape is just fine. At least mine is. ,)

And... if you are willing to support, why don`t you support Inkscape developers?

p.s.
What`s wrong with cutting shapes? How comes you see it as time consuming? In comparison to what?

FYI - in Inkscpae, strokes are always centered - meaning, 2px width stroke goes by 1px in and out of the shape`s path. So, why don`t you use plain shapes, w/o stroke(s)? Your idea about the eraser tool is not that popular, not even among Illustrsator users (at least, not among those I know). Eraser tool in vector drawing programs is never precise, but slicer is another story - so, why don`t you create "a slicing path" which just has to be closed into the shape and than used to create new shade (cut, division, exclusion...)?
: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: Invinzible strokes- better cell shading workflow

Postby Lazur » Wed Jan 29, 2014 10:56 pm

That's just my opinion, coming from the user, and not the developer.
Suv may correcct me if that's the other way around.

Spiro-splines are out of the specification but works quite stabile, so it may be possible to add more fill attributes to one path, with cutting edges defined.

I do feel the pain here, and that there would be a need for an improved program with a re-thought concept.
If blender could do, maybe others can too.

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Wed Jan 29, 2014 11:05 pm

And how would that work, with Splines? Should they act like "slicing" tool?
: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: Invinzible strokes- better cell shading workflow

Postby Lazur » Wed Jan 29, 2014 11:59 pm

It was just an example of how non-svg elements can be implemented.
By slicing, as the original post's idea, if implemented as presented would produce more fill attributes for one single object, which, is to my knowledge in svg not supported. Or did I miss something?
But if it was a call for features, or just going with the same idea, what if parts of the object's z-order for rendering could be defined individually? For outlines too.
That option would be totally outside the svg's lines.

For a fast mockup:
Image
Maybe I should have added a new tool icon for that too.

By these slicing lines you could define two fill attributes for each sides, image shows if one fill's attribute panel would be active.

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Thu Jan 30, 2014 1:15 am

I presume Splines should be used in order to avoid creation of too many nodes, right?

One of the most comfortable vector programs, to me, is Sketchbook where Splines are tamable as puppies, but I`m not sure if that would be the best solution for this purpose (OP), nor for Inkscape it self. (at this moment)
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Invinzible strokes- better cell shading workflow

Postby ~suv » Thu Jan 30, 2014 10:36 am

/me didn't read the discussion in this topic in detail - just want to add a quick comment: the gaps mentioned earlier are not due to Inkscape's "imprecise" path operations: these are antialiasing artifacts (and Inkscape is not the only application affected by this). See also:

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Fri Jan 31, 2014 12:44 am

I am really glad that we are finally having a proper discussion about it!

Ideally a "slice" tool would allow the user to split multiple fills, lines or both with a single stroke operation. If I could adjust the smoothing of that split- similar to how the pencil stroke tool works- that would be a wonderful extra to have.

Right now workflow is very slow for illustrators doing cell shaded style and animators who need to slice up a character to get it ready for animation in other software.
My suggestion on the design is to look at both toonboom studio and pencil2d. The two are both also vector based apps, but simply have better tools for this specific workflow need.

here is a suggested ideal design. Now whats possible is up to the developers- which is easier. In my opinion a slice tool would be more valuable. But both would help make work many times faster.
- Slice tool- creates an invincible pencil stroke (has a smoothing value set to 25 by default) with 0 width. On completion of the operation this invincible stroke splits every object is overlaps on the layer it is used into two halves. The smoothing value is used to control the precision vs number of vertices.

-0 width strokes and a bucket fill tool mode that operates like a true vector bucket fill- fills will 100% precision closed areas and doesnt do anything when an area is not closed. It also sees strokes with 0 width as a border.
This will get rid of the need to manually correct gaps that the current bucket fill tool leaves at small corners and other places.
If you are worried that people will have trouble telling if a stroke is closed or not for such an operation, just look at how pencil2d and toonboom (press K- to see outlines only) have solved it. Inkscape already has the same viewing mode and it will be absolutely useful in this case - it is called "outline display mode".

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Fri Jan 31, 2014 4:28 am

^ Could you please indulge my curiosity....

If you can do these operations inside the animation program(s) - why are you doing it in Inkscape?

But, on the other hand - I`m totally with you - they should bring photoshop and illustrator together, Inkscape and GIMP as well. I mean, why would we have to switch from one to another when it all could be in the one spot, right?! Imagine how fast we would be if that happens!
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Fri Jan 31, 2014 5:30 am

my proposal has nothing to do with bitmap editing, so I dont understand your remark about merging gimp with inkscape.
In fact I am saying that inkscape's bucket tool has a bitmap nature- with all of the flaws that come with it!
It uses visible pixels to determine how to make a fill !! Both in pencil2d and toonboom the bucket tool takes advantage of the vector nature and make perfect fills in perfectly closed areas. Inkscape can not even do that without workarounds - it is not taking advantage of it's vector nature!
You have a frigging bitmap bucket inside a vector app and no vector bucket at all.

My need to have this workflow in inkscape is simple- I like inkscape. I think it is very powerful.
But I dont see myself hopping to other vector apps and back only to combine inkscape tools with those of other vector apps.
I see a major flaw in it's workflow - something that slows down production massively. I expose it on the forum.

You dont like it? Well, keep living in a cave my friend. These are basic things that a vector app should be able to do at some point of it's life.
Last edited by blurymind on Fri Jan 31, 2014 5:36 am, edited 1 time in total.

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Fri Jan 31, 2014 5:36 am

Image
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Fri Jan 31, 2014 5:41 am

toonboom is not open source- so i have to boot to windows to use it. Plus it much less powerful than inkscape in terms of graphic effects.
Pencil2d is not designed to be used as a cut out animation app. It's vector tools need work to be usable. I think i mentioned in the first post that is a bit rough around the edges. It's also much less powerful than inkscape in terms of graphic effects.

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Fri Jan 31, 2014 5:49 am

Image
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Invinzible strokes- better cell shading workflow

Postby hulf2012 » Fri Jan 31, 2014 6:42 am

Hello,
I don't want to enter in a dispute with anybody.

The improvement of the erase tool seems a great idea to me.

It will be good if the tool could also work as a knife, dividing a path closed or open. It is not easy for Inkscape to recongize if a path is closed or open, just checking the "Z" option in the "d" attribute?

At this time, the tool generates a gap (of 1 pixel as minimun) in the cutted path, and even worse, it generates a lot of undesired nodes. So
the improvement in velocity it is substracted for the neccesity of erasing the undesired nodes.

You say that a path can be cutted with a boolean operation (and it's true that the boolean operations aren't 100% exact), but, why don't link it with the eraser tool?.

Now, that improvement is factible?. Or it will imply a big use of resources of the developers. Or is possible a workaround?

Greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Invinzible strokes- better cell shading workflow

Postby v1nce » Fri Jan 31, 2014 7:16 am

blurymind wrote:potentially if the division operator could have multiple 0 width strokes cut through one shape, that would be enough.
Now you have to select each one individually and apply.
Also - even at 0 width, the strokes leave a gap between the two cell tones


If you zoom at it does the space grows ? If not, it's more a rendering artifact

[edit] ok too late suv already explained that[/edit]

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Fri Jan 31, 2014 8:29 am

v1nce >
I just realized that you are correct!
It IS a rendering issue in the viewport. The gap does not grow. :)
Unfortunately it is a rendering issue also when you export your image from inkscape (file>export png image). I can see that 1 pixel gap clearly in my exported PNG files.

To add to this problem- you should think big. If we have to manually slice each individual object of a complicated vector drawing with a 0 width stroke- that would create a lot of work indeed (make stroke, select stroke(hard to select since its 0 width) and target, do division operation, rinse and repeat).
You can not currently do a division operation on multiple objects.

so hulf2012 , I am with you on this one. There should be a slice tool. Workarounds are ugly, time consuming, not reliable.
Please think about the potential workflow gains from implementing a proper "slice" tool that doesnt leave ugly gaps,a bazillion vertices, actually splits many objects into two with a single stroke.

And a normal vector bucket damn it. I can currently fake it with a workaround but it is messy.
So many hours wasted in painful cleaning up work because inkscape doesnt have these tools even planned.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Invinzible strokes- better cell shading workflow

Postby v1nce » Fri Jan 31, 2014 10:04 am

blurymind wrote:v1nce >
I just realized that you are correct!
It IS a rendering issue in the viewport. The gap does not grow. :)
Unfortunately it is a rendering issue also when you export your image from inkscape (file>export png image). I can see that 1 pixel gap clearly in my exported PNG files.

As~suv stated it it's the never-ending rendering bug.

blurymind wrote: To add to this problem- you should think big. If we have to manually slice each individual object of a complicated vector drawing with a 0 width stroke- that would create a lot of work indeed (make stroke, select stroke(hard to select since its 0 width) and target, do division operation, rinse and repeat).
You can not currently do a division operation on multiple objects.

so hulf2012 , I am with you on this one. There should be a slice tool. Workarounds are ugly, time consuming, not reliable.
Please think about the potential workflow gains from implementing a proper "slice" tool that doesnt leave ugly gaps,a bazillion vertices, actually splits many objects into two with a single stroke.

In your workflow do you really need to split more than one shape at a time ? (I mean it would/could be better/easier but I don't see any practical application in your drawing)

There will probably never have a splice tool. I mean two shape that share a border. And if that ever happens it will take place after the gradient mesh comes to svg (that is the closest I see as sharing border concept in svg). But there could be a tool that split apart a shape into two other shapes (but the link would be lost)

Another work around could be this one : make stroke, select target, duplicate target,
select stroke and dup target, do an intersection, rinse and repeat

Not much better but it should resolve your aliasing issue because you won't see the whiteboard between A and B because now A will be over B.

blurymind wrote:And a normal vector bucket damn it. I can currently fake it with a workaround but it is messy.
So many hours wasted in painful cleaning up work because inkscape doesnt have these tools even planned.

Yes it sucks. Or not. Some of us use gradient and not only flat colors. So when you got a rounded gradient with transparency over a horizontal gradient and you start to fill an area you may want it to spread over neighbour colors. But neighbour colors don't have a vector defintion that's why the fill goes rgb and why it may lead to bazillions vertices.
Tip : the more you zoom out the less it will generate nodes
But I agree that a paint bucket that stops at object boundaries (instead of color) will be usefull.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Invinzible strokes- better cell shading workflow

Postby v1nce » Fri Jan 31, 2014 10:17 am

blurymind wrote:Hi and sorry for the double post.
I only want to add to my initial post idea.

This should definitely be made as a "slice" eraser tool mode. And it can operate on all selected objects or all objects in general.

To add to the reasons we need it!!!
It is not only for cell shading! This will be much needed for using inkscape to create a character library to be animated in other software!
What do I mean by that? Well, for the pipeline of creating 2d animation- and especially in sprites for games- the animators use something like this:
http://www.brashmonkey.com/spriter.htm
http://www.kickstarter.com/projects/539087245/spriter

it is multiplatform and very affordable.

So we need to cut up the body parts of a character in order to use them in spriter the "puppet" rig.
When you have something complicated- as a drawing- you can only imagine how impossible it is right now to sepparate it into different body parts after you draw it.
Inkscape forces you to draw it from scratch with the design that it will be used in body parts- that creates a lot of painful work for the artist and distracts their attention from the actual quality of the sprite.

If you allow us to cut up complex objects (like Flash can do btw), we will be able to use inkscape more in our pipelines.


It's not about inkscape but maybe you'll find those links interesting
http://dcgi.felk.cvut.cz/home/sykorad/lazybrush.html
http://dcgi.felk.cvut.cz/home/sykorad/

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

Re: Invinzible strokes- better cell shading workflow

Postby Maestral » Fri Jan 31, 2014 10:26 am

^
,) And I thought I was rude mentioning Sketchbook ,)

...or perhaps, LazyBrush works in some other program(s), aside of TVP?!
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

blurymind
Posts: 25
Joined: Wed Jan 09, 2013 10:50 am

Re: Invinzible strokes- better cell shading workflow

Postby blurymind » Fri Jan 31, 2014 10:37 pm

Here is a video I made in order to illustrate an issue with the bucket tool in inkscape that is potentially a low hanging fruit. Inkscape can already do this with a dirty workaround. It is not ideal but it works.
http://www.youtube.com/watch?v=XeFgXKzC ... e=youtu.be

Do you see why a vector based fill is better than an rgb based one? LESS CLEAN UP WORK AFTER IT IS MADE :D

Never say never! Lots of naysayers and trolling replies of posh gentlemen. :lol:
If you can't implement this because as developers you have no idea how, can you at least consider by making this workaround more accessible and automated- as part of the bucket tool?

Illustrator is of course ahead of inkscape- it HAS a slice tool- very much like the one we are requesting over and over in bug reports and threads like this one.
http://help.adobe.com/en_US/illustrator ... bc5f-6452a
Image


Return to “Inkscape Ideas”