Impossible to simulate a pen/marker

Discuss features and report problems with BlackInk
inventor
 
Posts: 7
Joined: 08 Oct 2015, 13:05

Impossible to simulate a pen/marker

Postby inventor » 11 Oct 2015, 15:46

Hi,
I wanted to simulate a pen/marker (other than a brush) but I found out that this is impossible because when drawing, a thin start is always embedded in the brush behavior and cannot be isolated or removed as a node. I removed all nodes, then added pressure -> sub 0.5 only to size in order to control the thickness and also adapt my digitizer and the result is what you see bellow on the screenshot:

Image

inventor
 
Posts: 7
Joined: 08 Oct 2015, 13:05

Re: Impossible to simulate a pen/marker

Postby inventor » 11 Oct 2015, 16:45

To be fair, a pen/marker CAN be simulated if you just want same thickness lines eg by using the "Single line default" brush and adjust the width in pixels. But as soon as you add the pressure parameter to control the thickness while you draw, the thin-start embedded behavior kicks in. You can see this even in the "Simple flat pen default" brush -flat pens or brushes do not start thin.
I also noticed that a simple dot is also impossible (if you add the pressure parameter) as the thin-start algorithm seems to work with the distance from the initial point, so at that point the stroke is so thin, that it doesn't even draw unless you move away from that point.

I hope the talented developers of BLACK INK will isolate this behavior and will make it optional like all other nodes as the limitation is quite serious IMO.

User avatar
maninmachine
 
Posts: 132
Joined: 28 Sep 2013, 06:20

Re: Impossible to simulate a pen/marker

Postby maninmachine » 11 Oct 2015, 17:20

You'd like a stroke that has control over some slight variation in size to simulate a pen/marker, right? (I'm thinking as opposed to a brush that could go from very small to very large.)

The size controller output is truncated between 0 and 1. Whenever the function reads less than zero, the output is set to 0; whenever the function reads greater than 1, the output is set to 1. The final stroke size is then scaled by what lower/upper limit you have in the shape->size presets.

If the size controller has simple pressure input then no pressure equals the lower limit preset, and the max pressure for your tablet+digitizer equals the upper limit preset. This is not really practical in common application, so that's why the standard brushes usually have some kind of power easing and smoothing (to keep you from mashing on your tablet).

When you subtract 0.5 from pressure then the digitizer will only register in the top half of its range, and only output as if in the lower half of the size presets; if you subtract pressure from 0.5 you get the same result, just inverted (only 0 to 0.5, and more pressure equals smaller output).

I think you can quickly get the result you're looking for by starting with the "simple round pen". Set your lower size preset to 3 and the upper size preset to 5. That should do it! You could then copy the size behavior scheme to whatever brush you're creating, and use the same size presets.

(Edit: I think you posted while this was being written, I'll go back and adjust.)

User avatar
maninmachine
 
Posts: 132
Joined: 28 Sep 2013, 06:20

Re: Impossible to simulate a pen/marker

Postby maninmachine » 11 Oct 2015, 17:31

Ok, two things to add.

1. There is a smoothness feature that was added recently that corrects stroke paths to smooth them out. This is based on the distance drawn and smoothness percentage, and might be effecting your stroke when it's really short. Try setting the smoothness to 0% and see if that helps the drawn line to appear sooner (it should immediately). They could add some expanded preferences later to adjust for things like this.

2. You can add an add node to the pressure with some small value to prevent the actual size from ever being 0 even if the preset is set to 0. This will make other settings a little confusing, though.

inventor
 
Posts: 7
Joined: 08 Oct 2015, 13:05

Re: Impossible to simulate a pen/marker

Postby inventor » 11 Oct 2015, 19:02

maninmachine wrote:You'd like a stroke that has control over some slight variation in size to simulate a pen/marker, right? (I'm thinking as opposed to a brush that could go from very small to very large.)


Not really, I just don't like the arbitrary thin-start element on all lines and the unintended asymmetrical look that occurs. I'd like to be able to draw simple lines that start and end the same way with the strokes looking more marker-like, than brush-like, while I still have control over their width (as in most other applications -I'm not asking something exotic).

I subbed 0.5 since my digitizer reaches 0.5 with feather pressure -it virtually starts from there (I have adjusted it to light feel). With Pressure->Ease Power->Ease Cubic the output dynamic range and feel is very good. I added the sub 0.5 instead of those nodes in order to isolate the problem.

Thanks for the suggestions, I tried them but they don't work. It is 100% certain that the problem is due to a specific thin-start function that increases output from the initial point to some distance as I said. This behavior even appears with the mouse.
I made the previous lines in the image as well as the ones bellow keeping the pressure constant from the starting point to the end of the line, so there is no other explanation for this result.

Even limiting the output thickness between 3 and 5 pixels, the strokes become asymmetrical and ugly as soon as you start increasing the pressure:

Image

Since this software is still in beta, I provided my feedback to help make it a better software.
I think this problem is too fundamental to ignore.

User avatar
maninmachine
 
Posts: 132
Joined: 28 Sep 2013, 06:20

Re: Impossible to simulate a pen/marker

Postby maninmachine » 11 Oct 2015, 19:49

Ok, I see what you're saying. The power easing if it has an "in" component is causing this to happen, and smoothing is causing it to happen as well. In the instant the stylus touches the pressure is close to zero and starts drawing at the low end of the size range, then any type of smoothing carries it into the stroke. I'm surprised to see this in the stroke smoothness option (z+mouse) because I thought it only controlled the path. In the examples below I tried to maintain pressure - low, medium, high, with a momentary pause at the start to make sure it was reading. Only the bottom left seems to give what you want (smoothness at 0, direct pressure only), but then you don't get path smoothing. Something not shown that worked was adding a length (top) and 0.07 (bottom) -> step to opacity. It's cheating by chopping that very small segment off. That could be multiplied by any other opacity functions, but it's a weird fix for sure. I'm curious about what they recommend, glad you brought it up. :)

smallstarttest.jpg
smallstarttest.jpg (24.81 KiB) Viewed 10585 times

User avatar
u2bleank
 
Posts: 1182
Joined: 11 Jun 2012, 10:41

Re: Impossible to simulate a pen/marker

Postby u2bleank » 12 Oct 2015, 13:09

Interesting thread.

The pressure returned by the API isn't 0 when you start a stroke but it's never 1 neither ( With a wacom it take some time to have the full pressure which is quiet logic in fact ). Moreover if you use a Brush with smoothing like Simple Round pen this behavior is amplified because the smooth operator will start with low pressure and then propagate this value further in time.

So a workaround is to take into account the time ( or the stroke length ) to add some kind of artificial pressure at the beginning.
Here an example of how I did it :
Image

Image

Tell me if it's what you want to achieve

( below the brush )
Attachments
Simple round test attack.bkbrush
(6.96 KiB) Downloaded 633 times

inventor
 
Posts: 7
Joined: 08 Oct 2015, 13:05

Re: Impossible to simulate a pen/marker

Postby inventor » 13 Oct 2015, 17:57

u2bleank wrote:So a workaround is to take into account the time ( or the stroke length ) to add some kind of artificial pressure at the beginning. Here an example of how I did it.

This is a static solution to a dynamic problem:
(different pressure dots and straight lines by using your brush)
Image

and here is what i get in another software:
Image
(I omitted the dots as that brush was mimicking ink dispersion)

u2bleank wrote:The pressure returned by the API isn't 0 when you start a stroke but it's never 1 neither ( With a wacom it take some time to have the full pressure which is quiet logic in fact ).
Moreover if you use a Brush with smoothing like Simple Round pen this behavior is amplified because the smooth operator will start with low pressure and then propagate this value further in time.

Since a significant percentage of smoothing is always required, improving the smoothing function alone, most likely would solve this.
So why not separate the pressure smoothing from the path smoothing and provide the option to adjust them separately? If you have both of them enabled and adjusted to some percentage, you'll get the current behavior. If you minimize or disable the pressure smoothing, you 'll get path smoothing and "standard" start -without gradually reaching the desired thickness.

User avatar
u2bleank
 
Posts: 1182
Joined: 11 Jun 2012, 10:41

Re: Impossible to simulate a pen/marker

Postby u2bleank » 14 Oct 2015, 08:17

Since a significant percentage of smoothing is always required, improving the smoothing function alone, most likely would solve this.
So why not separate the pressure smoothing from the path smoothing and provide the option to adjust them separately? If you have both of them enabled and adjusted to some percentage, you'll get the current behavior. If you minimize or disable the pressure smoothing, you 'll get path smoothing and "standard" start -without gradually reaching the desired thickness.


Great idea :up: . You're right we will do something like that for the next release.
Thanks for your feedback


Return to Technical support

cron