Welcome to WSL!

New to the forum? Please read this and this.

[DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

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: 252
Joined: Mon Jan 27, 2020 4:37 am
Answers: 1
Real name: none
Been thanked: 38 times

[DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

#1

Post by tida »

The idea of this fast disk-like Bokeh fuse is, to convolve an image by means of an integrated Bokeh image. This consists of evenly spaced points arranged as a disk.
It can be realized by the Vogel’s spiral formation method described in the following article p.26:

https://apps.dtic.mil/dtic/tr/fulltext/u2/a626479.pdf

The pattern of this kind of spiral formation can be found all over the natural world such as in the arrangement of seeds on the head of a
sunflower.
Sunflower.jpg
This ensures that iterations for the convolve can be reduced strongly when a subsequent auto-variable blur takes place to fill the small gaps between the points. As a result, you should receive a high quality disk-like Bokeh driven by a fast algorithm.
td_DiskBokeh.fuse
DiskBokeh.PNG
You do not have the required permissions to view the files attached to this post.

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

Re: [DEV] DCTL Disk Bokeh Fuse: Add ERODE/DILATE

#2

Post by tida »

I follow a discussion between @BigRoyNL and @Midgardsormr about the idea to develop a Erode/Dilate Tool whereas the strength can be changed by a mask.
Hence, I did add erode/dilate functionality to this bokeh fuse as the changes in coding are small.
td_DiskBokeh.fuse
ErodeDilate.PNG
You do not have the required permissions to view the files attached to this post.

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

Re: [DEV] DCTL Disk Bokeh Fuse: additional Outline Filter

#3

Post by tida »

I did add an Outline functionality as well. To get the Outline or Contour of an object you can Subtract Erode from Dilate. An additional In/Out Ratio Slider can take care about the shift between Erode and Dilate.

Outline.PNG
td_DiskBokeh.fuse
You do not have the required permissions to view the files attached to this post.

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

Re: [DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

#4

Post by tida »

Have to rename the fuse. Did integrate a polygon spiral as well. This enables also to convolve pentagons, hexagons etc.
the convolve options for Sunflower Spiral and Polygon Spiral are: Bokeh, Erode/Dilate and Outline.
td_SpiralConvolution.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
danell
Fusioneer
Posts: 249
Joined: Mon Dec 12, 2016 6:32 am
Been thanked: 13 times

Re: [DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

#5

Post by danell »

Awesome work Tida!
Just tried the latest Spiral fuse. Compared to the Disk fuse, the diskfuse seems to blur the dots while the spiral doesn't. Is there a way to do this or do I have to add a blur node after?

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

Re: [DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

#6

Post by tida »

@danell The second slider should be the Mix Blur. You should increase it that way, that at a higher radius the pattern will just become unnoticable. (If max 5 is not enough just type a higher value)

In case you decrease the radius subsequently, the blur will also be decreased automatically. Hence, at radius zero no blur is possible.
This post blur is a very fast multi-pass gaussian blur and has the advantage that it also reacts when using Channel2 for a depth mask image or vignette.

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

Re: [DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

#7

Post by tida »

Another trick to get a denser pattern would be, to use two of the nodes one after each other. The first with a small radius using a circular pattern and the second with the desired polygon and higher radius. In this case, you should be able to lower the number of Iterations much more and receive a sharper bokeh.
At the moment I do not see any speed advantages because of the two nodes processing. But maybe when I integrate this multi-pass convolve (sparse) technique I could receive further speed enhancements. (The idea is going similar as I did with the multi-pass Gaussian blur)
Combination.PNG
You do not have the required permissions to view the files attached to this post.

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

Re: [DEV] DCTL Disk Bokeh Fuse: Sunflower Seed Pattern for Speed and Beauty

#8

Post by tida »

This Spiral Convolution Fuse can also act as a Duplicate Fuse. Just use a few Iterations (number of particles) and apply a large Radius.
Video shows a short example whereas I did input the FireGon Fuse and added a ColorCorrector and a SoftGlow subsequently.

The Spiral Convolution Fuse got a Circle Mask to receive the spherical illusion...

viewtopic.php?p=37721#p37721



  1. {
  2.     Tools = ordered() {
  3.         Ellipse1 = EllipseMask {
  4.             Inputs = {
  5.                 Filter = Input { Value = FuID { "Fast Gaussian" }, },
  6.                 SoftEdge = Input { Value = 0.0929, },
  7.                 BorderWidth = Input { Value = 0.054, },
  8.                 MaskWidth = Input { Value = 1920, },
  9.                 MaskHeight = Input { Value = 1080, },
  10.                 PixelAspect = Input { Value = { 1, 1 }, },
  11.                 ClippingMode = Input { Value = FuID { "None" }, },
  12.                 Center = Input { Value = { 0.501503759398496, 0.481283422459893 }, },
  13.             },
  14.             ViewInfo = OperatorInfo { Pos = { 380.667, -28.3939 } },
  15.         },
  16.         td_SpiralConvolution1 = Fuse.td_SpiralConvolution {
  17.             Inputs = {
  18.                 Radius = Input {
  19.                     SourceOp = "td_SpiralConvolution1Radius",
  20.                     Source = "Value",
  21.                 },
  22.                 MixBlur = Input { Value = 0, },
  23.                 Swirl = Input {
  24.                     SourceOp = "td_SpiralConvolution1Swirl",
  25.                     Source = "Value",
  26.                 },
  27.                 Angle = Input { Value = 0.252, },
  28.                 Iterations = Input { Value = 30, },
  29.                 MaskIntensity = Input { Value = 2, },
  30.                 boolBW = Input { Value = 0, },
  31.                 Amplify = Input { Value = 1.921, },
  32.                 CoreGradient = Input { Value = 0, },
  33.                 iChannel2 = Input {
  34.                     SourceOp = "Ellipse1",
  35.                     Source = "Mask",
  36.                 },
  37.                 iChannel0 = Input {
  38.                     SourceOp = "td_FireGon1",
  39.                     Source = "Output",
  40.                 },
  41.             },
  42.             ViewInfo = OperatorInfo { Pos = { 371.333, 43.1212 } },
  43.             Version = 1
  44.         },
  45.         td_SpiralConvolution1Radius = BezierSpline {
  46.             SplineColor = { Red = 203, Green = 39, Blue = 245 },
  47.             NameSet = true,
  48.             KeyFrames = {
  49.                 [0] = { 0, RH = { 33.3333333333333, 0 }, Flags = { Linear = true } },
  50.                 [100] = { 0, LH = { 66.6666666666667, 0 }, RH = { 127, 129.333333333333 }, Flags = { Linear = true } },
  51.                 [181] = { 388, LH = { 154, 258.666666666667 }, RH = { 240.333333333333, 383.666666666667 }, Flags = { Linear = true } },
  52.                 [359] = { 375, LH = { 299.666666666667, 379.333333333333 }, RH = { 385.666666666667, 250 }, Flags = { Linear = true } },
  53.                 [439] = { 0, LH = { 412.333333333333, 125 }, Flags = { Linear = true } }
  54.             }
  55.         },
  56.         td_SpiralConvolution1Swirl = BezierSpline {
  57.             SplineColor = { Red = 242, Green = 110, Blue = 147 },
  58.             NameSet = true,
  59.             KeyFrames = {
  60.                 [181] = { 1, RH = { 253.666666666667, 0.666666666666667 }, Flags = { Linear = true } },
  61.                 [399] = { 0, LH = { 326.333333333333, 0.333333333333333 }, Flags = { Linear = true } }
  62.             }
  63.         },
  64.         td_FireGon1 = Fuse.td_FireGon {
  65.             Inputs = {
  66.                 Scale = Input {
  67.                     SourceOp = "td_FireGon1Scale",
  68.                     Source = "Value",
  69.                 },
  70.                 RatioWH = Input { Value = 1.055, },
  71.                 PolyBend = Input {
  72.                     SourceOp = "td_FireGon1Bend",
  73.                     Source = "Value",
  74.                 },
  75.                 Corona = Input {
  76.                     SourceOp = "td_FireGon1Corona",
  77.                     Source = "Value",
  78.                 },
  79.                 Volume = Input {
  80.                     SourceOp = "td_FireGon1Volume",
  81.                     Source = "Value",
  82.                 },
  83.                 Ring = Input {
  84.                     SourceOp = "td_FireGon1Ring",
  85.                     Source = "Value",
  86.                 },
  87.                 Contrast = Input {
  88.                     SourceOp = "td_FireGon1Contrast",
  89.                     Source = "Value",
  90.                 },
  91.                 Alpha = Input { Value = 0, },
  92.                 iChannel0 = Input {
  93.                     SourceOp = "Background1",
  94.                     Source = "Output",
  95.                 },
  96.             },
  97.             ViewInfo = OperatorInfo { Pos = { 257.333, 42.5151 } },
  98.             Version = 2
  99.         },
  100.         td_FireGon1Scale = BezierSpline {
  101.             SplineColor = { Red = 241, Green = 4, Blue = 55 },
  102.             NameSet = true,
  103.             KeyFrames = {
  104.                 [443] = { 0.1, RH = { 462.333333333333, 0.447333333333333 }, Flags = { Linear = true } },
  105.                 [501] = { 1.142, LH = { 481.666666666667, 0.794666666666667 }, RH = { 527.333333333333, 1.142 }, Flags = { Linear = true } },
  106.                 [580] = { 1.142, LH = { 553.666666666667, 1.142 }, RH = { 587.666666666667, 2.428 }, Flags = { Linear = true } },
  107.                 [603] = { 5, LH = { 595.333333333333, 3.714 }, Flags = { Linear = true } }
  108.             }
  109.         },
  110.         td_FireGon1Bend = BezierSpline {
  111.             SplineColor = { Red = 19, Green = 233, Blue = 120 },
  112.             NameSet = true,
  113.             KeyFrames = {
  114.                 [443] = { 3.8, RH = { 444, 2.86666666666667 }, Flags = { Linear = true } },
  115.                 [446] = { 1, LH = { 445, 1.93333333333333 }, RH = { 490.666666666667, 1 }, Flags = { Linear = true } },
  116.                 [580] = { 1, LH = { 535.333333333333, 1 }, Flags = { Linear = true } }
  117.             }
  118.         },
  119.         td_FireGon1Corona = BezierSpline {
  120.             SplineColor = { Red = 34, Green = 240, Blue = 180 },
  121.             NameSet = true,
  122.             KeyFrames = {
  123.                 [501] = { 0, RH = { 527.333333333333, 0.320333333333333 }, Flags = { Linear = true } },
  124.                 [580] = { 0.961, LH = { 553.666666666667, 0.640666666666667 }, Flags = { Linear = true } }
  125.             }
  126.         },
  127.         td_FireGon1Volume = BezierSpline {
  128.             SplineColor = { Red = 247, Green = 134, Blue = 140 },
  129.             NameSet = true,
  130.             KeyFrames = {
  131.                 [501] = { 0.354, RH = { 527.333333333333, 0.443333333333333 }, Flags = { Linear = true } },
  132.                 [580] = { 0.622, LH = { 553.666666666667, 0.532666666666667 }, Flags = { Linear = true } }
  133.             }
  134.         },
  135.         td_FireGon1Ring = BezierSpline {
  136.             SplineColor = { Red = 232, Green = 240, Blue = 86 },
  137.             NameSet = true,
  138.             KeyFrames = {
  139.                 [501] = { 0.079, RH = { 527.333333333333, 0.107666666666667 }, Flags = { Linear = true } },
  140.                 [580] = { 0.165, LH = { 553.666666666667, 0.136333333333333 }, Flags = { Linear = true } }
  141.             }
  142.         },
  143.         td_FireGon1Contrast = BezierSpline {
  144.             SplineColor = { Red = 30, Green = 244, Blue = 8 },
  145.             NameSet = true,
  146.             KeyFrames = {
  147.                 [501] = { 0.299, Flags = { Linear = true } }
  148.             }
  149.         },
  150.         Background1 = Background {
  151.             Inputs = {
  152.                 GlobalOut = Input { Value = 640, },
  153.                 Width = Input { Value = 1920, },
  154.                 Height = Input { Value = 1080, },
  155.                 Depth = Input { Value = 2, },
  156.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  157.             },
  158.             ViewInfo = OperatorInfo { Pos = { 147.334, 41.9091 } },
  159.         },
  160.         ColorCorrector1 = ColorCorrector {
  161.             CtrlWZoom = false,
  162.             Inputs = {
  163.                 WheelHue1 = Input { Value = 0.41, },
  164.                 WheelSaturation1 = Input { Value = 1.56, },
  165.                 WheelTintAngle1 = Input { Value = 0.126917436660736, },
  166.                 WheelTintLength1 = Input { Value = 0.803, },
  167.                 MasterRGBGamma = Input { Value = 0.84, },
  168.                 ColorRanges = Input {
  169.                     Value = ColorCurves {
  170.                         Curves = {
  171.                             {
  172.                                 Points = {
  173.                                     { 0, 1 },
  174.                                     { 0.4, 0.2 },
  175.                                     { 0.6, 0 },
  176.                                     { 1, 0 }
  177.                                 }
  178.                             },
  179.                             {
  180.                                 Points = {
  181.                                     { 0, 0 },
  182.                                     { 0.4, 0 },
  183.                                     { 0.6, 0.2 },
  184.                                     { 1, 1 }
  185.                                 }
  186.                             }
  187.                         }
  188.                     },
  189.                 },
  190.                 HistogramIgnoreTransparent = Input { Value = 1, },
  191.                 Input = Input {
  192.                     SourceOp = "td_SpiralConvolution1",
  193.                     Source = "Output",
  194.                 },
  195.             },
  196.             ViewInfo = OperatorInfo { Pos = { 486.667, 43.1212 } },
  197.         },
  198.         SoftGlow1 = SoftGlow {
  199.             Inputs = {
  200.                 Filter = Input { Value = FuID { "Fast Gaussian" }, },
  201.                 Input = Input {
  202.                     SourceOp = "ColorCorrector1",
  203.                     Source = "Output",
  204.                 },
  205.             },
  206.             ViewInfo = OperatorInfo { Pos = { 597.333, 42.5152 } },
  207.         }
  208.     }
  209. }