Thanks, Frank!
I made a small improvement, so I’m copying it back to you. I added a check for
the input image size, so that it automatically adjusts…
--------------------------------------------------------------------
set cut_paste_input [stack 0]
version 7.0 v4
push $cut_paste_input
Group {
name Pixel_Shifter
selected true
xpos -257
ypos 313
addUserKnob {20 User}
addUserKnob {12 origin}
origin {500 0}
addUserKnob {41 motionblur T Transform2.motionblur}
addUserKnob {41 shutter T Transform2.shutter}
addUserKnob {41 shutteroffset l "shutter offset" T Transform2.shutteroffset}
addUserKnob {41 shuttercustomoffset l "" -STARTLINE T
Transform2.shuttercustomoffset}
}
NoOp {
inputs 0
name Get_Read_Size
tile_color 0x8e2929ff
note_font_color 0xffffffff
xpos -175
ypos -281
addUserKnob {20 User}
addUserKnob {14 Read_Size R 0 100}
Read_Size {{"\[python -execlocal ret\\ =\\
nuke.thisGroup().input(0).width()]"} {"\[python -execlocal ret\\ =\\
nuke.thisGroup().input(0).height()]"}}
}
Input {
inputs 0
name Input1
xpos -52
ypos -373
}
Crop {
box {0 0 {"\[python -execlocal ret\\ =\\
nuke.toNode(nuke.thisGroup().name()\\ +\\
'.Get_Read_Size').knob('Read_Size').value(0)]"} {"\[python -execlocal ret\\ =\\
nuke.toNode(nuke.thisGroup().name()\\ +\\
'.Get_Read_Size').knob('Read_Size').value(1)]"}}
name Crop2
xpos -52
ypos -281
}
Dot {
name Dot1
xpos -18
ypos -197
}
set N81ee2f0 [stack 0]
Dot {
name Dot8
xpos -220
ypos -197
}
Transform {
translate {{parent.origin%(width*2)-width} 0}
center {1024 778}
name Transform1
label X0
xpos -254
ypos -150
}
set N16f5c050 [stack 0]
Transform {
translate {0 {parent.origin%(height*2)-height}}
center {1024 778}
motionblur {{Transform2.motionblur}}
shutter {{Transform2.shutter}}
shutteroffset {{Transform2.shutteroffset}}
shuttercustomoffset {{Transform2.shuttercustomoffset}}
name Transform4
label Y0
xpos -121
ypos -150
}
Dot {
name Dot3
xpos -87
ypos -41
}
push $N81ee2f0
Dot {
name Dot7
xpos 168
ypos -197
}
Transform {
translate {{(parent.origin+width)%(width*2)-width} 0}
center {1024 778}
name Transform3
label X1
xpos 134
ypos -149
}
set N16f65e00 [stack 0]
Transform {
translate {0 {parent.origin%(height*2)-height}}
center {1024 778}
motionblur {{Transform2.motionblur}}
shutter {{Transform2.shutter}}
shutteroffset {{Transform2.shutteroffset}}
shuttercustomoffset {{Transform2.shuttercustomoffset}}
name Transform5
label Y0
xpos -5
ypos -149
}
Dot {
name Dot2
xpos 29
ypos -40
}
push 0
push $N16f65e00
Transform {
translate {0 {(parent.origin+height)%(height*2)-height}}
center {1024 778}
shutteroffset centred
name Transform2
label Y1
xpos 134
ypos -72
}
Dot {
name Dot6
xpos 168
ypos -2
}
push $N16f5c050
Transform {
translate {0 {(parent.origin+height)%(height*2)-height}}
center {1024 778}
motionblur {{Transform2.motionblur}}
shutter {{Transform2.shutter}}
shutteroffset {{Transform2.shutteroffset}}
shuttercustomoffset {{Transform2.shuttercustomoffset}}
name Transform6
label Y1
xpos -254
ypos -74
}
Dot {
name Dot5
xpos -220
ypos -2
}
Merge2 {
inputs 4+1
operation disjoint-over
also_merge all
name Merge1
xpos -55
ypos -5
}
Crop {
box {0 0 {"\[python -execlocal ret\\ =\\
nuke.toNode(nuke.thisGroup().name()\\ +\\
'.Get_Read_Size').knob('Read_Size').value(0)]"} {"\[python -execlocal ret\\ =\\
nuke.toNode(nuke.thisGroup().name()\\ +\\
'.Get_Read_Size').knob('Read_Size').value(1)]"}}
name Crop1
xpos -55
ypos 75
}
Output {
name Output1
xpos -55
ypos 157
}
end_group
--------------------------------------------------------------------
Rich
Rich Bobo
Senior VFX Compositor
Armstrong White
Email: [email protected]
http://armstrong-white.com/
Email: [email protected]
Mobile: (248) 840-2665
Web: http://richbobo.com/
"Never mind what others do; do better than yourself, beat your own record from
day to day, and you are a success."
- William J. H. Boetcker
On Jun 19, 2014, at 7:14 PM, Frank Rueter|OHUfx <[email protected]> wrote:
> >>do it with a built-in Nuke node. Isn’t there any way? I guess that’s why
> >>these gizmos exist..?
> exactly. this is an old one I did years ago. not sure if it still holds up,
> but give it a go:
>
> set cut_paste_input [stack 0]
> version 8.0 v4
> push $cut_paste_input
> Group {
> name Group1
> selected true
> xpos 49
> ypos 36
> addUserKnob {20 User}
> addUserKnob {12 origin}
> origin {4970 0}
> addUserKnob {41 motionblur T Transform2.motionblur}
> addUserKnob {41 shutter T Transform2.shutter}
> addUserKnob {41 shutteroffset l "shutter offset" T Transform2.shutteroffset}
> addUserKnob {41 shuttercustomoffset l "" -STARTLINE T
> Transform2.shuttercustomoffset}
> }
> Input {
> inputs 0
> name Input1
> xpos -37
> ypos -201
> }
> Crop {
> box {0 0 2048 1556}
> name Crop2
> xpos -37
> ypos -177
> }
> set N83f1350 [stack 0]
> Transform {
> translate {{parent.origin%(width*2)-width i} 0}
> center {1024 778}
> name Transform1
> label X0
> xpos -206
> ypos -61
> }
> set N869e2c0 [stack 0]
> Transform {
> translate {0 {parent.origin%(height*2)-height}}
> center {1024 778}
> motionblur {{Transform2.motionblur}}
> shutter {{Transform2.shutter}}
> shutteroffset {{Transform2.shutteroffset}}
> shuttercustomoffset {{Transform2.shuttercustomoffset}}
> name Transform4
> label Y0
> xpos -99
> ypos -19
> }
> push $N83f1350
> Transform {
> translate {{(parent.origin+width)%(width*2)-width i} 0}
> center {1024 778}
> name Transform3
> label X1
> xpos 121
> ypos -103
> }
> set N8388cd0 [stack 0]
> Transform {
> translate {0 {parent.origin%(height*2)-height}}
> center {1024 778}
> motionblur {{Transform2.motionblur}}
> shutter {{Transform2.shutter}}
> shutteroffset {{Transform2.shutteroffset}}
> shuttercustomoffset {{Transform2.shuttercustomoffset}}
> name Transform5
> label Y0
> xpos 11
> ypos -15
> }
> push 0
> push $N8388cd0
> Transform {
> translate {0 {(parent.origin+height)%(height*2)-height}}
> center {1024 778}
> shutteroffset centred
> name Transform2
> label Y1
> xpos 121
> ypos 51
> }
> push $N869e2c0
> Transform {
> translate {0 {(parent.origin+height)%(height*2)-height}}
> center {1024 778}
> motionblur {{Transform2.motionblur}}
> shutter {{Transform2.shutter}}
> shutteroffset {{Transform2.shutteroffset}}
> shuttercustomoffset {{Transform2.shuttercustomoffset}}
> name Transform6
> label Y1
> xpos -206
> ypos 51
> }
> Merge2 {
> inputs 4+1
> operation disjoint-over
> also_merge all
> name Merge1
> xpos -64
> ypos 56
> }
> set N146a0770 [stack 0]
> Crop {
> box {0 0 {width i} {height i}}
> name Crop1
> xpos -64
> ypos 80
> }
> Output {
> name Output1
> xpos -64
> ypos 133
> }
> push $N146a0770
> Viewer {
> input_process false
> name Viewer1
> xpos -210
> ypos 124
> }
> end_group
>
> On 20/06/14 11:06, Richard Bobo wrote:
>> Hi all,
>>
>> I have found several gizmos that will do a simple pixel shift on an image —
>> x & y offsets that wraparound. However, I keep searching in vain for a way
>> to do it with a built-in Nuke node. Isn’t there any way? I guess that’s why
>> these gizmos exist..? (8^\ A big thank you to anyone who can tell me
>> about a Nuke node that can do it!
>>
>> Thanks,
>> Rich
>>
>>
>> Rich Bobo
>> Senior VFX Compositor
>> Armstrong White
>> Email: [email protected]
>> http://armstrong-white.com/
>>
>> Email: [email protected]
>> Mobile: (248) 840-2665
>> Web: http://richbobo.com/
>>
>> "The world stands aside to let anyone pass who knows where he is going."
>> - David Starr Jordan
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
> --
> <ohufxLogo_50x50.png> vfx compositing | workflow customisation and consulting
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users