Welcome to WSL!

New to the forum? Please read this and this.

[DEV] DCTL Convolve Bokeh Fuse

Where the future is being made, today.

Welcome to the WSL development corner!

In this forum, please post your development projects. You get kudos and feedback here.
Topics ideally have preset prefixes, and this is what they (might) mean:

  • [DEV] - very much work in progress, don't build a business on this, could go anywhere
  • [BETA] - should kinda do what it's supposed to do, please test, give feedback
  • [RC] - this may end up in Reactor soon, polishing up, now's the time for last minute thoughts
  • [ABD] - died a premature death, sadness, will not see the light of day ever (unless someone picks up the scraps)

Once a development project has been released (hurray), topics can be marked as - you guessed it - [RELEASED] :cheer:

Development topics only, please. For generic questions, how-to's, questions and inquiries about existing tools etc, please go to the appropriate other forums.
User avatar
tida
Fusionista
Posts: 257
Joined: Mon Jan 27, 2020 4:37 am
Answers: 1
Real name: none
Been thanked: 41 times

Re: [DEV] DCTL Convolve Bokeh Fuse

#46

Post by tida »

Just an additional Macro that adds quickly Chromatic Aberration to the final Image. All RGB shifts take place symmetrically. It also imparts a Blend Slider to have the possibility to animate changes when changing bokeh blur size.
td_Bokeh_AChroma.setting
You do not have the required permissions to view the files attached to this post.

User avatar
tida
Fusionista
Posts: 257
Joined: Mon Jan 27, 2020 4:37 am
Answers: 1
Real name: none
Been thanked: 41 times

Re: [DEV] DCTL Convolve Bokeh Fuse

#47

Post by tida »

Made some improvements:

A) Implemented micro-dithering to prevent some pattern formation when changing the size of bokeh. It will give an anti-aliasing effect while processing time is not influenced too much. @Midgardsormr comments during his VariDilate Fuse development about solving rounding issues helped a lot.
B) Fixed a small bug when scanning the bokeh image
C) Improved the Gaussian-Blur Mix functionality
td_Bokeh.fuse
MicroDithering.PNG
Scaled Bokeh Image 100x100 pixel - left original - right convolve with micro dithering (without blur mix)
Bokeh 100x100.PNG

Dithering is driven by a random function like below and some x/y coordinate dependencies. This looks a little bit strange but you have to play with different operations, that some higher-level pattern will not occur.
The dithering takes place by covering a circular area, hence the Size must be increased by the power of 2.
  1. __DEVICE__ inline float random(float r) {return fract1f(sin(2811.6871f*r)*4356543.453f);}
  2.  
  3.  
  4.   .......
  5.     float x0 = x + (random(x*_sinf(y))*Size*Size);
  6.     float y0 = y + (random(y*y+x)*Size*Size);
You do not have the required permissions to view the files attached to this post.

User avatar
tida
Fusionista
Posts: 257
Joined: Mon Jan 27, 2020 4:37 am
Answers: 1
Real name: none
Been thanked: 41 times

Re: [DEV] DCTL Convolve Bokeh Fuse

#48

Post by tida »

Did add new functionality:

a) Did add Erode/Dilate as well as Outline
b) You can control the (purple) Mask Input now with Dark Point, Contrast and Pivot
c) Did add X/Y Displacement which is controlled by the (purple) Mask Input
d) The Micro Dither is now controlled by a Mix Slider
td_Bokeh.fuse


Below is a Comp to demonstrate how easy it is to get the title burn effect from the video. A Fast Noise is attatched to the Mask Input. It's size, detail and contrast is adjusted that a displacement looks natural. Erosion is also driven by the Mask and subsequent size (white point), black point, contrast and pivot adjustment let one control the fire detail.
  1. {
  2.     Tools = ordered() {
  3.         Background1 = Background {
  4.             Inputs = {
  5.                 GlobalOut = Input { Value = 300, },
  6.                 Width = Input { Value = 1920, },
  7.                 Height = Input { Value = 1080, },
  8.                 Depth = Input { Value = 2, },
  9.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  10.             },
  11.             ViewInfo = OperatorInfo { Pos = { 496.667, 66.7575 } },
  12.         },
  13.         Merge2 = Merge {
  14.             Inputs = {
  15.                 Background = Input {
  16.                     SourceOp = "Background1",
  17.                     Source = "Output",
  18.                 },
  19.                 Foreground = Input {
  20.                     SourceOp = "Text1",
  21.                     Source = "Output",
  22.                 },
  23.                 PerformDepthMerge = Input { Value = 0, },
  24.             },
  25.             ViewInfo = OperatorInfo { Pos = { 620, 66.7575 } },
  26.         },
  27.         Glow1 = Glow {
  28.             Inputs = {
  29.                 Blend = Input { Value = 0.819, },
  30.                 Filter = Input { Value = FuID { "Fast Gaussian" }, },
  31.                 XGlowSize = Input { Value = 4.7, },
  32.                 Glow = Input { Value = 0.748, },
  33.                 Input = Input {
  34.                     SourceOp = "Merge2",
  35.                     Source = "Output",
  36.                 },
  37.             },
  38.             ViewInfo = OperatorInfo { Pos = { 739.333, 66.7576 } },
  39.         },
  40.         SoftGlow1 = SoftGlow {
  41.             Inputs = {
  42.                 Filter = Input { Value = FuID { "Fast Gaussian" }, },
  43.                 Threshold = Input { Value = 0.126, },
  44.                 XGlowSize = Input { Value = 41.7, },
  45.                 Input = Input {
  46.                     SourceOp = "Glow1",
  47.                     Source = "Output",
  48.                 },
  49.             },
  50.             ViewInfo = OperatorInfo { Pos = { 856, 66.1515 } },
  51.         },
  52.         td_Bokeh1 = Fuse.td_Bokeh {
  53.             Inputs = {
  54.                 FilterType = Input { Value = 1, },
  55.                 MaskDarkPoint = Input { Value = -7.2, },
  56.                 MaskContrast = Input { Value = 0.332, },
  57.                 MaskPivot = Input { Value = 0.244, },
  58.                 MixGaussian = Input { Value = 0, },
  59.                 MixMicroDither = Input { Value = 0, },
  60.                 DisplaceX = Input { Value = 5.1, },
  61.                 DisplaceY = Input { Value = 10.9, },
  62.                 iChannel0 = Input {
  63.                     SourceOp = "SoftGlow1",
  64.                     Source = "Output",
  65.                 },
  66.                 iChannel2 = Input {
  67.                     SourceOp = "FastNoise1",
  68.                     Source = "Output",
  69.                 },
  70.             },
  71.             ViewInfo = OperatorInfo { Pos = { 1008, 66.1515 } },
  72.             Version = 8
  73.         },
  74.         Text1 = TextPlus {
  75.             CtrlWZoom = false,
  76.             Inputs = {
  77.                 GlobalOut = Input { Value = 300, },
  78.                 Width = Input { Value = 1920, },
  79.                 Height = Input { Value = 1080, },
  80.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  81.                 Center = Input { Value = { 0.5, 0.356 }, },
  82.                 ElementShape1 = Input { Value = 1, },
  83.                 Green1 = Input { Value = 0.517647058823529, },
  84.                 Blue1 = Input { Value = 0.0313725490196078, },
  85.                 StyledText = Input { Value = "Bokeh Fuse\nErode / Dilate \n", },
  86.                 Font = Input { Value = "Open Sans", },
  87.                 Style = Input { Value = "Bold", },
  88.                 Size = Input { Value = 0.2087, },
  89.                 VerticalJustificationNew = Input { Value = 3, },
  90.                 HorizontalJustificationNew = Input { Value = 3, },
  91.                 ManualFontKerningPlacement = Input {
  92.                     Value = StyledText {
  93.                         Array = {
  94.                         },
  95.                         Value = ""
  96.                     },
  97.                 },
  98.             },
  99.             ViewInfo = OperatorInfo { Pos = { 619.61, 112.671 } },
  100.         },
  101.         FastNoise1 = FastNoise {
  102.             Inputs = {
  103.                 GlobalOut = Input { Value = 300, },
  104.                 Width = Input { Value = 1920, },
  105.                 Height = Input { Value = 1080, },
  106.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  107.                 Center = Input {
  108.                     SourceOp = "Path1",
  109.                     Source = "Position",
  110.                 },
  111.                 Detail = Input { Value = 4.72, },
  112.                 Contrast = Input { Value = 2.08, },
  113.                 XScale = Input { Value = 13.23, },
  114.             },
  115.             ViewInfo = OperatorInfo { Pos = { 1008.66, 117.667 } },
  116.         },
  117.         Path1 = PolyPath {
  118.             DrawMode = "InsertAndModify",
  119.             CtrlWZoom = false,
  120.             Inputs = {
  121.                 Displacement = Input {
  122.                     SourceOp = "Path1Displacement",
  123.                     Source = "Value",
  124.                 },
  125.                 PolyLine = Input {
  126.                     Value = Polyline {
  127.                         Points = {
  128.                             { Linear = true, LockY = true, X = 0, Y = 0, RX = 0, RY = 0.391333333333333 },
  129.                             { Linear = true, LockY = true, X = 0, Y = 1.174, LX = 0, LY = -0.391333333333333 }
  130.                         }
  131.                     },
  132.                 },
  133.             },
  134.         },
  135.         Path1Displacement = BezierSpline {
  136.             SplineColor = { Red = 255, Green = 0, Blue = 255 },
  137.             KeyFrames = {
  138.                 [0] = { 0, RH = { 100, 0.333333333333333 }, Flags = { Linear = true, LockedY = true } },
  139.                 [300] = { 1, LH = { 200, 0.666666666666667 }, Flags = { Linear = true, LockedY = true } }
  140.             }
  141.         }
  142.     }
  143. }
You do not have the required permissions to view the files attached to this post.