• Advertisement
Sign in to follow this  

how does the colour brush in paintshop pro work?

This topic is 1787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive used gimp, and im pretty sure I know how the brush works in gimp.   newcolour=originalcolour(r,g,b )*(1.0f-brushpower)+brushcolour(r,g,b )*brushcolour.

But paintshop pro is different... and better, I want to code the brush in paintshop pro, but I have no idea except what I want it to look like.


Heres a picture of the brush at 1% opacity, and paintshop pro really nails it better than gimp and my program.
The strokes are exactly the same colour!!!

brushex.png


so what could be the secret to getting the brush to look like this?

I tried working the brush with hsl instead of rgb, but it didnt seem to get the effect...

Edited by rouncer

Share this post


Link to post
Share on other sites
Advertisement

I could imagin the drawing is done in linear space, while yours and gimps blending works in srgb space.

 

another point might be the internal precision, especially when you blend a lot of layers on top, the quality loss due to rounding can be quite noticeable, having 16bit internal precision can be quite beneficial.

 

(newer CPUs have instructions to convert float16 to float32  aka half to float, this could speed your rendering up).

Share this post


Link to post
Share on other sites

brushes aint brushes.

 

i think ive got it!

 

you do use hsl instead of rgb, treat black as saturation 1, not 0.   then interpolate saturation 3 times the speed of brightness and just clamp the hue. (the real version would need to interpolate hue, will get to that later)

 

brushex2.png

 
its similar... anyway.    yeh def. not rgb space.
 
im very pleased, skin comes out really well out of black in psp, now i can try it in my program.  Precision isnt important i dont think im pretty sure psp is only 8 bit, 8 bit precision ends up distorting the colours a bit and i actually prefer it that way funnily enough. :)
Edited by rouncer

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement