From c736b2405b0115a114e60d60dd0474c9a5b2f81b Mon Sep 17 00:00:00 2001 From: Jesse Spielman Date: Mon, 20 May 2019 11:47:11 -0400 Subject: [PATCH 1/2] Add Focal Smooth option --- cameraSmooth.nk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cameraSmooth.nk b/cameraSmooth.nk index 5196fe0..462fe6f 100644 --- a/cameraSmooth.nk +++ b/cameraSmooth.nk @@ -9,6 +9,8 @@ Group { smooth_translate {3 3 3} addUserKnob {13 smooth_rotate l "Smooth Rotation"} smooth_rotate {3 3 3} + addUserKnob {7 smooth_focal l "Smooth Focal" R 0 100} + smooth_focal 10 addUserKnob {26 ""} addUserKnob {7 projectiondistance l "Projection distance" R 1 100} projectiondistance 13 @@ -20,10 +22,14 @@ Group { translate_orig {{input1.translate x1789 66.40117645} {input1.translate x1789 0} {input1.translate x1789 0}} addUserKnob {13 rotate_orig l "Rotate original"} rotate_orig {{input1.rotate x1789 0} {input1.rotate x1789 0} {input1.rotate x1789 0}} + addUserKnob {7 focal_orig l "Focal Original"} + focal_orig {{input1.focal}} addUserKnob {13 translate_smoothed l "Translate smoothed"} translate_smoothed {{"smooth_translate.x==0?translate_orig.x:(translate_orig.x.integrate(frame-smooth_translate.x,frame+smooth_translate.x)) / (2*smooth_translate.x)" x1789 0} {"smooth_translate.y==0?translate_orig.y:(translate_orig.y.integrate(frame-smooth_translate.y,frame+smooth_translate.y)) / (2*smooth_translate.y)" x1789 0} {"smooth_translate.z==0?translate_orig.z:(translate_orig.z.integrate(frame-smooth_translate.z,frame+smooth_translate.z)) / (2*smooth_translate.z)" x1789 0}} addUserKnob {13 rotate_smoothed l "Rotate smoothed"} rotate_smoothed {{"smooth_rotate.x==0?rotate_orig.x:(rotate_orig.x.integrate(frame-smooth_rotate.x,frame+smooth_rotate.x)) / (2*smooth_rotate.x)" x1789 0} {"smooth_rotate.y==0?rotate_orig.y:(rotate_orig.y.integrate(frame-smooth_rotate.y,frame+smooth_rotate.y)) / (2*smooth_rotate.y)" x1789 0} {"smooth_rotate.z==0?rotate_orig.z:(rotate_orig.z.integrate(frame-smooth_rotate.z,frame+smooth_rotate.z)) / (2*smooth_rotate.z)" x1789 0}} + addUserKnob {7 focal_smoothed l "Focal smoothed"} + focal_smoothed {{"smooth_focal==0?focal_orig:(focal_orig.integrate(frame-smooth_focal,frame+smooth_focal)) / (2*smooth_focal)"}} } Camera2 { inputs 0 @@ -32,7 +38,7 @@ Group { scaling {{parent.input1.scaling} {parent.input1.scaling} {parent.input1.scaling}} uniform_scale {{parent.input1.uniform_scale}} skew {{parent.input1.skew} {parent.input1.skew} {parent.input1.skew}} - focal {{parent.input1.focal}} + focal {{parent.focal_smoothed}} haperture {{parent.input1.haperture}} vaperture {{parent.input1.vaperture}} name Camera2 From b3982478568377f17f319447ded7889832d433c7 Mon Sep 17 00:00:00 2001 From: Jesse Spielman Date: Mon, 20 May 2019 11:47:34 -0400 Subject: [PATCH 2/2] Make the default filter mitchell and promote knob to group Make it easier to change filter settings without mucking around inside the gizmo. --- cameraSmooth.nk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cameraSmooth.nk b/cameraSmooth.nk index 462fe6f..bd2c172 100644 --- a/cameraSmooth.nk +++ b/cameraSmooth.nk @@ -14,6 +14,7 @@ Group { addUserKnob {26 ""} addUserKnob {7 projectiondistance l "Projection distance" R 1 100} projectiondistance 13 + addUserKnob {41 filter T ScanlineRender1.filter} addUserKnob {26 ""} addUserKnob {26 credit2 l "" +STARTLINE T "cameraSmooth v1.2 by Richard Frazer"} addUserKnob {26 credit1 l "" +STARTLINE T www.richardfrazer.com/tools-tutorials/camerasmooth-for-nuke} @@ -116,6 +117,7 @@ push $N69c6cf0 } ScanlineRender { inputs 3 + filter Mitchell name ScanlineRender1 xpos 0 ypos 278