Lens Effects

This page provides information on the Lens Effects tools found in the V-Ray Frame Buffer.

Page Contents

Overview

Lens Effects is a render effect plug-in that simulates real-world camera lens effects such as bloom and glare. The Lens Effects plug-in uses a fast multi-threaded technique to compute the result. The effects are visible in the VFB immediately. Using Lens Effects creates a channel in the VFB named effectsResult which holds the image that results after the effects are executed over the RGB rendered image.

Clicking the Open lens effects settings button on the VFB Toolbar opens the Lens Effects fly-out.

V-Ray includes a standalone Lens Effects Generator Tool for composing filters.

The Lens Effects window can be docked or undocked from the VFB by right-clicking the Open lens effects settings button.

images/download/attachments/13830918/max2016_33_AreaLights_Sphere_Rendering2.png

UI Path: ||V-Ray Frame Buffer Toolbar|| > Open lens effects settings button


images/download/attachments/13830918/max2016_36001_LensEffects_UIPath.png


Result Channel

When lens effects are applied, a new channel called effectsResult will be created in the VFB. The RGB Channel button allows users to easily toggle between the effectsResult and original RGB channel.


images/download/attachments/13830918/Max2016_vray35501_LensEffects_effectsResult.png


Bloom Effect

images/download/attachments/13830918/max2016_33_LensEffects_BloomEffect_v02.png

On – Turns on the bloom lens effect.

Fill Edges – When enabled, adds pixel data outside the edges of the original image. This will remove the darkening around the edges.

Mode – Determines if the bloom effect will be applied to the final image (in the effectsResult channel), stored into a separate render element, or both.

Weight – Specifies the strength of the interpolation between the filtered image and the original image.

Size – Specifies the size of the filter as percentage of the image's width.

Shape – Specifies the fall off of the filter.

Bloom Mask

The controls in this group allow the user to control where the bloom effect will be applied to the image.

images/download/attachments/13830918/max2016_33_LensEffects_BloomMask_v02.png

Intensity – When enabled, the bloom effect will be applied only around pixels that have a value larger than the number specified in the field to the right.

Object ID – When enabled, the bloom effect will be applied only to objects with the specified ID.

Material ID – When enabled, the bloom effect will be applied only to materials with the specified ID.

Glare Effect


images/download/attachments/13830918/max2016_33_LensEffects_GlareEffect_v02.png


On – Turns on the glare lens effect.

Fill Edges – Enabling this option will add pixel data outside the edges of the original image. This will remove the darkening around the edges.

Type – Specifies how the glare is computed. The possible values are:

From image – Takes the image specified in Glare Image as filter kernel.
From render camera
– Takes the necessary parameters from the camera used to perform the rendering and automatically generates the filter kernel.
Glare type from camera params
– Takes the camera parameters specified in the VRayLensEffects render effect itself and automatically generates the filter kernel.

Mode – Determines if the glare effect will be applied to the final image (in the effectsResult channel), stored into a separate render element, or both.

Weight – Specifies the strength of the interpolation between the filtered image and the original image.

Size – Specifies the size of the filter as percentage of the image's width.

Glare Image – Specifies the path to the filter kernel. Available if From Image option is selected. you can create filters using the Filter generator tool which comes with the V-Ray for 3ds Max installation.

Turn On Diffraction – Turns the diffraction on, producing colored patterns in the glare.

Use Obstacle Image – Enable the use of the obstacle image the path to which is specified in the field below. The obstacle image allows you to draw the aperture shape as wall as any dirt or scratches on the lens which will affect the glare

Camera Parameters

These parameters are used if the glare Type is set to From camera parameters. The options allow us to use physical camera settings that are different from the ones used to render the image and thus control the glare separately.

images/download/thumbnails/13830918/max2016_33_LensEffects_CameraParameters_v02.png

F-Number – The f-number used to calculate the glare. Larger values produce smaller camera aperture and stronger glare effects.

Blades – Controls whether the camera aperture has any blades and, if so, how many they are. This effect directly controls the number of "rays" of the glare.

Bl. Rot – Controls the rotation of the of the camera aperture blades.

Glare Mask

The controls in this group allow the user to control where the glare effect will be applied to the image.

images/download/attachments/13830918/max2016_33_LensEffects_GlareMask_v02.png

Intensity – When enabled, the glare effect will be applied only around pixels that have a value larger than the number specified in the field to the right.

Object ID – When enabled, the glare effect will be applied only to objects with the specified ID.

Material ID – When enabled, the glare effect will be applied only to materials with the specified ID.

Hardware Accelerated – Enable to calculate lens effects on the GPU. When multiple devices are present, V-Ray will prioritize the best one available.

Update Control

The options in this group allow us to control how changes to the bloom and glare effects are updated.

images/download/attachments/13830918/UpdateControl.PNG

Interactive – When enabled, the bloom and glare effects will be automatically recalculated and applied to the image each time an option is changed.

Update effects – Manually forces the recalculation of the glare and bloom effects.

Hardware Accelerated – Enable to calculate lens effects on the GPU. When multiple devices are present, V-Ray will prioritize the best one available.

File Names of Saved Channels

As expected, channels will keep their names as displayed in the VFB when saving them to a single .vrimg or .exr file (using the V-Ray raw image file option from the Frame buffer rollout or the Save all image channels to single file VFB button). The same channel names will be appended to the files when you use the VFB button Save all image channels to separate files.

However, using the Save separate render channels option from the Frame buffer rollout to save all layers as separate files will save the effectsResult channel to a file with the text RGB_color appended to its name, and the RGB channel as origRGB instead.