Game Development Community

Changing Hue problem...

by amaranthia · in Torque Game Builder · 04/29/2008 (11:46 pm) · 3 replies

I've got a little problem...

In my game, I have a light blue machine. I need to be able to change this machine light pink or light yellow. However, when I import a graphic into TGB, rgb for the object always starts at 1,1,1. When I change blue to 0, it makes the machine dark pink (I need light pink).

In PhotoShop, I can change hue without losing brightness. Is there a way to change hue in TGB without losing brightness?

#1
05/01/2008 (2:12 pm)
Have your graphics be white/grayscale, then tint it to blue/pink as needed?
#2
05/03/2008 (3:14 pm)
Amaranthia,

Kalle hit the nail on the head. If you want to be able to have any color in TGB, then you need to make the image white (or as though it had RGB all set to 1 in Photoshop)

You should also note that the color picker in the level builder is very flawed. Only the purple has any kind of luminosity change. To make a long story short, convert RGB values from Photoshop into a 0 - 1 scale, and you'll get the color you want. There was actually a color picker for Torque floating around the blogs somewhere -- I'll try and find it.

EDIT:

Here it is:
www.garagegames.com/blogs/36126/14593

Taras did a good job with it. ;)
#3
05/07/2008 (5:42 am)
I just submitted a resource with sample torquescript for converting between RGB and HSV colors, including a simple rotateHue() function:

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=14705