CompStart

ProLessonsCoursesElementsSoftware

CompStart

Master visual effects with cutting-edge techniques.

Learning

CoursesLessonsPro FeaturesAssetsSoftware

Tools

Tech CheckDisplay CheckMotion BlurCIE 1931PhysLightNuke Tools

Company

InstructorMissionImpressumPrivacyTerms

Projects

Moray RenderEXR ConverterOCIO.ccNuke ToolsDerekVFX

Follow

YouTubeInstagramTikTokThreadsContact

© 2026 CompStart. All rights reserved.

Position Noise

ToolSets / Draw
Draw

2026-09-07

ToolSets/draw/positionNoise.nk

draw
noise
position
pref
utility
3d
expression
View on GitHub

Samples 3D noise from a position pass (Pref or similar), with per-axis scale and offset, and outputs a 0–1 grayscale field.

Position Noise reads a three-channel position input (default Pref), feeds X/Y/Z through a noise expression with per-axis scale and offset, then remaps the result to roughly 0–1 and writes it to RGBA.

Use it when you need noise that follows world or object position—breaking up mattes, adding spatial variation, or driving effects from a Pref/P pass instead of screen space.

The in control selects the source layer. x/y/z scale stretch the noise frequency along each axis; x/y/z offset shift the sample point (x_offset is expression-linked to frame by default so the pattern can drift over time).

Script code

set cut_paste_input [stack 0]
version 12.1 v4
push $cut_paste_input
add_layer {Pref Pref.X Pref.Y Pref.Z}
Group {
 name positionNoise
 tile_color 0x421010ff
 selected true
 xpos -1162
 ypos 1266
 addUserKnob {20 User l template}
 addUserKnob {41 in l "in 1" T Shuffle35.in}
 addUserKnob {41 x_scale l x T Expression1.x_scale}
 addUserKnob {41 y_scale l y T Expression1.y_scale}
 addUserKnob {41 z_scale l z T Expression1.z_scale}
 addUserKnob {26 ""}
 addUserKnob {41 x_offset T Expression1.x_offset}
 addUserKnob {41 y_offset T Expression1.y_offset}
 addUserKnob {41 z_offset T Expression1.z_offset}
 addUserKnob {26 ""}
 addUserKnob {26 lbl l "" +STARTLINE T "Template v1.0"}
 addUserKnob {22 btn l DerekVFX.ca T "nuke.tcl('start', 'https://derekvfx.ca')" +STARTLINE}
}
 Input {
  inputs 0
  name Input
  xpos 447
  ypos 61
 }
 Shuffle {
  in Pref
  name Shuffle35
  label "\[value in]"
  xpos 665
  ypos 443
 }
 Expression {
  temp_name0 o
  temp_expr0 noise(r*x_scale+x_offset,g*y_scale+y_offset,b*z_scale+z_offset)
  temp_name1 zz
  temp_expr1 o/2+.5
  expr0 zz
  expr1 zz
  expr2 zz
  expr3 zz
  name Expression1
  label "\[knob expr3]"
  xpos 665
  ypos 514
  addUserKnob {20 User}
  addUserKnob {7 x_offset}
  x_offset {{frame/70}}
  addUserKnob {7 y_offset}
  addUserKnob {7 z_offset}
  addUserKnob {7 x_scale l x R 0 100}
  x_scale 32.6
  addUserKnob {7 y_scale l y R 0 100}
  y_scale 31.8
  addUserKnob {7 z_scale l z R 0 100}
  z_scale 26.4
 }
 Output {
  name Output1
  xpos 447
  ypos 1055
 }
end_group