Wed Dec 31, 2014 8:51 pm
Someone pointed me to a macro on this forum that does a pretty good depth defocus. But the built in Variblur node also does a pretty good Z-defocus (but without shaped aperture) you just need to use a use a 'bitmap' node to convert your depth image to a 'mask' & set the blur type to 'defocus'
heres a little flow to demonstrate:
{
Tools = ordered() {
Bitmap1 = BitmapMask {
Inputs = {
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1, }, },
ClippingMode = Input { Value = FuID { "None", }, },
Image = Input {
SourceOp = "Background1",
Source = "Output",
},
Channel = Input { Value = FuID { "Red", }, },
},
ViewInfo = OperatorInfo { Pos = { 587, 139, }, },
},
Background1 = Background {
Inputs = {
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
Type = Input { Value = FuID { "Vertical", }, },
TopRightRed = Input { Value = 1, },
TopRightGreen = Input { Value = 1, },
TopRightBlue = Input { Value = 1, },
BottomLeftRed = Input { Value = 1, },
BottomLeftGreen = Input { Value = 1, },
BottomLeftBlue = Input { Value = 1, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1, },
[1] = { 1, 1, 1, 1, },
},
},
},
},
ViewInfo = OperatorInfo { Pos = { 394, 139, }, },
},
VariBlur1 = VariBlur {
Inputs = {
Method = Input { Value = 2, },
Quality = Input { Value = 7, },
XBlurSize = Input { Value = 7.1, },
BlurLimit = Input { Value = 1.48, },
Input = Input {
SourceOp = "Paint1",
Source = "Output",
},
BlurImage = Input {
SourceOp = "Bitmap1",
Source = "Mask",
},
},
ViewInfo = OperatorInfo { Pos = { 587, 228, }, },
},
Paint1 = Paint {
Inputs = {
Input = Input {
SourceOp = "Background2",
Source = "Output",
},
Paint = Input {
SourceOp = "Rectangle9",
Source = "Out",
},
},
ViewInfo = OperatorInfo { Pos = { 455, 228, }, },
},
Rectangle9 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Paint = Input {
SourceOp = "Rectangle8",
Source = "Out",
},
},
},
Rectangle8 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.469265375286341, 0.12666667252779, }, },
Paint = Input {
SourceOp = "Rectangle7",
Source = "Out",
},
Width = Input { Value = 0.803598217666149, },
Height = Input { Value = 0.0026666671037674, },
},
},
Rectangle7 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.467016499489546, 0.618666678667068, }, },
Paint = Input {
SourceOp = "Rectangle6",
Source = "Out",
},
Width = Input { Value = 0.784107960760593, },
Height = Input { Value = 0.0106666684150696, },
},
},
Rectangle6 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.488005992025137, 0.319999992847443, }, },
Paint = Input {
SourceOp = "Rectangle5",
Source = "Out",
},
Width = Input { Value = 0.784107930958271, },
Height = Input { Value = 0.0106666684150696, },
},
},
Rectangle5 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.467766117304564, 0.845333337783813, }, },
Paint = Input {
SourceOp = "Rectangle4",
Source = "Out",
},
Width = Input { Value = 0.785607196390629, },
Height = Input { Value = 0.0053333044052124, },
},
},
Rectangle4 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.814092963933945, 0.512000013142824, }, },
Paint = Input {
SourceOp = "Rectangle3",
Source = "Out",
},
Width = Input { Value = 0.00299853086471558, },
Height = Input { Value = 0.922666691243649, },
},
},
Rectangle3 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.562218904495239, 0.512000005692244, }, },
Paint = Input {
SourceOp = "Rectangle2",
Source = "Out",
},
Width = Input { Value = 0.0029984712600708, },
Height = Input { Value = 0.928000010550022, },
},
},
Rectangle2 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.308845579624176, 0.513333346694708, }, },
Paint = Input {
SourceOp = "Rectangle1",
Source = "Out",
},
Width = Input { Value = 0.00599700212478638, },
Height = Input { Value = 0.94133336097002, },
},
},
Rectangle1 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor", },
Inputs = {
Center = Input { Value = { 0.121439278125763, 0.513333339244127, }, },
Width = Input { Value = 0.00299850106239319, },
Height = Input { Value = 0.946666680276394, },
},
},
Background2 = Background {
Inputs = {
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1, },
[1] = { 1, 1, 1, 1, },
},
},
},
},
ViewInfo = OperatorInfo { Pos = { 292, 228, }, },
},
},
}
animationsbychris.com