Nuke's invert node *is* just doing a straight mathematical invert (e.g 1-value). The issue you described is mostly to do with human perception of light being non-linear..

With linear-to-light images:

* a change in "dark areas" is a huge change (e.g between 0.01 to 0.02)
* a change in "bright areas" is barely noticable (e.g between 0.98 and 0.99 is barely noticeable. Between 5.0 and 6.0 is largely irrelevant)

..the reason for this is, basically, seeing scary animals in the shadows is much more useful than the ability to see slight variations in the brightness of the sun, so.. that's how our eyes adapted

If you just mathematically invert the linear-light values, all the subtle changes get shifted into the bright areas, and all the big irrelevant white/specular changes get shifted into the all-important dark areas


So, as Joe/Diogo suggested: you convert the image into a perceptively linear colourspace like sRGB (so a gap between 0.01 and 0.02 is just as significant as the change between 0.98 and 0.99), then invert that..

A log colorspace may be better for inverting (e.g Kodak log using the Lin2log node), since human vision is pretty much logarithmic (and that's why log encoded images are so widely used)


Hard to explain.. This Nuke script might make things clearer:

https://gist.github.com/dbr/5982209

The "Perceptively linear ramp" like a nice evenly increasing greyscale ramp (when viewed correctly through an sRGB display LUT).. but to look like this, the linear-light values have to exponentially increase (doubling each time)

Then, compare the plots, keeping in mind we perceive far more detail in the lower area (maybe the lower 1/4 of the image).

- Ben

On 12/07/13 14:56, Darren Coombes wrote:
Thanks for that, it's good to get an understanding of the math behind
even the simple operations. Knew it wasn't about just doing a straight
invert. Thanks.

*
*Thanks.*
*
*
*Darren Coombes*
**
*
*
*Check out some of my work...*
*
*
*www.vimeo.com/darrencoombes <http://www.vimeo.com/darrencoombes>*
*
*
*
*
*
*
*Mob: +61 418 631 079 <tel:+61%20418%20631%20079>*
*
*
*Skype: darrencoombes*
*Twitter: @durwood81*
*

On 12/07/2013, at 3:17 PM, Joe Laude <[email protected]
<mailto:[email protected]>> wrote:

You're on the right track, but what Nuke's doing is technically
correct, as an invert is simply subtracting all values from 1. To do
what you want, add a colorspace node before and after the invert. Make
the first one in: linear / out: sRGB, then the one after the invert
make the opposite, in: sRGB / out: linear.

Sent from my iPhone

On Jul 11, 2013, at 10:00 PM, Darren Coombes <[email protected]
<mailto:[email protected]>> wrote:

Hi everyone, when you invert an image in nuke, it never seems to be
an exact invert, now I'm guessing that if I've got my viewer set to
sRGB, it's never going to look like an exact invert due to the math
between linear and sRGB. Am I correct with this? And how would you go
about correcting the conversion? Would it be a gamma correction or is
there more to it?

Thanks.

*
*Thanks.*
*
*
*Darren Coombes*
**
*
*
*Check out some of my work...*
*
*
*www.vimeo.com/darrencoombes <http://www.vimeo.com/darrencoombes>*
*
*
*
*
*
*
*Mob: +61 418 631 079 <tel:+61%20418%20631%20079>*
*
*
*Skype: darrencoombes*
*Twitter: @durwood81*
*
_______________________________________________
Nuke-users mailing list
[email protected]
<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________
Nuke-users mailing list
[email protected]
<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

--
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to