PDA

View Full Version : need an expression for green spill supress



raj_raj85
February 24th, 2011, 02:30 AM
hi,
Is there any expression for green spill supress that i can write into the 'expression node'?
thanks,
raj.:fingerscr

sdinozzi
February 24th, 2011, 02:51 AM
g > (r+b)/2 ? (r+b)/2 : g

put that in the expression field for the green channel.
(also could be modified for a blue suppress.. b > (r+g)/2 ? (r+g)/2 : b)

-Steve

raj_raj85
February 24th, 2011, 03:06 AM
hey thanks steve that really worked..!

Gentle Fury
February 24th, 2011, 11:40 AM
http://eastoflapost.com/East_of_LA_Post/Gizmos_files/DeSpill.gizmo.zip

Thats my despill gizmo with a drop down for green or blue and a slider :)

lukesan79
February 25th, 2011, 06:06 AM
g > (r+b)/2 ? (r+b)/2 : g

put that in the expression field for the green channel.
(also could be modified for a blue suppress.. b > (r+g)/2 ? (r+g)/2 : b)

-Steve

Hi!
nice exp :D
But what about that "?" in the middle? Is it some kind of condition?

mreithoffer
February 25th, 2011, 06:37 AM
if g is > then (r+b)/2 use (r+b)/2, else use g

http://www.vfxtalk.com/forum/nuke-create-if-statement-nukes-expression-node-t17068.html

Gentle Fury
February 25th, 2011, 09:09 AM
nice math, I like that.

lukesan79
February 25th, 2011, 09:40 AM
if g is > then (r+b)/2 use (r+b)/2, else use g

http://www.vfxtalk.com/forum/nuke-create-if-statement-nukes-expression-node-t17068.html

Thanks man, useful!
Is it the color difference math?

Gentle Fury
February 25th, 2011, 10:01 AM
Thanks man, useful!
Is it the color difference math?

No, it's an average if red and blue.

More accurately it's saying that if the per pixel value the green channel exceeds the per pixel average value of red and blue then use the average of red and blue, otherwise leave it alone.

lazylorcan
March 5th, 2011, 10:53 AM
where exactly does this go in the expression node?

lazylorcan
March 5th, 2011, 11:02 AM
ah no worries, i got it.

very nice results btw

tangqiang
April 28th, 2011, 10:29 AM
you can simply use 'g=min(g,(r+b)/2)'
same result