Lens Compositing Node
The download contains a blendfile from which you can append the nodegroup "lens anamorph" or "lens dslr". anamorph will produce horizontally stretch within the bokehs and iris.
CYCLES:
Once appended to your scene you can setup the node in compositor as follows:
- go to render layers and activate render passes for "emission" and "glossy direct"
- go to node editor and choose the compositor view
- check "use nodes" to get the render layer node and the compositor node
- add the lensnode from "add/groups/lens anamorph"
- connect the render layer output (image, emit, glossy direct) to the lens nodeinput, and the lens node output to the compositor node
- render a frame to see the effect and adjust the parameters to set the intensities of each type of abberation
The node is meant to be used with the render passes of emission and gloss.
But their input to the node is just like a mask, to determine which pixels glow and which dont.
So any image can be used as input for Emit and Glossy input in the node. In case you have only a rendered Image you could use the bright pixels of this image as source for lensflares.
Bias them with a converter/math node set to "greater than" as shown in the image. the brightness bias is set to 0.99 so that only white pixels will be source of light. further soften the mask with a filter/blur set to "fast gaussian". 50 pixels where used in x and y axis in this example.
EEVEE:
If you want to use Eevee, which doesnt have passes, you could just use the bright pixels inyour rendered image as source for lensflares, by grading them. Here i used a rgb curve node to adjust the image as emission input for the lensflare node:
UPDATE NOVEMBER 2020:
Further Options are added, to drive the Style of the Effect.
The "bokeh" parameters has been correctly renamed to "ghost" properties.
NEW PARAMETERS:
ghostblur: blurring the ghosts
- ghost aspect: anamorph aspect to stretch ghosts
-
ghost tint col & ghost tint factor: colortint for the ghosts
-
"streaks"
-
"dust"
Discover more products like this
Lens flares bfcm24 summer23 dev-fund reflection spring24 bfcm23 Post-Processing abberation loveblender bfcm21 bokehs cat eye caustic winter24 bcon22 anamorph light compositor node summer24 spring23 bfcm22 bfcm19 streaks