Lens Compositing Node

by NM-8 in Surfacing


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:

  1. go to render layers and activate render passes for "emission" and "glossy direct"
  2. go to node editor and choose the compositor view
  3. check "use nodes" to get the render layer node and the compositor node
  4. add the lensnode from "add/groups/lens anamorph"
  5. connect the render layer output (image, emit, glossy direct) to the lens nodeinput, and the lens node output to the compositor node
  6. 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"



Sales 200+
Customer Ratings 3
Average Rating
Dev Fund Contributor
Published about 8 years ago
Blender Version 2.7x, 2.77, 2.78, 2.79, 2.8, 2.81, 2.82, 2.83, 2.9, 2.91, 2.92, 2.93, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 4.0
License Royalty Free
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message