Page 1 of 1

Question about GDBLTFAST_COLORIZE

PostPosted: Jul 15, 2003 @ 1:20pm
by ppcStudios
I have an animated selection cursor (you know, a spinning box that shows what unit is selected) that has 2 colors - black and the basic color of the playerside.

I created the basic cursor using 2 colors - black and grey (128,128,128) with a transparent color of magenta, and figured I would use GDBLTFAST_COLORIZE to alter the color of grey to the current playerside color (white, yellow, orange, red, green, dark blue, light blue or remain grey), but I find that trying to colorize to white doesn't alter the cursor color at all, and colorizing to yellow simply presents a 'muddy' yellow color.

I tried adjusting the dwColorizeOpacity value, but I see no effect beyond a value of 128 (probably due to the value for my base color grey).

My guess is that the problem revolves around my selection of a base color (in this case grey (128, 128, 128), resulting in problems blending to colors lighter than that - white or yellow. I tried using a ligher base color, but found that darker colors were being washed out.

What base color should I be using for colorization? I thought the mid-range grey would be perfect for this, but it seems I was wrong. Is there some combination of base color/colorization opacity that gives the best results?

I'll keep playing with the combo to try and find something that works well with all colors, but if anyone knows offhand it would be greaty appreciated. :D

PostPosted: Jul 15, 2003 @ 1:42pm
by ppcStudios

PostPosted: Jul 15, 2003 @ 2:56pm
by Johan

PostPosted: Jul 15, 2003 @ 3:34pm
by ppcStudios

PostPosted: Jul 15, 2003 @ 4:07pm
by Johan
Actually, the colorize function of GapiDraw is quite advanced and works in the HSV color space. I'll add some pictures to the documentation to show how they all work...

Image

Basically what's white will stay white when colorizing. If you want white to change color hue you want a color overlay filter, something GapiDraw does not support.

PostPosted: Jul 15, 2003 @ 4:22pm
by ppcStudios
Yep, I understood that white and black will remain unchanged, but shouldn't the other colors blend according to the dwColorizeOpacity setting? Shouldn't 255 equal essentially no blend with the dwColorizeColor being blitted for everything other than white and black? I'm not seeing that - I'm seeing the blend get no stronger than 50% (at least with the colors I'm using).

PostPosted: Jul 15, 2003 @ 10:51pm
by Johan

PostPosted: Jul 16, 2003 @ 12:08am
by ppcStudios

PostPosted: Nov 13, 2003 @ 6:48pm
by okku

PostPosted: Nov 13, 2003 @ 10:27pm
by Johan

PostPosted: Nov 14, 2003 @ 9:40am
by okku

PostPosted: Nov 14, 2003 @ 10:01am
by Johan

PostPosted: Nov 15, 2003 @ 11:16pm
by InexorableTash