No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Position_to_Mask.gizmo 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #! C:/Program Files/Nuke6.3v1/Nuke6.3.exe -nx
  2. version 6.3 v1
  3. Gizmo {
  4. help "This gizmo will create a spherical mask based on the world space coordinates of a position channel."
  5. addUserKnob {20 PointPositionToMask l PositionToMask}
  6. addUserKnob {18 center l Center}
  7. center {0 0 0}
  8. addUserKnob {7 radius l Radius R 0 1000}
  9. radius 1
  10. addUserKnob {26 ""}
  11. addUserKnob {7 feather l Feather R -500 500}
  12. addUserKnob {7 feather_falloff l "Feather falloff" R 0.2 5}
  13. feather_falloff 1
  14. addUserKnob {26 ""}
  15. addUserKnob {41 point_postion l Postion T Shuffle1.in}
  16. addUserKnob {41 mask_output l "Mask output" T Copy1.to0}
  17. }
  18. Input {
  19. inputs 0
  20. name src
  21. xpos -195
  22. ypos -147
  23. }
  24. Dot {
  25. name Dot1
  26. xpos -161
  27. ypos -101
  28. }
  29. set N4135bb0 [stack 0]
  30. Dot {
  31. name Dot2
  32. xpos -25
  33. ypos -101
  34. }
  35. set N446c430 [stack 0]
  36. Dot {
  37. name Dot4
  38. xpos 101
  39. ypos -101
  40. }
  41. Expression {
  42. channel0 {rgba.red -rgba.green -rgba.blue -rgba.alpha}
  43. expr0 parent.center.r
  44. expr1 parent.center.g
  45. expr2 parent.center.b
  46. name Expression1
  47. label center
  48. xpos 67
  49. ypos -9
  50. }
  51. push $N446c430
  52. Shuffle {
  53. in rgb
  54. name Shuffle1
  55. xpos -59
  56. ypos -65
  57. }
  58. MergeExpression {
  59. inputs 2
  60. temp_name0 distance
  61. temp_expr0 "sqrt(pow((Ar-Br), 2) + pow((Ag-Bg), 2) + pow((Ab-Bb), 2))"
  62. temp_name1 inner_radius
  63. temp_expr1 parent.feather<0?parent.radius+parent.feather:parent.radius
  64. temp_name2 outer_radius
  65. temp_expr2 parent.feather<0?parent.radius:parent.radius+parent.feather
  66. channel0 {rgba.red rgba.green rgba.blue rgba.alpha}
  67. expr0 "distance<inner_radius?1:distance>outer_radius?0:pow((1-(distance-inner_radius)/(outer_radius-inner_radius)), parent.feather_falloff)"
  68. channel1 {-rgba.red -rgba.green -rgba.blue}
  69. channel2 {-rgba.red -rgba.green -rgba.blue}
  70. name MergeExpression1
  71. xpos -59
  72. ypos -3
  73. }
  74. Dot {
  75. name Dot3
  76. xpos -25
  77. ypos 53
  78. }
  79. push $N4135bb0
  80. Copy {
  81. inputs 2
  82. from0 rgba.alpha
  83. to0 rgba.alpha
  84. name Copy1
  85. xpos -195
  86. ypos 44
  87. }
  88. set N446d750 [stack 0]
  89. Output {
  90. name Output1
  91. xpos -195
  92. ypos 119
  93. }
  94. push $N446d750
  95. Viewer {
  96. fps 25
  97. input_process false
  98. name Viewer1
  99. selected true
  100. xpos -21
  101. ypos 120
  102. }
  103. end_group