Re: [hlcoders] RGB to Half-Life Player Model Color

2002-04-14 Thread Nicemice
Arrr, no I'm passing RGB values from 0 to 255... thx for help, this should be the bug. /me goes color testing. > I assume you got the code from here... > > http://www.cs.rit.edu/~ncs/color/t_convert.html > > ...or somewhere similar. > > Are you passing in RGB values from 0 to 1? (i.e > > fl

Re: [hlcoders] RGB to Half-Life Player Model Color

2002-04-14 Thread botman
> ok, here's my util function: > > void UTIL_RGBtoHSV(float r,float g,float b,float &h,float &s,float &v) > { > float flmin, flmax, fldelta; > flmin = min( r, min (g, b )); > flmax = max( r, max (g, b )); > > v = flmax; // v > fldelta = flmax - flmin; > if( flmax != 0 ) > s = fldelta

Re: [hlcoders] RGB to Half-Life Player Model Color

2002-04-14 Thread Nicemice
ok, here's my util function: void UTIL_RGBtoHSV(float r,float g,float b,float &h,float &s,float &v) { float flmin, flmax, fldelta; flmin = min( r, min (g, b )); flmax = max( r, max (g, b )); v = flmax; // v fldelta = flmax - flmin; if( flmax != 0 ) s = fldelta / flmax; // s else

Re: [hlcoders] RGB to Half-Life Player Model Color

2002-04-14 Thread botman
> Sure, hue is the first value of HSV, and I'am only using this one when > setting the top and bottom color, but the color isn't right either. Perhaps you aren't doing something right. Show some code. Jeffrey "botman" Broome ___ To unsubscribe, edit y

Re: [hlcoders] RGB to Half-Life Player Model Color

2002-04-14 Thread Nicemice
e of the palette entries, > just replacing the hue with the specified value. > > -Original Message- > From: Nicemice [mailto:[EMAIL PROTECTED]] > Sent: Friday, April 12, 2002 7:54 AM > To: [EMAIL PROTECTED] > Subject: [hlcoders] RGB to Half-Life Player Model Color > > &g

Re: [hlcoders] RGB to Half-Life Player Model Color

2002-04-13 Thread Tom
I _think_ there is a windows function to convert it, RGB(red,green,blue); - Original Message - From: "Ken Birdwell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 11:56 PM Subject: RE: [hlcoders] RGB to Half-Life Player Model Color >

RE: [hlcoders] RGB to Half-Life Player Model Color

2002-04-12 Thread Ken Birdwell
, 2002 7:54 AM To: [EMAIL PROTECTED] Subject: [hlcoders] RGB to Half-Life Player Model Color Hi, I want to set the player model colors from the mod code. It's a team based based mod an the level designer can choose the color of the teams via an entity. Now I need a function which give m

[hlcoders] RGB to Half-Life Player Model Color

2002-04-12 Thread Nicemice
Hi, I want to set the player model colors from the mod code. It's a team based based mod an the level designer can choose the color of the teams via an entity. Now I need a function which give me the correct top/bottom color values from my r,g,b value. I first thought Valve uses a HSV Color table