Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides information about the lighting analysis workflows with V-Ray.


Overview

...

The lighting analysis workflows with V-Ray are based around two components: the VRayLightMeter helper object, and the VRayLightingAnalysis Render Element. While the VRayLightMeter object has been included in V-Ray since version 2.0, it is updated and improved for V-Ray Next and later to ensure better precision of the results. The VRayLightingAnalysis Render Element is newer than the VRayLightMeter workflow in V-Ray.

 

VRayLightMeter Helper

...

The VRayLightMeter helper is a rectangular grid that can be added to the scene to show illuminance values at the vertices of the grid. It enables showing total illuminance, direct illuminance, indirect illuminance and daylight factor. The predominant direction from which the respective lighting component comes can also be shown.


 

Section
Column
width5%


Column
width45%

The VRayLightMeter in the 3ds Max viewport, with pseudo colors, orientation and textual illuminance values displayed.

Column
width45%

The interface of the VRayLightMeter in the 3ds Max command panel.

Column
width5%


 


Before results can be displayed in the viewport, the values for the light meter grid must be calculated either by pressing the Calculate button, or by calling the MaxScript calculate() method of the light meter (V-Ray does not automatically recalculate scene light meters during regular image rendering). The precision of the result can be controlled with the Error tolerance parameter. Higher values will be faster to calculate but may appear noisy.

...

A progress window is displayed during the calculations, which shows the current pass and provides the option to cancel the calculations:

 

 

V-Ray does not yet have a Lighting Analysis control panel so if you need to set the min/max values for all VRayLightMeter’s in the scene, you can use the following MaxScript functionsample script:


Code Block
fnfor setVRayLightMetersScale fmin fmax logarithmic = (
  local lightMeters=lightMeter in (getClassInstances VRayLightMeter
  for lightMeter in lightMeters ) do (
    lightMeter.min_lux=fmin0
    lightMeter.max_lux=fmax100
    lightMeter.log=logarithmic
  )true
)


 To To recalculate all VRayLightMeter helpers in the scene, you can use the following MaxScript functionsample script:


Code Block
fnfor calcAllVRayLightMeterslightMeter =in (
  local lightMeters=getClassInstances VRayLightMeter
  for lightMeter in lightMeters ) do (
    if lightMeter.active thendo lightMeter.calculate()
  )
))


For more information about setting MaxScript refer to Autodesk documentation.


VRayLightingAnalysis Render Element

...

Adding this render element internally adds two other render elements to the V-Ray frame buffer called Illuminance and Luminance which are filled with the absolute unscaled lux and candela values for the respective quantity.

 

Section
Column
width5%

Column
width45%


The V-Ray frame buffer showing the VRayLightingAnalysis render element in “false colors” mode after a render is complete. The additional Illuminance and Luminance render elements can be seen in the VFB as well.

Column
width45%


The interface of the VRayLightingAnalysis Render Element.

Column
width5%


...

There are two ways to convert existing scenes and lighting analysis components to V-Ray equivalents. One method is using the 3ds Max Scene Converter tool. The other method is to use the V-Ray scene converter script included with V-Ray. Both tools can convert Light Meter objects and Lighting Analysis Overlay render effects (as well as other scene components) into the respective V-Ray equivalents. The V-Ray scene converter can be invoked from the V-Ray menu > Converters and selecting the V-Ray scene converter option (note that this option is only available if V-Ray is selected as the current renderer). Note that for versions earlier than V-Ray 6, this option can be accessed by right-clicking in any 3ds Max viewport and selecting the V-Ray scene converter option.

 

Section
Column
width5%


Column
width45%

V-Ray menu with V-Ray scene converter tool

Column
width45%

 

The V-Ray scene converter dialog

Column
width5%


 

 

Comparisons With Mental Ray

...

To verify the validity of the results from the V-Ray calculations, we compare them to the results from the previously available mental ray (in 3ds Max 2017).

 

Scene setup

For comparison tests to be valid, the components should be compared on scenes that have the same geometry, material and lighting setups for both renderers.

...

Here is a comparison of the viewport for the Light Meter with mental ray compared to the VRayLightMeter. For the VRayLightMeter, the error tolerance was set to 0.001:

 

Section
Column
width5%


Column
width45%

Light meter with mental ray

Column
width45%

VRayLightMeter

Column
width5%


Section
Column
width5%


Column
width45%

Light meter with mental ray - numbers

Column
width45%

 
VRayLightMeter with numbers

Column
width5%


 

VRayLightingAnalysis

...

The mental ray version of the lighting analysis overlay does not produce legible results in 3ds Max 2017 and later. Therefore we had to resort to rendering the lighting analysis overlay with 3ds Max 2016.

 


Section
Column
width5%


Column
width45%

mental ray rendering

Column
width45%

V-Ray rendering

Column
width5%


Section
Column
width5%


Column
width45%

Lighting analysis overlay with mental ray

Column
width45%

VRayLightingAnalysis render element

Column
width5%


 

Conclusion

...

V-Ray provides tools for accurate lighting analysis that can be successfully used as a replacement of the tools provided by earlier versions of 3ds Max. The two basic components, the VRayLightMeter and the VRayLightingAnalysis render element, provide adequate replacements for the Light Meter and the Lighting Analysis Image Overlay render effect respectively.

...