Multi Color ID for Nuke

Nuke16 字

方便提取vray renderID和objectID,为了去锯齿同时需要输出coverage。

MCID.gizmo:

#! C:/Program Files/Nuke6.0v1/Nuke6.0.exe -nx
version 6.0 v1
Gizmo {
 inputs 2
 addUserKnob {20 User}
 addUserKnob {41 ID01 T CombinedOutput.ID01}
 addUserKnob {41 ID02 T CombinedOutput.ID02}
 addUserKnob {41 ID03 T CombinedOutput.ID03}
 addUserKnob {41 ID04 T CombinedOutput.ID04}
 addUserKnob {41 ID05 T CombinedOutput.ID05}
 addUserKnob {41 ID06 T CombinedOutput.ID06}
 addUserKnob {41 ID07 T CombinedOutput.ID07}
 addUserKnob {41 ID08 T CombinedOutput.ID08}
 addUserKnob {41 ID09 T CombinedOutput.ID09}
 addUserKnob {41 ID10 T CombinedOutput.ID10}
 addUserKnob {41 ID11 T CombinedOutput.ID11}
 addUserKnob {41 ID12 T CombinedOutput.ID12}
 addUserKnob {41 ID13 T CombinedOutput.ID13}
 addUserKnob {41 ID14 T CombinedOutput.ID14}
 addUserKnob {41 ID15 T CombinedOutput.ID15}
 addUserKnob {41 ID16 T CombinedOutput.ID16}
 addUserKnob {41 ID17 T CombinedOutput.ID17}
 addUserKnob {41 ID18 T CombinedOutput.ID18}
 addUserKnob {41 ID19 T CombinedOutput.ID19}
 addUserKnob {41 ID20 T CombinedOutput.ID20}
}
 Input {
  inputs 0
  name Input1
  xpos -542
  ypos -301
 }
 Shuffle {
  alpha white
  name InputRenderID
  xpos -542
  ypos -261
 }
set N2e6a0120 [stack 0]
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID01.r i} {CombinedOutput.ID01.g i} {CombinedOutput.ID01.b i} 0}
  maximum {{CombinedOutput.ID01.r i} {CombinedOutput.ID01.g i} {CombinedOutput.ID01.b i} 1}
  name Clamp1
  xpos -197
  ypos -220
 }
 Difference {
  inputs 2
  gain 100000
  name Difference1
  xpos -197
  ypos -313
 }
 Invert {
  channels alpha
  name Invert1
  xpos -197
  ypos -376
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID02.r} {CombinedOutput.ID02.g} {CombinedOutput.ID02.b} 0}
  maximum {{CombinedOutput.ID02.r} {CombinedOutput.ID02.g} {CombinedOutput.ID02.b} 1}
  name Clamp2
  xpos -81
  ypos -216
 }
 Difference {
  inputs 2
  gain 100000
  name Difference2
  xpos -81
  ypos -317
 }
 Invert {
  channels alpha
  name Invert2
  xpos -81
  ypos -388
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus2
  xpos -81
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID03.r} {CombinedOutput.ID03.g} {CombinedOutput.ID03.b} 0}
  maximum {{CombinedOutput.ID03.r} {CombinedOutput.ID03.g} {CombinedOutput.ID03.b} 1}
  name Clamp3
  xpos 18
  ypos -219
 }
 Difference {
  inputs 2
  gain 100000
  name Difference3
  xpos 18
  ypos -311
 }
 Invert {
  channels alpha
  name Invert3
  xpos 18
  ypos -380
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus3
  xpos 32
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID04.r} {CombinedOutput.ID04.g} {CombinedOutput.ID04.b} 0}
  maximum {{CombinedOutput.ID04.r} {CombinedOutput.ID04.g} {CombinedOutput.ID04.b} 1}
  name Clamp4
  xpos 129
  ypos -212
 }
 Difference {
  inputs 2
  gain 100000
  name Difference4
  xpos 129
  ypos -315
 }
 Invert {
  channels alpha
  name Invert4
  xpos 129
  ypos -377
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus4
  xpos 139
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID05.r} {CombinedOutput.ID05.g} {CombinedOutput.ID05.b} 0}
  maximum {{CombinedOutput.ID05.r} {CombinedOutput.ID05.g} {CombinedOutput.ID05.b} 1}
  name Clamp5
  xpos 238
  ypos -216
 }
 Difference {
  inputs 2
  gain 100000
  name Difference5
  xpos 238
  ypos -314
 }
 Invert {
  channels alpha
  name Invert5
  xpos 238
  ypos -374
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus5
  xpos 249
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID06.r} {CombinedOutput.ID06.g} {CombinedOutput.ID06.b} 0}
  maximum {{CombinedOutput.ID06.r} {CombinedOutput.ID06.g} {CombinedOutput.ID06.b} 1}
  name Clamp6
  xpos 355
  ypos -211
 }
 Difference {
  inputs 2
  gain 100000
  name Difference6
  xpos 355
  ypos -310
 }
 Invert {
  channels alpha
  name Invert6
  xpos 355
  ypos -363
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus6
  xpos 359
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID07.r} {CombinedOutput.ID07.g} {CombinedOutput.ID07.b} 0}
  maximum {{CombinedOutput.ID07.r} {CombinedOutput.ID07.g} {CombinedOutput.ID07.b} 1}
  name Clamp7
  xpos 469
  ypos -209
 }
 Difference {
  inputs 2
  gain 100000
  name Difference7
  xpos 469
  ypos -315
 }
 Invert {
  channels alpha
  name Invert8
  xpos 469
  ypos -364
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus7
  xpos 469
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID08.r} {CombinedOutput.ID08.g} {CombinedOutput.ID08.b} 0}
  maximum {{CombinedOutput.ID08.r} {CombinedOutput.ID08.g} {CombinedOutput.ID08.b} 1}
  name Clamp8
  xpos 580
  ypos -208
 }
 Difference {
  inputs 2
  gain 100000
  name Difference8
  xpos 580
  ypos -316
 }
 Invert {
  channels alpha
  name Invert9
  xpos 580
  ypos -372
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus8
  xpos 579
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID09.r} {CombinedOutput.ID09.g} {CombinedOutput.ID09.b} 0}
  maximum {{CombinedOutput.ID09.r} {CombinedOutput.ID09.g} {CombinedOutput.ID09.b} 1}
  name Clamp9
  xpos 703
  ypos -201
 }
 Difference {
  inputs 2
  gain 100000
  name Difference9
  xpos 703
  ypos -317
 }
 Invert {
  channels alpha
  name Invert10
  xpos 703
  ypos -375
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus9
  xpos 689
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID10.r} {CombinedOutput.ID10.g} {CombinedOutput.ID10.b} 0}
  maximum {{CombinedOutput.ID10.r} {CombinedOutput.ID10.g} {CombinedOutput.ID10.b} 1}
  name Clamp10
  xpos 823
  ypos -206
 }
 Difference {
  inputs 2
  gain 100000
  name Difference10
  xpos 823
  ypos -319
 }
 Invert {
  channels alpha
  name Invert11
  xpos 823
  ypos -380
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus10
  xpos 799
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID11.r} {CombinedOutput.ID11.g} {CombinedOutput.ID11.b} 0}
  maximum {{CombinedOutput.ID11.r} {CombinedOutput.ID11.g} {CombinedOutput.ID11.b} 1}
  name Clamp11
  xpos 934
  ypos -214
 }
 Difference {
  inputs 2
  gain 100000
  name Difference11
  xpos 934
  ypos -315
 }
 Invert {
  channels alpha
  name Invert12
  xpos 934
  ypos -386
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus11
  xpos 909
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID12.r} {CombinedOutput.ID12.g} {CombinedOutput.ID12.b} 0}
  maximum {{CombinedOutput.ID12.r} {CombinedOutput.ID12.g} {CombinedOutput.ID12.b} 1}
  name Clamp12
  xpos 1040
  ypos -217
 }
 Difference {
  inputs 2
  gain 100000
  name Difference12
  xpos 1040
  ypos -309
 }
 Invert {
  channels alpha
  name Invert13
  xpos 1040
  ypos -385
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus12
  xpos 1019
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID13.r} {CombinedOutput.ID13.g} {CombinedOutput.ID13.b} 0}
  maximum {{CombinedOutput.ID13.r} {CombinedOutput.ID13.g} {CombinedOutput.ID13.b} 1}
  name Clamp13
  xpos 1145
  ypos -221
 }
 Difference {
  inputs 2
  gain 100000
  name Difference13
  xpos 1145
  ypos -314
 }
 Invert {
  channels alpha
  name Invert14
  xpos 1145
  ypos -379
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus13
  xpos 1129
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID14.r} {CombinedOutput.ID14.g} {CombinedOutput.ID14.b} 0}
  maximum {{CombinedOutput.ID14.r} {CombinedOutput.ID14.g} {CombinedOutput.ID14.b} 1}
  name Clamp14
  xpos 1242
  ypos -232
 }
 Difference {
  inputs 2
  gain 100000
  name Difference14
  xpos 1242
  ypos -313
 }
 Invert {
  channels alpha
  name Invert15
  xpos 1242
  ypos -377
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus14
  xpos 1239
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID15.r} {CombinedOutput.ID15.g} {CombinedOutput.ID15.b} 0}
  maximum {{CombinedOutput.ID15.r} {CombinedOutput.ID15.g} {CombinedOutput.ID15.b} 1}
  name Clamp15
  xpos 1335
  ypos -228
 }
 Difference {
  inputs 2
  gain 100000
  name Difference15
  xpos 1335
  ypos -311
 }
 Invert {
  channels alpha
  name Invert16
  xpos 1335
  ypos -376
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus15
  xpos 1349
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID16.r} {CombinedOutput.ID16.g} {CombinedOutput.ID16.b} 0}
  maximum {{CombinedOutput.ID16.r} {CombinedOutput.ID16.g} {CombinedOutput.ID16.b} 1}
  name Clamp16
  xpos 1440
  ypos -229
 }
 Difference {
  inputs 2
  gain 100000
  name Difference16
  xpos 1440
  ypos -314
 }
 Invert {
  channels alpha
  name Invert17
  xpos 1440
  ypos -375
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus16
  xpos 1459
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID17.r} {CombinedOutput.ID17.g} {CombinedOutput.ID17.b} 0}
  maximum {{CombinedOutput.ID17.r} {CombinedOutput.ID17.g} {CombinedOutput.ID17.b} 1}
  name Clamp17
  xpos 1543
  ypos -225
 }
 Difference {
  inputs 2
  gain 100000
  name Difference17
  xpos 1543
  ypos -317
 }
 Invert {
  channels alpha
  name Invert18
  xpos 1543
  ypos -377
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus17
  xpos 1569
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID18.r} {CombinedOutput.ID18.g} {CombinedOutput.ID18.b} 0}
  maximum {{CombinedOutput.ID18.r} {CombinedOutput.ID18.g} {CombinedOutput.ID18.b} 1}
  name Clamp18
  xpos 1647
  ypos -229
 }
 Difference {
  inputs 2
  gain 100000
  name Difference18
  xpos 1647
  ypos -316
 }
 Invert {
  channels alpha
  name Invert19
  xpos 1647
  ypos -377
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus18
  xpos 1679
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID19.r} {CombinedOutput.ID19.g} {CombinedOutput.ID19.b} 0}
  maximum {{CombinedOutput.ID19.r} {CombinedOutput.ID19.g} {CombinedOutput.ID19.b} 1}
  name Clamp19
  xpos 1765
  ypos -228
 }
 Difference {
  inputs 2
  gain 100000
  name Difference19
  xpos 1765
  ypos -309
 }
 Invert {
  channels alpha
  name Invert20
  xpos 1765
  ypos -381
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus19
  xpos 1789
  ypos -437
 }
push $N2e6a0120
push $N2e6a0120
 Clamp {
  channels rgb
  minimum {{CombinedOutput.ID20.r} {CombinedOutput.ID20.g} {CombinedOutput.ID20.b} 0}
  maximum {{CombinedOutput.ID20.r} {CombinedOutput.ID20.g} {CombinedOutput.ID20.b} 1}
  name Clamp20
  xpos 1879
  ypos -226
 }
 Difference {
  inputs 2
  gain 100000
  name Difference20
  xpos 1879
  ypos -305
 }
 Invert {
  channels alpha
  name Invert21
  xpos 1879
  ypos -379
 }
 Merge2 {
  inputs 2
  operation plus
  name Plus20
  xpos 1899
  ypos -437
 }
 Clamp {
  channels rgba
  name ClampALL
  xpos 2041
  ypos -437
 }
 Shuffle {
  red black
  green black
  blue black
  name Shuffle1
  xpos 2450
  ypos -437
 }
set N2e6ad530 [stack 0]
push $N2e6ad530
 Erode {
  channels {rgba.alpha none none rgba.alpha}
  size 1
  name Erode2
  xpos 2629
  ypos 251
 }
push $N2e6ad530
 Dot {
  name Dot1
  xpos 2484
  ypos 12
 }
 Erode {
  size {{Erode2.size*-1}}
  name Erode1
  xpos 2450
  ypos 121
 }
 Add {
  inputs 1+1
  channels alpha
  value -1
  name Add2
  xpos 2629
  ypos 121
 }
 Invert {
  name Invert7
  xpos 2629
  ypos 16
 }
 Input {
  inputs 0
  name Input2
  xpos -551
  ypos -83
  number 1
 }
 ColorCorrect {
  gamma 0.5
  shadows.gamma 0.254
  name InputCoverage
  xpos -551
  ypos -43
 }
 Shuffle {
  red black
  green black
  blue black
  alpha red
  name Shuffle2
  xpos -370
  ypos -43
 }
 Invert {
  channels alpha
  name InvertCoverage
  xpos -201
  ypos -49
 }
 Add {
  inputs 1+1
  channels alpha
  value -1
  name Add3
  xpos 2629
  ypos -100
 }
 Clamp {
  name Clamp21
  xpos 2629
  ypos -189
 }
 Merge2 {
  inputs 2
  name CombinedOutput
  xpos 2629
  ypos -437
  addUserKnob {20 User}
  addUserKnob {18 ID01 t "Pick me"}
  ID01 {0 0 0}
  addUserKnob {18 ID02}
  ID02 {0 0 0}
  addUserKnob {18 ID03}
  ID03 {0 0 0}
  addUserKnob {18 ID04}
  ID04 {0 0 0}
  addUserKnob {18 ID05}
  ID05 {0 0 0}
  addUserKnob {18 ID06}
  ID06 {0 0 0}
  addUserKnob {18 ID07}
  ID07 {0 0 0}
  addUserKnob {18 ID08}
  ID08 {0 0 0}
  addUserKnob {18 ID09}
  ID09 {0 0 0}
  addUserKnob {18 ID10}
  ID10 {0 0 0}
  addUserKnob {18 ID11}
  ID11 {0 0 0}
  addUserKnob {18 ID12}
  ID12 {0 0 0}
  addUserKnob {18 ID13}
  ID13 {0 0 0}
  addUserKnob {18 ID14}
  ID14 {0 0 0}
  addUserKnob {18 ID15}
  ID15 {0 0 0}
  addUserKnob {18 ID16}
  ID16 {0 0 0}
  addUserKnob {18 ID17}
  ID17 {0 0 0}
  addUserKnob {18 ID18}
  ID18 {0 0 0}
  addUserKnob {18 ID19}
  ID19 {0 0 0}
  addUserKnob {18 ID20}
  ID20 {0 0 0}
 }
 Output {
  name Output1
  xpos 2629
  ypos -337
 }
end_group

admin
博学之,审问之,慎思之,明辨之,笃行之。
OωO
开启隐私评论,您的评论仅作者和评论双方可见