Chaos
Architecture

Industry solutions

Explore our ecosystem

Products

Media & Entertainment

Industry solutions

Explore our ecosystem

Products

Product & E-Commerce

Industry solutions

Explore our ecosystem

Products

Education & CommunityHelp

Chaos Help Center


What are you looking for?

understanding_lens_effects_image8_header.jpg
understanding_lens_effects_image8_header.jpg

The light touch: Your complete guide to V-Ray lens effects


The V-Ray Frame Buffer’s bloom and glare Lens Effects are the unsung heroes of great renders. Expert Ricardo Ortiz explains how they work and how to use them.


The Lens Effects tool in the V-Ray Frame Buffer (VFB) can be the difference between a good render and a great one. After many years of research, and observation and analysis of the real world, these effects take into account the design of a camera lens to perfectly simulate bloom and glare, the naturally occurring aberrations that surround light sources. In this article, I’ll guide you through what the lens effects do and how you can tweak them to your liking.


Why do we need Lens Effects?

Light sources in V-Ray scenes can often appear blown-out, as very white areas and bright pixels. When we look at these renders, we may not notice the light source — and this is where bloom and glare effects come in.

In case you're wondering, bloom refers to the soft glow around light sources that can affect the overall image, whereas glare refers to the star-like rays that extend from a light source. By adding these effects, we can subtly draw attention to light sources and add photorealism to our renders.

The main factor in bloom and glare is diffraction, which refers to the way light waves are split apart when they pass through an aperture, such as a lens or even the pupil of an eye.

These effects are never calculated during the ray tracing process by the render engine. Instead, they are evaluated in a separate process that allows us to have more artistic control over factors that determine the final appearance of the effect; physical characteristics such as diffraction, environmental circumstances, camera lens aberrations, and distortion.

Lens Effects off (left) and on (right)

Diffraction and imperfections


Nothing is perfect. Every digital artist strives to add imperfections to models, materials, and textures to create a realistic render.

Likewise, when we use a camera to capture an object, person, or scene, the lens is not completely flawless. It has distortions and scratches from use, as well as dirt. In addition, the environment is not clean, with impurities such as dust or smog in the air. Rather than avoiding these factors, they can help define a precise moment in time and space.

understanding_lens_effects_image5.jpg

How do I  use Lens Effects in the V-Ray Frame Buffer?

As I have mentioned, light sources represented by white dots in our render are pixels with a very high-intensity value. If we examine the pixel information in the VFB, we notice that certain white areas have intensity values greater than 1; sometimes they can be very high. Because the VFB stores information about our rendered image in RAW format, this data can be used to create accurate Lens Effects based on the brightness of the light source.

understanding_lens_effects_image1.gif

Once Lens Effects are on, we can make adjustments. Almost all the time we need to change at least one for more realistic results.

understanding_lens_effects_image7.gif

If you want to know more about what factors determine all kinds of glare effects, don’t miss Asen Atanasov’s amazing presentation.

Asen's work also allowed us to redesign the Lens Effects user interface in the VFB. It now contains procedural and customizable settings options, allowing users to create more and better results. 


Lens effect examples

Let's take a look at some of the effects that are possible in the VFB. In each of these examples, the top shows the simulated pattern of distortion on the lens, and the bottom shows the result in the render.


Procedural scratches

Some diffraction effects found in the real world.

understanding_lens_effects_image9_crop.jpg

Procedural dust

Random points on grid and procedural.

understanding_lens_effects_image2_crop.jpg

Peripheral grating, occlusion, or obstacle image

These effects occur in the human eye due to elongated cells.

understanding_lens_effects_image3_crop.jpg

Hardware-accelerated

Generating lens effects are relatively demanding and can consume a lot of memory if the resolution of the rendered images is too large.

By default, Lens Effects are GPU accelerated, with support for both Nvidia and AMD GPUs. If the memory consumption exceeds the VRAM capacity of our GPU, then the process is evaluated by the CPU. You may notice decreased performance, but it will work correctly.


Conclusion

Now you should have a better understanding of what lens effects are, the science behind them, and how to use them. They really can add a touch of realism to your scene, and tweaking them can change the atmosphere and mood. And, because the Lens Effects are part of the VFB, you can use them without leaving your favorite renderer.

Play with Glare and Bloom

Try V-Ray free for 30 days
Ricardo_Ortiz_540x540.jpg
About the author

Ricardo Ortiz

As part of the Chaos team, Ricardo is responsible for growing and supporting our Spanish-speaking user community, including "Hablamos Chaos," which has over 60K Facebook members. Ricardo is a V-Ray Certified Professional in V-Ray for 3ds Max, V-Ray for Maya, V-Ray for Rhino and V-Ray for SketchUp. He has worked as an instructor for over 10 years in industries including arch viz, VFX and product design. Ricardo is also a university teacher in industrial design, architecture and digital animation.

Originally published: March 30, 2023.
© Škoda Design

Subscribe to our blog.

Get the latest news, artist spotlight stories, tips and tricks delivered to your inbox.

By submitting your information you are agreeing to receive marketing messages from Chaos. You can opt-out at any time. Privacy Policy.

Chaos
© 2024 Chaos Software EOOD. All Rights reserved. Chaos®, V-Ray® and Phoenix FD® are registered trademarks of Chaos Software EOOD in Bulgaria and/or other countries.