King of the Hue Contest


Inspired by the repeated discussions about hueing and blending colors that have been created over the years, and all the awesome solutions that I’ve seen and read, I want to form a compendium of what’s been done already, and coax new information from those that haven’t explained their techniques.

Hence The King of the Hue.

Submit a (more or less) detailed description of what technique(s) you use and/or have used for hue shifting and changing texture colors.

The rules are simple. PM to me a link to an article or forum/blog post you or a someone else has written on the subject, or write something up and PM it to me. The more in-depth the better, but as long as it is clear, that’s all that matters. (and please see the ‘Other Rules’ below)

Once we get enough entries, I’ll write up a synopsis for each and put it up to a community vote.

The winning articles will get a prize (TBD, at least a tshirt but hopefully better).

I’ll be accepting entries until the end of January (but I’ll likely extend it into February).

Please ask any questions in this thread and get those submissions together!

Other rules:
-If you are not the original author of a winning article (and the original author doesn’t enter), or you refer a winning author, you’ll win a TShirt.
-If you refer the winning author but he enters of his own accord, you’re out of luck. Make sure if you refer someone they mention they are being referred.
-If you are going to make multiple referral entries, please pick only one as eligible for a prize. If multiple people refer, the first one wins.
-Prizes are TBD. I will try to get some OK ones. For winners not in the US, we’ll figure out a comparable virtual prize.
-The community will vote on the winning article(s) but prizes will be awarded at my discretion- if you have a better way to handle the issue of original and nonoriginal work being part of the same contest, please give me a holler.

Looking forward to leech valuable information from this :slight_smile:

Hmm I’m not sure I get it completely, is this a shader contest where we shift colors and blend through various techniques (such as uncharted 2 did with vertex colors tinting and blend maps) or is it more of a offline method done in photoshop?

Ah goody, i’ll get digging then. :slight_smile:

After a tip from a colleague I am off to digest this:

http://www.graficaobscura.com/matrix/index.html

It is geared towards procedural color alteration. The simplest version would be something like a shader with a color parameter that multiplies into the diffuse. More complex versions could have specially authored maps, complex shaders, procedural content files in xml, etc.

On RIFT we started with a scheme of texture-based gradients that would be indexed on grayscale and mixed back into the base texture color. I don’t know who came up with that, but I replaced it with analytical transforms, including (for the character skin areas) an HSV scheme, which assumed a constant base “skin” color, used by our artists as a sort of chromatic “center” to their painting (to be fair, the color came second, based on the first few rounds of texture painting).

When a player selects a new skin color, that color’s HSV values are compared against the “reference” skin HSV. A non-linear transform is calculated that rotates the hue and determines gamma exponents that will alter the reference saturation and values to hit those chosen by the player. This transform is applied to the entire diffuse texture’ skin areas, so that variance in skin tone (warm/cool etc) can be maintained and we get fairly-reasonable results for both very pale and fairly dark user-selected skin tones over a wide range (not just human-like tones, either – some player characters are blue or green or other colors).

This also had to have a non-HSV fallback (much simpler), using the same art assets, for players with low-end GPUs.

I can’t post pics at the moment but if you have a beta key you can try it out now :slight_smile:

(not really needing a prize, just thought I’d share what we do – the saturation/value shifts are, I believe, novel)

Egads! Those sound like both of the techniques I came up with at BWA. The texture-based gradients we had to throw out because of the dependent texture reads. I replaced it with the same sort of HSL (we used HSL instead of HSV, not out of any reason in particular IIRC) work. I’d be interested in hearing more details, including workflow/pipeline aspects.

I made a color matrix transform tool for Fusion that exactly duplicates the UI and functionality of the UV and Object transforms. Basically it lets you transform RGB as if it were UVW or XYZ. So you could transform UVW coordinates and apply the inverse of that transform to an RGB lookup texture so your resulting textures were unchanged in the render. Or you could apply 3D transforms to a worldspace intersection map or a 3D displacement map.

http://www.anatomicaltravel.com/research/2009/10/color-matrix-transform/

It’s also useful for RGB normalization. Just find the min/max of R,G,B in a sequence (we have tools for that too) and it will whitebalance your footage.

Also useful for directly matching 3D histograms together manually, like when you are trying to match the left and right eyes of stereoscopic footage.

We have a matching Cg shader too, so you can apply the effect in a shader directly instead of just on an image. Same UI, so you can copy/paste the parameters between them.

Excellent! Gimme MOAR!

Hey guys,

Just a warning, this is SO simple I feel silly posting it, but I will anyways since I use it all the time. The most common method I use for shifting colors is to just change the object color in max, and lower the effect of the diffuse. In doing so, you can mix shades using the same texture, and get a wider variety of “looks” for no extra cost.

great! thanks!

BTW RIFT is now shipping so everyone is free to try it out and tell me if the results on skin hues suck or not :stuck_out_tongue:

Hi Guys

Quite a tech noob here…:wink:
But I 've found thismassively useful and simple for dealing with the Hue thing…
Cheers

Sorry for the necropost, but this was too fun not to share.

math wise its :

V = Initial color
K = white point (1,1,1)
T = Theta… angle in radians or whatever your system feels like using

Final_color = v * cos(T) + (k cross v) * sin(T) + k(k dot v)*(1-cos(t)

Works amazingly with no matrix construction or textures needed.

Formula is this http://en.wikipedia.org/wiki/Rodrigues'_rotation_formula

And I totally swiped the idea to put together an implementation for Unity surface shaders. :smiley: