Game Development Community

Hue/Saturation Manipulation in TGB?

by Brian Wilson · in Torque Game Builder · 05/09/2008 (9:14 am) · 3 replies

I've dug around a bit but can't find a script method/function for dynamically manipulating the Hue/Saturation/Lightness of a sprite. Did I miss something somewhere?

#1
05/17/2008 (1:46 pm)
Hi Brain:

There are four fields for RGBA in the TGB editor under the Blending tab under Edit including the Source factor and Destination factor. The "Hue/Saturation/Lightness of a sprite" is directly related to the RGBA and these factors. To dynamically manipulate these fields, use torquescript.

Good luck
Carpenter Software
#2
06/07/2008 (11:52 pm)
Brian - here are some functions I wrote for working with HSV values:

http://www.garagegames.com/blogs/88388/14705
#3
06/07/2008 (11:55 pm)
*Conor

Thanks, I actually ended up finding your code the same day I made the post. I ended up doing what I needed to do by manipulating RGB rather than HSV, but your code was nice to play with none-the-less. Thanks for the resource.