Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


how does the colour brush in paintshop pro work?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 rouncer   Members   -  Reputation: 291

Like
0Likes
Like

Posted 28 February 2013 - 11:09 AM

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, 28 February 2013 - 12:01 PM.


Sponsor:

#2 Krypt0n   Crossbones+   -  Reputation: 2600

Like
2Likes
Like

Posted 28 February 2013 - 12:38 PM

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).



#3 rouncer   Members   -  Reputation: 291

Like
0Likes
Like

Posted 28 February 2013 - 12:49 PM

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, 28 February 2013 - 12:51 PM.


#4 swiftcoder   Senior Moderators   -  Reputation: 10234

Like
1Likes
Like

Posted 28 February 2013 - 02:01 PM

yeh def. not rgb space

RGB is a really poor space for just about every sort of calculation :)


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS