...

Lenses in pathtracers are ignored.

Lentil is an advanced camera toolkit for the Arnold renderer. It is a set of shaders that extends creative control and physical correctness, while significantly reducing the time (~30x) needed to render bokeh through bidirectional sampling of camera rays.

Stockholm-icons / Weather / Wind Created with Sketch.

Bidirectional

By decoupling camera rays from primary rays, our bidirectional adaptive sampling of bokeh makes rendering depth of field in-camera much quicker. Our mission is to completely remove the necessity to use post-production defocusing tools.

Stockholm-icons / General / Settings-1 Created with Sketch.

Like a zdefocus, but better.

Lentil works in a similar fashion to a deep-exr zdefocus, embedded into the renderer. However - due to access to the raw sample data and the capability to trace rays in the scene, the result is more accurate, without the common artefacts that come with a 2D solution.

Stockholm-icons / General / Thunder-move Created with Sketch.

Creative control

The thinlens model features additional creative control over the appearance of bokeh. See all features here. The polynomial optics model includes many different vintage lenses to suit to your needs. See all lens models here.

Default Arnold Sampling [equal time comparison, 10AA]. With Lentil Enabled [equal time comparison, 5AA].
Arnold Default Thin Lens [30s, 8AA] Lentil Thin-Lens Bidirectional [30s, 5AA] Arnold Default Thin-Lens [15m, 40AA] - Unpractical for any production scene Lentil Bidir (Cooke Speed Panchro) [10m, 5AA]
...
Lentil in action. Real-time recording from the viewport.

Polynomial Optics

Polynomial optics is the state-of-the-art in fast, physically plausible lens simulation. This camera model uses real lens data, but precalculates it in a way that all information about the lens is discarded. This means there is no performance difference between a lens with 5 or 25 optical elements.

Many times faster than pota due to bidirectional sampling

Takes data from lens patents (render through a 1900's Petzal, 1930's Cooke Speed Panchro or any of the available lenses)

Physically correct distortion, coma, astigmatism, field curvature, spherical aberration & optical vignetting

Prime lenses only

Thin-Lens

We extended the classical thin-lens model with additional creative control, while also significantly improving the performance.

Many times faster than default Arnold camera (~30x), achieved by decoupling camera rays from primary rays

Uses common controls found on cameras, such as f-stop.

Optical Vignetting (Cateye bokeh)

Anamorphic bokeh

Image-based bokeh

Add additional luminance to bokeh only

Circle to square transitions (useful for anamorphic looks)

Coma aberration

Empirical Chromatic aberration


Bidirectional, you say?

Stockholm-icons / Media / Repeat Created with Sketch.

To get clean, sharp bokeh - very small bright highlights need to be sampled. Unfortunately this is a tricky scenario for a unidirectional pathtracer, resulting in an unpractical amount of required AA samples. Lentil is designed to give Arnold a (bidirectional) hand in these scenarios. AA samples can be left at a reasonable amount, and bokeh will be supersampled without having to trace each camera ray throughout the whole scene.

Adaptive bidirectional sampling

For each first ray-path vertex, Lentil decided if its energy should get re-integrated backwards through the lens. No need to oversample the whole scene only to clean up the out of focus regions.

Implemented into custom camera shader, filter & imager

Cleaned up bokeh is pushed to the IPR during the render through the use of a custom Arnold imager. The setup is done automatically by the custom camera shader, making the setup fail-proof. Check out the docs for your DCC-specific workflow.

Custom cryptomatte implementation

Cryptomatte is fully supported.

?

Which DCC's are supported?

In theory, all of them. Tailored interface files are supplied for MtoA, HtoA, C4dToA & KtoA. MaxtoA should work as well, but since I do not test on this platform, I do not officially "support" it.

?

What about Arnold GPU?

Arnold does not yet support custom plugins for the GPU.

?

Join our discord community

It's the best place to get quick help with your issues: https://discord.gg/SyKPKqtHxp

?

Found a bug?

That's always a fun one. Software is written by humans & mistakes are a part of life. Please let me know (email/discord) and I'll look into it. Include a repro-scene for karma points.

?

Minimum required Arnold version

Core: > 7.1.1.0

MtoA: > 5.1.1.0

C4dToA: > 4.2.0

HtoA: > 6.1.1.0

MaxToA: > 5.2.0.0