The Light Select Render Element stores direct lighting information from user-selected lights in the scene.
Overview
The Light Select Render Element represents the lighting contribution from one or more user-selected lights in the scene. Each Light Select channel can output one of the predetermined contribution types, such as the overall direct or indirect illumination or the direct or indirect diffuse or specular contribution to the illumination. The Full mode creates a Beauty render for the included light(s). The Light Path Expression mode allows for custom contributions to be captured. See the Light Path Expressions page or the Courseware page for more information.
Multiple Light Select outputs can be rendered for a single scene, and lights may be included in more than one Light Select render element.
Using the Light Select render element, specific lights in the resulting render can be captured and adjusted (color, temperature, brightness, etc.) in a composite without re-rendering. For example, with a Light Select element for all of the backlights in a scene, an artist may adjust the backlighting in the composite without affecting the rest of the scene's illumination.
Attributes
The parameters for this render element appear in the Attribute Editor under Extra V-Ray Attributes.
Enable – When enabled, the render element is included in the render output.
Deep output – Specifies whether to include this render element in deep images.
Filename suffix – The explicit channel name. The text will be used as a channel name for multi-channel images or as a suffix in the rendered file, for single-channel images (e.g. myrender.lightselect.exr).
Apply color mapping – Applies the Color Management options to the element.
Consider for Anti-Aliasing – When enabled, anti-aliasing is used where possible.
Type– Specifies the type of lighting contribution to be generated for the selected lights in the element as follows:
Direct illumination – Outputs all direct light bounces, including diffuse and specular information.
Direct raw – Outputs only the raw direct light bounces. No diffuse or specular information is included.
Direct diffuse – Outputs only the direct diffuse light bounces. No specular information is included. This mode is similar to the Lighting render element.
Direct specular – Outputs only the direct specular lighting information. No diffuse information is included. This mode is similar to the Specular render element.
Full – Outputs all available information in the scene, such as GI, SSS, reflection, refraction, etc. This creates a Beauty render for just the included light(s).
Indirect – Outputs all indirect light bounces, including indirect diffuse and specular information.
Indirect diffuse – Outputs only the indirect diffuse light bounces. This mode is similar to the GI render element.
Indirect specular – Outputs only the indirect specular light bounces. This mode is similar to the Reflection render element.
Indirect types are not supported with V-Ray GPU.
Light path expression – Allows capturing custom light transport paths with regular expressions. Right-click in the field for a list of presets. See the Light Path Expressions page for more information. When enabled, an LPE Builder button becomes available.
The Shadow modes render a color image that works as a reverse mask for shadows caused by a specific light(s). It can lighten, darken, or tint the shadows in post-production.
Direct diffuse shadows – Outputs only the shadows cast by objects illuminated by pre-selected lights. This option has the same output as the Shadow render element. Works with all V-Ray materials that have diffuse (which excludes Stochastic Flakes and V-Ray Flakes 2). V-Ray Toon material is not supported.
Direct specular shadows – Outputs the specular information from the shadows cast by objects illuminated by a pre-selected light. The objects that the shadows are cast on must have reflective material for this channel to be visible. It works with all V-Ray materials that have reflection and glossiness values less than 1. Maya's Ambient light and V-Ray Toon material are not supported.
For more information, see the Shadow Select page.
LPE Builder – Opens the https://lpe-builder.chaosgroup.com/ webpage, which is available to help you compose expressions and track precisely which ray paths they capture.
Denoise – When enabled, the element will be denoised if a Denoiser render element is added to the scene.
Emissive Material – Specifies an illuminating material whose contribution is rendered in the LightSelect render element. V-Ray respects VRayMtl with non-black self-illumination, VRayLightMtl, and Maya native Standard Surface material with non-black emission color if you would like to add more than one material to contribute to the LightSelect RE, see how in the Adding Multiple Materials to a Light Select example.
Matte objects only – Renders object shadows, which are generated by a predetermined light source, onto a matte surface (object with VRayObjectProperties' matte properties assigned). This option is available for the Direct diffuse shadow Type only. For more information, see the Shadow Select page.
Adding Lights to a Light Select
The Light Select acts as a standard Maya set. By default, it is empty and you can easily add lights from the scene to it:
- Create a Light Select from the Render Elements tab of the Render Settings window.
- From the Outliner, drag one or more lights with the middle-mouse button to the vrayRE_Light_Select element.
Alternatively, Maya's Set editor can be used to add or remove lights from the Light Select set (Windows > Relationship Editors > Sets).
You can remove lights from the Light Select by middle-mouse-dragging them outside of the vrayRE_Light_Select element.
Adding Multiple Materials to a Light Select
Assigning materials to a Light Select element directly in the Outliner allows multiple materials to be visible in the render element. Here are the steps to achieve this:
- Go to the Outliner > Display and disable DAG Objects Only. This unhides all non-transformable nodes in the scene.
- In the Outliner, drag one or more materials with the middle-mouse button to the vrayRE_Light_Select element.
Common Use: Changing Lighting in Composite
Below is an example of how to use the Light Select Render Element in a composite.
For this example, the Top, Back, Left, and Right lights have been assigned a vrayRE_Light_Select render element with the Type set to Full.
Next, the Top and Back lights have been assigned two vrayRE_Light_Select render elements: The first element's Type is set to Direct Diffuse, and the second element's Type is set to Direct Specular. This gives a finer degree of control to allow separate tuning of each light's diffuse and specular contributions. All other lights in the scene have had their Type set to Direct Illumination.
The scene used for the images below uses quite a few lights. There are 4 area lights: a top light, a back light, a left light, and a right light, as well as a Dome light with an indoor factory HDR as its Dome light texture. As well as these, there are many Photometric IES lights in the environment, and each spaceship in the scene also has 3 VRaySphereLights. The examples below show how several Light Select Render Elements can be combined to give the same result as the Lighting render element and combined with the Global Illumination render element to give the equivalent of the Total Lighting render element. This provides a fine level of control in the composite to change things such as the intensity or color tinting of only some lights at a time.
vrayRE_Light_Select Examples
Light Select Top Light Full
Light Select Top Light Direct Diffuse
Light Select Top Light Direct Specular
Light Select Back Light Full
Light Select Back Light Direct Diffuse
Light Select Back Light Direct Specular
Light Select Left Light Full
Light Select Left Light Direct Illumination
Light Select Right Light Full
Light Select Right Light Direct Illumination
Light Select Light IES Lights Direct Illumination
Light Select Light Ship Lights Direct Illumination
Combined Light Select Direct Diffuse elements
(Same result as Lighting)
Combined Light Select Direct Specular elements
Combined Light Select Direct Diffuse and Direct Specular elements
(Diffuse and specular contributions from all lights)
Combined Light Select passes to recreate the Lighting render element
Combined Light Select passes combined with the GI render element to recreate the Total Lighting render element
Beauty element before changes
IES Lights intensity increased and color changed to green
Left and Right lights intensity increased and tinted to a blueish color
Compositing Equation
The following diagram shows the compositing formula to recreate all the light in a scene in its most basic form using discrete Light Select Render elements. This can happen only when each light in the scene is accounted for in only one vrayRE_Light_Select element for a particular mode. If any light is used in more than one vrayRE_Light_Select pass, this equation results in brighter lighting than intended because duplicated lights in Light Select Render Elements contribute to lighting more than once.
For vrayRE_Light_Select to work correctly, all enabled lights must be accounted for in a Light Select Render Element.
When the vrayRE_Light_Select Render Element is set to Direct Illumination type, the sum of all the vrayRE_Light_Select nodes replaces both Lighting and Specular in the Back to Beauty composite. Note that the Direct Diffuse type and the Direct Specular type combined result in Direct Illumination.
When the vrayRE_Light_Select Render Element is set to Direct Diffuse type, the sum of all the vrayRE_Light_Select nodes replaces Lighting in the Back to Beauty composite. Note that VRayAlSurface Shader with sss_mix value other than the default 0, doesn't fit this equation.
When the vrayRE_Light_Select Render Element is set to Direct Raw or Direct Specular type, the sum of all the vrayRE_Light_Select nodes replaces their respective render elements in the Back to Beauty composite. Note that Direct Raw type replaces the Raw Lighting render element if GI is disabled and there are no dome lights in use.
When the vrayRE_Light_Select Render Element is set to Indirect type, the sum of all vrayRE_Light_Select nodes replaces all the Global Illumination, Reflection and Refraction in the Back to Beauty composite. Note that the Indirect Diffuse type and the Indirect Specular type combined result in Indirect type.
When the vrayRE_Light_Select Render Element is set to Indirect Diffuse type, the sum of all the vrayRE_Light_Select nodes replaces Global Illumination in the Back to Beauty composite.
When the vrayRE_Light_Select Render Element is set to Indirect Specular type, the sum of all the vrayRE_Light_Select nodes replaces Reflection in the Back to Beauty composite.
When the vrayRE_Light_Select Render Element is set to Full type, the sum of all vrayRE_Light_Select nodes replaces the Beauty pass. Caustics are not included in the calculation of vrayRE_Light_Select Render Element.
When the vrayRE_Light_Select Render Element is set to Direct Diffuse Shadow type, the sum of all vrayRE_Light_Select nodes replaces Shadows render element.
Compositing Equation: Direct Specular Shadow and Direct Diffuse Shadow
For this compositing example, we render an RGB color and Shadow Select (both Direct Diffuse and Direct Specular Shadow types) render elements. Then, we subtract Shadow Select from RGB in compositing, grade the Shadow Select and add it back to the composite.
Notes
When using vrayRE_Light_Select, a good practice is to have one vrayRE_Light_Select pass for each light source in your scene. This way the Lighting element can be recreated from them, and adjusted as needed while compositing without re-rendering.
If the vrayRE_Light_Select element Type is set to Direct Illumination, the specular contribution is added to the render element. While this is perfect for simple compositing, a better workflow is for each light to be selected for two Light Select Render Elements, one with its Type set to Direct Diffuse and another with its Type set to Direct Specular. In this way, the specular and diffuse lighting can both be controlled independently at a composite level.
- When VRayFastSSS2 or Al Surface Material is used, the SSS render elements should be added to the composite with a plus operation to the Light Selects.
- In order to use VRayLightMesh properties with LightSelect render element, add the vrayLightMeshProperties_lightlink node to the LightSelect node.