The lighting analysis workflows with V-Ray Next 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 to ensure better precision of the results. The VRayLightingAnalysis Render Element is new in V-Ray Next.
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.
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.
Internally, the light meter values are calculated in several passes using the texture baking mechanism of V-Ray. There are four baking passes - one to collect the main illuminance data, two more to determine the predominant direction of the lighting, and a fourth pass for the daylight factor. To ensure correctness of the results, the light meter creates its own internal instance of the V-Ray renderer to perform the calculations and any settings of the current 3ds Max production renderer are ignored. The Brute force + Light cache combination is used for GI, which should produce results comparable to radiosity methods (i.e. with a sufficiently high number of light bounces).
A progress window is displayed during the calculations, which shows the current pass and gives users 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 function:
fn setVRayLightMetersScale fmin fmax logarithmic = ( local lightMeters=getClassInstances VRayLightMeter for lightMeter in lightMeters do ( lightMeter.min=fmin lightMeter.max=fmax lightMeter.log=logarithmic ) )
To recalculate all VRayLightMeter helpers in the scene, you can use the following MaxScript function:
fn calcAllVRayLightMeters = ( local lightMeters=getClassInstances VRayLightMeter for lightMeter in lightMeters do ( if lightMeter.active then lightMeter.calculate() ) )
VRayLightingAnalysis Render Element
The VRayLightingAnalysis Render Element is a special element that can be added from the Render Settings.
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.
The VRayLightingAnalysis Render Element is a post-effect and is only updated once the rendering is complete. During the render, the VRayLightingAnalysis may display some approximation to the false-color image, but it should not be interpreted as being the final result.
After a render is complete, most settings of the VRayLightingAnalysis can be dynamically adjusted and the result can be displayed without re-rendering by pressing the Update button.
When using the same settings (min/max and scale type) as the VRayLightMeter, the results should be the same for the total illuminance.
Illuminance values shown over glass and mirror objects represent illuminance of the glass or mirror surface (and not on the surfaces seen through the glass or mirror) and may be quite noisy or with a zero value. This is because these materials do not reflect light diffusely and V-Ray computes the illuminance values with very low precision or may skip illuminance calculations completely. To ensure correct results, it is recommended to use the default V-Ray GI settings, with optionally increased light cache subdivs (e.g. 2000) and higher light cache retrace threshold (e.g. 4.0).
Converting Light Meters and Lighting Analysis Image Overlay Render Effects
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 Next. 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 by right-clicking in any 3ds Max viewport and selecting the V-Ray scene converter option (note that this option is only available if V-Ray is selected as the current renderer).
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).
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.
The scene used in the examples below is from Evermotion ArchInteriors 39 (scene 5).
Generally we advise users to set up their scenes using V-Ray materials. However V-Ray materials didn’t render with mental ray. For the purposes of this comparison, we used the mental ray Arch&Design material, which V-Ray translates internally to a VRayMtl equivalent and allows the same scene to be rendered with both engines without modification.
Generally we advise users to set up their scenes using the VRaySun and VRaySky components for daylight analysis. However mental ray did not render these components and only supported the mr Sky environment texture and the mr Sun light. When rendering with mental ray, we used a 3ds Max Daylight system with mr Sun and mr Sky. When rendering with V-Ray, we used the Physical Sun & Sky Environment texture included in 3ds Max 2017, which is very similar to the mr Sky texture and renders with any 3ds Max-compliant renderer including V-Ray. Since this texture includes the sun disk, it needs to be used through a V-Ray dome light to make sampling efficient. We also used the new adaptive dome light in V-Ray Next to additionally speed up the rendering process. There is no need for a separate sunlight, as the texture already includes the sun. This setup allows us to render the same scene in both engines.
To estimate the correct lighting distribution in a scene, it is crucial that we calculate enough light bounces. With mental ray, we used the Final Gather global illumination method with 50 diffuse bounces and 500 FG rays. With V-Ray, we used the Brute force + Light cache combination, which produces results similar to radiosity methods (hundreds of diffuse light bounces). The Light cache subdivs were set to 2000 and the Light cache retrace threshold was set to 4.0.
The mental ray version of the light meter does not seem to produce correct directionality data for the lighting (at least we could not get it to show proper directions), so we can only compare the numerical values.
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:
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.
V-Ray Next 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.
At this point, V-Ray Next does not provide an equivalent of the Lighting Analysis Assistant dialog. The Assistant allowed the user to control various aspects of the scene, including all light meters and lighting analysis image overlays, from one central location. It also allowed analyzing the scene for various aspects that could interfere with accurate lighting analysis (lights, materials, render settings).
We plan to provide an equivalent tool with a V-Ray Next update. All V-Ray components (lights, materials, render settings) are set up for physically-based rendering by default, but it could still be useful to control all lighting analysis features from one dialog.