C4D workflow


The bidirectional component runs after the light integration has already been completed. When looping over all the samples at the filtering stage, it detects high intensity samples with a luminance exceeding param: bidir_min_luminance. When one of these high intensity samples is found, it will re-integrate its energy over many rays shot backwards through the lens.



A video showing the setup steps described on this page.


1. Create a lentil camera

From the arnold menu, add a lentil_camera camera.


2. Set up parameters in the camera attributes

Set param: units to the same value as the export scale in the global render settings.

Set the bidirectional sample multiplier param: bidir_sample_mult. The bokeh samples are decoupled from the AA sample count. A good interactive baseline is around 1-5, although you might want to increase this when dealing with very small highlights, or decrease it when dealing with larger high luminance areas. Lentil will automatically modulate the sample count based on the screenspace area footprint of the bokeh.

Set the minimum luminance a sample needs to have to be re-integrated using param: bidir_min_luminance. Luminance equals r*0.21 + g*0.71 + b*0.072.


3. Add the Lentil Operator

In the global render settings, navigate down to the Advanced section. There you will be able to create a new lentil_operator. No additional settings have to be adjusted here.

This operator will inject the correct lentil filter to all AOVs.


4. Add the Lentil Imager

In the global render settings, click on "Effect...". From there, add an Arnold Imager & switch it to lentil_imager.


5. (optional) Double check the samples that will trigger the bidirectional component

A debug mode is provided to check which samples are going to be triggering the bidirectional sampling. Enable it with the bidir_debug parameter in the camera settings. Make sure you adjust param: bidir_min_luminance to keep the white area around the highlights. Supersampling large diffuse areas is simply a waste of time.

RGBA You're going to waste time Excellent!

Final checklist

The bidirectional sampling only kicks into action when:

  • The AA samples are larger or equal to 3.
  • An operator of type: lentil_operator has been added.
  • An imager of type: lentil_imager has been added.
  • param: bidir_min_luminance is not 0.
  • param: bidir_sample_mult is not 0.