Page 1 of 2

paintbrush

PostPosted: 07 Mar 2017, 02:47
by maninmachine
Congratulations on the recent update! The amount of work put into it is astounding.

Here's a simple paintbrush made by swapping the color mixing from Smudge Colored to Smudge Rake (wasn't quite the same). Added a distance factor, so the applied color diminishes over time but it still smudges. Emulates oil painting? Changed the name of color alpha to Load (like loading paint).

It needs another slider added to change the rate at which the load decreases.

Will add and upload sample after I get a chance to use it. :p

Thank you for all your hard work!!

:bug: bsl extension is not allowed in post attachments

Image

Re: paintbrush

PostPosted: 08 Mar 2017, 09:21
by u2bleank
Great !
It's nice to see user customization ;)

Re: paintbrush

PostPosted: 09 Mar 2017, 08:11
by maninmachine
:draw: some changes

Re: paintbrush

PostPosted: 16 Mar 2017, 01:39
by maninmachine
Is there a way for color "auto picking" to apply to final location? (sweet feature, btw) Would like to pull color from canvas per stroke.


render test:

Re: paintbrush

PostPosted: 16 Mar 2017, 09:49
by u2bleank
Is there a way for color "auto picking" to apply to final location?


:? Hum I dont see what you mean.
the Auto picking will get the "Merged" color ( the color you see on the screen ) at the start of the Stroke.
If I understand you want an option to retrieve the color at the end of the stroke... but it's not possible to know this color before you finalize your stroke... Can you give me more detail on what you want to achieve.

Re: paintbrush

PostPosted: 17 Mar 2017, 02:50
by maninmachine
You've got it. :up: Really, I was wondering if the end of a stroke could be treated as an event that can update parameters. In this case it would be color; at stroke end set new color to last merged color. Also, if no color was preset, brushing the canvas or a palette would pick up some color. Mixing on screen would be easier.

We could use it to have gradual effects, too. "Load" in this brush, for instance. At stroke end, read stroke length, diminish load percentage accordingly. Clamp percentage set this way to a minimal value to simulate amount of paint the brush might typically carry from the canvas.

Randomizing effects could be great when using textures (or bristle density in this one) if you don't want a stenciled look between strokes.

Re: paintbrush

PostPosted: 20 Mar 2017, 17:35
by u2bleank
Really, I was wondering if the end of a stroke could be treated as an event that can update parameters. In this case it would be color; at stroke end set new color to last merged color.


Ok I see. But it's seems to me introducing a complex system to achieve somehting to can be made with the EyeDropper or the AutoPicking.


Also, if no color was preset, brushing the canvas or a palette would pick up some color. Mixing on screen would be easier.


You can do that with a BSL which look like that :

Code: Select all
globals{
   float4 colorVoid ;
}

float4 main( idatas i){
   float4 c = i.color ;
   c = lerp( colorVoid, c, saturate(10*c.a) );
   return c ;
}



We could use it to have gradual effects, too. "Load" in this brush, for instance. At stroke end, read stroke length, diminish load percentage accordingly. Clamp percentage set this way to a minimal value to simulate amount of paint the brush might typically carry from the canvas.


it's also already possible with something like this :


Code: Select all
float4 main( idatas i){
   float4 c = lerp( i.color, i.color*float4(1,1,1,0), saturate(0.005*toDrawSpace(i.dist)) );
   return c ;
}


Randomizing effects could be great when using textures (or bristle density in this one) if you don't want a stenciled look between strokes.


I often use the i.nbUserStroke as a seed for your Random effect to have each stroke unique.

Re: paintbrush

PostPosted: 21 Mar 2017, 23:43
by maninmachine
The mixing effects would be different if successive strokes don't overlap, though. I tried to illustrate the difference below using two strokes that start as red, run through first blue, then yellow.

Image

Re: paintbrush

PostPosted: 22 Mar 2017, 09:16
by u2bleank
Ok +1 for the request ;)

Re: paintbrush

PostPosted: 22 Mar 2017, 10:23
by bonnie
Hey Mim :)

What purpose do you have with this idea?
Do you have a concrete example?
:?: