VRaySun

This page describes the use of V-Ray's physically accurate sun and sky system.

Overview

The VRaySun and VRaySky are special features which are provided by the V-Ray renderer. Developed to work together, the VRaySun and VRaySky reproduce the real-life Sun and Sky environment of the Earth. Both are coded so that they change their appearance depending on the direction of the VRaySun.

The V-Ray Sun and Sky are based largely on the model presented in [ 1 ]. For a more complete list of references, please see the References and links section.

images/download/attachments/38571728/tamas-medve-caribbean-tongue.jpg
Image courtesy of Tamas Medve

UI Paths

Create menu > Lights > V-Ray > V-Ray Sun >
click and drag in a viewport

||Create panel|| > Lights > Choose V-Ray from dropdown > VRaySun >
click and drag in a viewport

||V-Ray Toolbar|| > V-Ray Sun button >
Click and drag in a viewport

images/download/attachments/38571728/max2016_34002_sunLight_toolbar.png

Example: Direction of the VRaySun Light


Note: All the images below are rendered with Color mapping: HSV exponential, Dark multiplier: 1.0, Bright multiplier: 1.0 unless otherwise noted.

This example demonstrates the effect of the sun direction. Note how in addition to the scene brightness, the sun position also changes the appearance of the sky and the sun light color.

Enabled: on, Turbidity: 3.0, Shadow subdivision: 8, Intensity multiplier: 0.01, Size multiplier: 1.0.

images/download/attachments/38571728/SunAndSky_02.png
Sun Z height: 500

images/download/attachments/38571728/SunAndSky_03.png
Sun Z height: 1600

images/download/attachments/38571728/SunAndSky_04.png
Sun Z height: 6000 (almost straight above)

VRaySun Parameters

images/download/attachments/38571728/vraysun_param_2018.PNG

The VRaySun is located in the (Create - Lights - VRay) panel.

You can also specify the VRaySun as the sun type inside a 3ds Max Daylight system.

enabled – Turns on and off the sun light.

invisible – When enabled , makes the sun invisible, both to the camera and to reflections. This is useful to prevent bright speckles on glossy surfaces where a ray with low probability hits the extremely bright sun disk.

affect diffuse – Determines whether the VRaySun is affecting the diffuse properties of the materials.

diffuse contribution – Controls the Suns contribution to the diffuse illumination.

affect specular – Determines whether the VRaySun is affecting the specular of the materials. The multiplier controls the suns contribution to specular reflections.

specular contribution – Controls the Suns contribution to the specular reflection.

cast atmospheric shadows – When enabled, the atmospheric effects in the scene cast shadows.

turbidity – Determines the amount of dust in the air and affects the color of the sun and sky. Smaller values produce a clear and blue sky and sun as you get in the country, while larger values make them yellow and orange as, for example, in a big city. For more information, see The Turbidity Parameter example below.

ozone – Affects the color of the sun light. Available in the range between 0.0 and 1.0. Smaller values make the sunlight more yellow, larger values make it blue. For more information, see The Ozone Value example below.

intensity multiplier – An intensity multiplier for the VRaySun. Since the sun is very bright by default, you can use this parameter to reduce its effect. See the Notes section for more information. For more information, see The Intensity Multiplier Parameter example below.

size multiplier – Controls the visible size of the sun. This affects the appearance of the sun disc as seen by the camera and reflections, as well as the blurriness of the sun shadows. For more information, see The Size Multiplier Parameter example below.

filter color – Changes the color of the sun and depends on the Color mode parameter.

color mode – Affects the way the color in the Filter color parameter affects the color of the sun.

filter – Shifts the hue of the V-Ray Sun and Sky system towards the color specified in the Filter color field.
direct
– Sets the color of the V-Ray sun to match the color in the Filter Color parameter. In this case the intensity of the light does not depend on the V-Ray Suns position in the sky and is controlled through the intensity multiplier.
override
– Sets the color of the V-Ray sun to match the color in the Filter Color parameter but the intensity of the light still depends on the V-Ray Sun's position in the sky.

shadow subdivs – Controls the number of samples for the area shadow of the sun. More subdivs produce area shadows with better quality but render slower. For more information, see The Shadow Subdivs Parameter example below. Note that this parameter is available for changing only when Use local subdivs is enabled in the Global DMC Settings. This parameter is not available when the renderer is set to GPU.

shadow bias – Moves the shadow toward or away from the shadow-casting object (or objects). Higher values move the shadow toward the object(s) while lower values move it away. If this value is too extreme, shadows can "leak" through places they shouldn't or "detach" from an object. Other effects from extreme values include moire patterns, out-of-place dark areas on surfaces, and shadows not appearing at all in the rendering. For more information, see The Shadow Bias example below.

photon emit radius – Determines the radius of the area where photons would be shot. This area is represented by the green cylinder around the Sun's ray vector. This parameter's effect is visible when photons are used in the GI solutions or caustics.

sky model – Specifies the procedural model that is used to generate the VRaySky texture.

Hosek et al. – The VRaySky procedural texture is generated based on the Hosek et al. method.
Preetham et al. – The VRaySky procedural texture is generated based on the Preetham et al. method.
CIE Clear – The VRaySky procedural texture is generated based on the CIE method for clear sky.
CIE Overcast – The VRaySky procedural texture is generated based on the CIE method for cloudy sky.

indirect horiz. illum. – Specifies the intensity (in lx) of the illumination on horizontal surfaces coming from the sky.

ground albedo – Changes the color of the ground.

blend angle – Controls the size of the gradient formed by VRaySky between the horizon and the actual sky.

horizon offset – Offsets the horizon from the default position (the absolute horizon).

Exclude – Excludes objects from illumination/shadow casting for the sun light.



Example: The Turbidity Parameter


This example demonstrates the effect of the Turbidity parameter. Generally, this controls the amount of dust particles in the air. Notice how larger values cause the sun and the sky to become yellowish while smaller values make the sky clear.

Enabled: on, Intensity multiplier: 0.01, Shadow subdivision: 8, Size multiplier: 1.0

images/download/attachments/38571728/SunAndSky_06.png
Turbidity is 2.0

images/download/attachments/38571728/SunAndSky_07.png
Turbidity is 4.0

images/download/attachments/38571728/SunAndSky_08.png
Turbidity is 8.0

Example: Ozone Value

The Ozone parameter affects only the color of the light emitted by the sun. Higher values cause the color mapping mode to change. This example demonstrates the looks achieved with several different color mapping modes. See also the section on Color mapping for more details.

Enabled: on, Turbidity: 2.0, Shadow subdivision: 36, Intensity multiplier: 0.01, Size multiplier: 10.0.

images/download/attachments/38571728/SunAndSky_09.png
Ozone: 0.0

images/download/attachments/38571728/SunAndSky_10.png
Ozone: 0.5

images/download/attachments/38571728/SunAndSky_11.png
Ozone: 1.0

Example: The Intensity Multiplier Parameter


Enabled: on, Turbidity: 3.0, Shadow subdivision: 8, Size multiplier: 1.0

images/download/attachments/38571728/SunAndSky_12.png
Height: Z = 0, Intensity mult: 0.01

images/download/attachments/38571728/SunAndSky_13.png

Height: Z = 0, Intensity mult: 0.03

images/download/attachments/38571728/SunAndSky_14.png Height: Z = 0, Intensity mult: 0.05

images/download/attachments/38571728/SunAndSky_15.png
Height: Z = 500, Intensity mult: 0.01

images/download/attachments/38571728/SunAndSky_16.png
Height: Z = 500, Intensity mult: 0.03

images/download/attachments/38571728/SunAndSky_17.png
Height: Z = 500, Intensity mult: 0.05

Example: The Size Multiplier Parameter


This example demonstrates the effect of the Size multiplier parameter. Notice how changes in this parameter affect both the visible sun size and the shadow softness (however overall illumination strength remains the same).

Enabled: on, Turbidity: 3.0, Shadow subdivision: 8, Intensity multiplier: 0.01

images/download/attachments/38571728/SunAndSky_18.png
Size multiplier is 4.0

images/download/attachments/38571728/SunAndSky_19.png
Size multiplier is 10.0

images/download/attachments/38571728/SunAndSky_20.png Size multiplier is 40.0


Example: The Shadow Subdivs Parameter


This example demonstrates the effect of the Shadow subdivs parameter. Note how lower subdivs cause the shadows to be more noisy.

Enabled: on, Height Z: 1200, Turbidity is 2.0, Intensity multiplier is 0.01, Size multiplier: 10.0

images/download/attachments/38571728/SunAndSky_21.png
Shadow subdivs is 8

images/download/attachments/38571728/SunAndSky_22.png
Shadow subdivs is 16

images/download/attachments/38571728/SunAndSky_23.png
Shadow subdivs is 48

Example: Shadow Bias


Enabled: on, Turbidity: 2.0, Shadow subdivision: 36, Intensity multiplier: 0.01, Size multiplier: 10.0

images/download/attachments/38571728/SunAndSky_24.png
Shadow bias: 0.0

images/download/attachments/38571728/SunAndSky_25.png
Shadow bias: 7.0

images/download/attachments/38571728/SunAndSky_26.png Shadow bias: 13.0

Overview

The VRaySky texture map is typically used as an environment map to help simulate outdoor lighting. The texture can change its appearance based on the position of the VRaySun, which it is normally used in conjunction with the V-Ray Sun and Sky System. The example below on the left is a swatch of the sky map with a visible horizon line and ground. The render on the right is a chrome shader ball rendered with a sky map as an environment along with sun lighting to demonstrate how the sky is reflected in objects.

images/download/attachments/38571656/Maya2016_Vray33_VRaySky_Hero_v02.png

images/download/attachments/38571656/VRaySky_Reflective_Hero.png

UI Path

||Material Editor window|| > Material/Map Browser > Maps > V-Ray > VRaySky

V-Ray Sky Parameters

The VRaySky texture map is typically used as an environment map, either in the 3ds Max Environment dialogue, or in one of the slots of the V-Ray Environment rollout and behaves very much like a HDRI environment map. The VRaySky changes its appearance based on the position of the VRaySun.

images/download/attachments/38571656/max2018_VraySky.PNG

specify sun node – Specifies how the VRaySky determines its parameters:

Off – The VRaySky will automatically take its parameters from the active VRaySun that was created last. (In other words, if there are multiple suns in the scene, the most recently created VRaySun that is also enabled will be used.) In this case, none of the other parameters of VRaySky are accessible.
On
– A different light source can be chosen. It is recommended that only direct lights are used, as the vector for the direction is taken into consideration when computing the appearance of the sky. In that case the VRaySun is no longer controlling the VRaySky and the parameters in the texture map rollout determine the final look of the sky.

sun light – Specifies which light source is chosen if Specify sun node is On.

sun turbidity – Refers to VRaySun parameters .

sun ozone – Refers to VRaySun parameters.

sun intensity multiplier – Refers to VRaySun parameters.

sun size multiplier – Refers to VRaySun parameters.

sun filter color – Shifts the hue of the V-Ray Sun and Sky system towards the color specified in the field.

sun invisible – When enabled, the sun disk will not be visible on the sky texture.

sky model – Specifies the procedural model used to generate the VRaySky texture.

Preetham et al. – The VRaySky procedural texture will be generated based on the Preetham et al. method.
CIE Clear – The VRaySky procedural texture will be generated based on the CIE method for clear sky.
CIE Overcast – The VRaySky procedural texture will be generated based on the CIE method for cloudy sky.
Hosek et al.
– The V-Ray Sky procedural texture will be generated based on the Hosek et al. method.

indirect horiz. illum. – Specifies the intensity (in lx) of the illumination on horizontal surfaces coming from the sky.

ground albedo – Sets the ground color of the V-Ray Sun and Sky system.

blend angle – Controls the size of the gradient formed by VRaySky between the horizon and the actual sky.

horizon offset – Offsets the horizon from the default position (the absolute horizon).

Example: VRay Sun and Sky with Different Color Mapping Types

In addition to the parameters of the sun and sky, their appearance also depends on the selected color mapping mode. This example demonstrates the looks achieved with several different color mapping modes. See also the section on Color mapping for more details.

Enabled: on, Height Z: 800, Turbidity: 3.0, Shadow subdivision: 8, Intensity multiplier: 0.01, Size multiplier: 1.0

images/download/attachments/38571728/SunAndSky_27.png
Color mapping: Linear

images/download/attachments/38571728/SunAndSky_28.png
Color mapping: Exponential

images/download/attachments/38571728/SunAndSky_29.png
Color mapping: HSV exponential

images/download/attachments/38571728/SunAndSky_30.png

Color mapping: Intensity exponential

Notes

  • By default, the VRaySun and VRaySky are very bright. In the real world, the average solar irradiance is about 1000 W/m^2 (see the references  below). Since the image output in V-Ray is in W/m^2/sr, you will typically find that the average RGB values produces by the sun and the sky are about 200.0-300.0 units. This is quite correct from a physical point of view, but is not enough for a nice image. You can either use Color mapping to bring these values to a smaller range (which is the preferred way) or you can use the Sun intensity multiplier to make the sun and sky less bright. Using the VRayPhysicalCamera with suitable values also produces a correct result without changing the sun and sky parameters.