Hey Guys.

I find it super convenient that some of the node actually explains how they
operate, so that you can re-create them in your expressions and blink
scripts.
However the equation descriped in the Gradenode does not match the actuall
output of the node

A = multiply*(gain-lift)/(whitepoint-blackpoint)

B = offset + lift - A*blackpoint

output = pow(A*input+B,1/gamma)


Here is a little comparison:



set cut_paste_input [stack 0]

version 8.0 v4

push $cut_paste_input

Ramp {

 p0 {0 408}

 p1 {1924 426}

 color 10000

 name Ramp2

 selected true

 xpos -2

 ypos 379

}

set Ne890edf0 [stack 0]

BlinkScript {

 ProgramGroup 1

 KernelDescription "1 \"Grade\" iterate componentWise
3aed9d965918ead671ab9383439b4816a7772727775caa4b995181fa06c4c03e 2 \"src\"
Read Point \"dst\" Write Point 0"

 kernelSource "kernel Grade : ImageComputationKernel<eComponentWise>\n\{\n
 Image<eRead, eAccessPoint, eEdgeClamped> src;\n  Image<eWrite> dst;\n
 void process() \{\n    float4 Colors = src();\n    float  input =
 Colors.x;\n    float blackpoint = 0.0f;\n    float whitepoint = 1.0f;\n
 float lift = 0.0f;\n    float gain = 0.01f;\n    float multiply = 1.0f;\n
   float offset = 0.0f;\n    float gamma = 2.0f;\n    float A =
multiply*(gain-lift)/(whitepoint-blackpoint);\n    float B = offset + lift
- A*blackpoint;\n    float output = pow(A*input+B,1/gamma);\n    dst() =
output;\n   \}\n\};"

 rebuild ""

 name BlinkScript1

 selected true

 xpos -86

 ypos 423

}

push $Ne890edf0

Grade {

 white 0.01

 gamma 2

 black_clamp false

 enable_mix_luminance false

 name Grade6

 selected true

 xpos 78

 ypos 431

}

Difference {

 inputs 2

 output rgba.red

 name Difference1

 selected true

 xpos -12

 ypos 494

}



Am i missing something, and or do you guys know what is missing?
_______________________________________________
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