Basic nodes: gamma correction on foreground image only, not background

I have a character being rendered over a flat colour transparent background for use in an article of the same page colour. As the character has fur with alpha ends on the hairs, the background colour is important even though it is transparent, to prevent an antialiasing halo around the hairs.

I am using a gamma node to tweak the lighting. I notice this also affects the background colour, and I don’t want it to.

I can see the nodes have an alpha pass (good) and there is a colour input (RGBA) looking lik a colour picker but which unfortunately does not seem to allow me the luxury of choosing the colour by hex number.

…how do I wire the nodes so the background colour is the same as my original world colour, and not the gamma node corrected one?

Set the before color darker so the gamma node corrected one comes out to what your original was?

No, that won’t give me the ability to reshape the gamma and would also be very difficult to hit the target colour.

I’m thinking of something very simple like having the alpha level combine the gamma image with the original colour. I’ve almost answered my own question… my deadline is here and I am working on poses and touching up UV layers of paint… short on time so am asking in the hope that however simple, someone might show me an example node chain to speed things up.

Okay, I had a bit of a play. I think this does what I was wanting…

http://img406.imageshack.us/img406/4348/alphapass.th.gif

Change gamma level in the node at the top and background stays as the original was. There is some feathering (perhaps another filter anyone?), though I think if a gamma change should hopefully not be the noticeable.

Please post your findings. I’ve been looking around the net and it looks like hair particles have some troubles, eg, I’m trying to do toon “edge” render and that shows right through/ writes on top of the hair like its not there!
http://blenderartists.org/forum/showthread.php?t=165693
Others have had trouble with particles not rendering properly with halo lighting and halo materials and with mist - essentially anything that has an alpha.

The best suggestion I got was to do a seperate render layer of hair and build it up in the compositor. Any idea how they handled this in BBB???