This page gives details on how the physical sun and sky system works in V-Ray.

 

Page Contents

 

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 VRayGeoSun node allows you to set the position of the V-Ray Sun for a specific place in the world at a given time.

The VRaySun is frequently used with the environment texture map VRaySky.

The V-Ray Sun and Sky systems are based largely on the SIGGRAPH 1999 paper A Practical Analytic Model for Daylight [1]. For a complete list of references, please see the Links & References section.

 


Image © Colorbleed

 


 

UI Paths:

||Render Settings window|| > Overrides tab > Environment rollout > Create Sun button

||V-Ray Shelf|| > VRaySun: Create a VRay Sun light button

 

 

Note: The V-Ray Shelf includes right-click options from the Sun button that allows an easy way to Select or Delete the Sun node if needed.

 

 

Parameters


After the sun is created, its parameters appear in the Attribute Editor.

 

 

Enabled – Turns the sun light on and off.

Intensity multiplier – The brightness of the sun. 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 example below.

Turbidity – Determines the amount of dust in the air, which in turn affects the color of the sun and sky. Smaller values produce a clear, blue sky and sun similar to what is seen in rural areas, while larger values make the sun and sky more yellow and orange as seen in a big city. For more information, see the Turbidity 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, while larger values make it bluer. For more information, see the Ozone 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 example below.

Sky Model – Determines the procedural model 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 a clear sky.
CIE Overcast – The VRaySky procedural texture is generated based on the CIE method for a cloudy sky.

Horiz Illumination – Specifies the intensity (in lx) of the illumination on horizontal surfaces coming from the sky. This parameter is enabled when one of the CIE Sky Models are selected.

Filter Color – Shifts the hue of the V-Ray Sun and Sky system towards the specified color.

Ground Albedo – Sets the color of the V-Ray Sun and Sky system's ground.

Blend Angle – Specifies the angle in degrees where blending will occur between the horizon line and sky. Values close to 0.0 produce a sharper horizon line, while larger values produce a softer horizon line.

Horizon Offset – Allows the user to manually lower the horizon line.

 

Example: Intensity Multiplier
 

 

The Intensity Multiplier of the V-Ray Sun adjusts the brightness of it in the scene. This is also affected by the height of the Sun in the scene. To simulate the way the sun actually works, the closer the V-Ray Sun is on the horizon, the warmer the color and the less bright it will appear in the render. As you raise it up, the color will be cooler (or bluer) and the brighter it will be, like mid-day light. In the example renders below, the common settings are Turbidity: 5.0 and Size multiplier: 3.0 (which does not change the brightness), while the height (from the horizon) and Intensity Multiplier are adjusted.

 

 


Sun Height at 45°, Intensity multiplier: 1

 


Sun Height at 45°, Intensity multiplier: 0.5

 


Sun Height at 45°, Intensity multiplier: 3

 

 

 


Sun Height at 90°, Intensity multiplier: 1

 


Sun Height at 90°, Intensity multiplier: 0.5

 


Sun Height at 90°, Intensity multiplier: 3

 

 

 


Sun Height at 10°, Intensity multiplier: 1

 


Sun Height at 10°, Intensity multiplier: 0.5

 


Sun Height at 10°, Intensity multiplier: 3

 

 

 


 

Example: Turbidity
 

 

Turbidity creates the look of the light from the Sun having to travel through particles in the atmosphere, like smog (when the value is increased). This example shows how the Turbidity attribute is affected by the height of the V-Ray Sun in our scene. The common settings are Intensity multiplier: 1, Size multiplier: 3, while the height and Turbidity are adjusted.

 

 


Sun height at 45°, Turbidity: 2

 


Sun height at 45°, Turbidity: 5

 


Sun height at 45°, Turbidity: 10

 

 

 


Sun height at 10°, Turbidity: 2

 


Sun height at 10°, Turbidity: 5

 


Sun height at 10°, Turbidity: 10

 

 

 


 

Example: Ozone value
 

 

The Ozone attribute doesn't change the color of the sky, but the color of the light that hits the objects in the scene. It's a subtle effect but can help boost the photo-realism of your renders. In this example, the only thing that is adjusted is the Ozone value, while the height of the sun remains the same and the following attributes are constant; Turbidity: 2.0, Intensity multiplier: 1.0, Size multiplier: 3.0.

 

 


Ozone:
0.0

 


Ozone:
1.0

 

 

 


 

Example: Size multiplier (Size & Area shadows effect)


The Size multiplier has no effect on the brightness of the V-Ray Sun. As shown early, the Intensity multiplier is adjusted to change how bright the light is coming from the Sun. The Size multiplier does, however, change the visual representation of the Sun when it's seen in the render and just like with other (physically accurate) lights, the larger they are, the softer the shadows are that are cast from that light. Increasing this attribute as the height of the sun is lowered can also help in the realism of your renders. In the following example, the height of the Sun and the Size multiplier are adjusted, while values for attributes like Shadow Subdivs (at 32) and Intensity multiplier (at 1.0) are constant. The first series of images show how the size of the sun is displayed in the reflection of the water. The second set shows the shadows being cask on a ground plane.

 

 


Sun height at 5°, Size multiplier: 1.0

 


Sun height at 5°, Size multiplier: 3.0

 


Sun height at 5°, Size multiplier: 10.0

 

 

 


Sun height at 20°, Size multiplier: 1.0

 


Sun height at 20°, Size multiplier: 3.0

 


Sun height at 20°, Size multiplier: 10.0

 

 

 

 


 

Parameters - Shadows





Cast Shadows – When enabled, the sun produces shadows. 

Cast Shadows from environment – When enabled, the sun produces shadows from volumetric effects. 

Shadow subdivs – The number of samples for the area shadow of the sun. Higher values produce area shadows with better quality, but render slower. Note that this parameter is available for changing only when Use local subdivs is enabled in the DMC Sampler Settings.

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.

Shadow Color – Sets the color of the V-Ray Sun and Sky shadows.

 

 


Example: Shadow Bias


In the example renders below, the common settings are Shadow subdivision: 32, Intensity multiplier: 1, Size multiplier: 3.0, while the Shadow bias is the only attribute adjusted between renders. The values shown in the example are highly exaggerated to help show the effect the Shadow bias has on the scene. The change in the shadow position is most noticeable on the front of the building below the roof line where the shadow cast by the roof recedes back toward the top left overhang of the roof as the Shadow bias value increases.

 

 


Shadow bias
: 0.02 (default)

 

 

 


Shadow bias
: 12

 


Shadow bias
: 24

 

 

 


 


Parameters - Photon Emission





Photon radius – Determines the radius of the area in which photons will be shot. This area is represented by the cylinder around the Sun's ray vector. This parameter has effect when photons are used in the GI solutions or caustics. 

Photons subdivs – Used by V-Ray when calculating the Global Photon Map. Lower values mean more noisy results but will render faster. Higher values produce smoother results but take more time. 

Diffuse Multiplier – Used by V-Ray when calculating the Diffuse contributions. This multiplier controls the brightness of the diffuse

Caustics subdivs – Used by V-Ray when calculating Caustics. Lower values mean more noisy results but will render faster. Higher values produce smoother results but take more time.

Caustics Multiplier – Used by V-Ray when calculating Caustics. This multiplier controls the brightness of the caustics.

 

 

 



Example: Color Mapping Types


The following render examples show the impact the Color Mapping Types have on the Sun and Sky system. For more on color mapping types, please see the Color Mapping page.

 

 


Color mapping
: Linear Multiply

 


Color mapping
: Exponential

 

 

 


Color mapping
: HSV exponential

 


Color mapping
: Intensity exponential

 

 

 


Color mapping
: Gamma correction

 


Color mapping
: Intensity Gamma

 

 

 


Color mapping
: Reinhard

 



 

 

 


 

V-Ray Sky Texture


For more information on the Sky portion of the V-Ray Sun and Sky System, please see the Sky Map (VRaySky) page.

 

 

 

 

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 produced 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's 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.
  • Starting with V-Ray 3.6, the VRaySky and its reflections on objects can be previewed in Viewport 2.0.


Links & References


Here is a list of links and references about the V-Ray Sun and Sky implementation, as well as general information about the illumination of the Sun.

  • [1] A.J. Preetham, P. Shirley, and B. Smits, A Practical Analytic Model for Daylight, SIGGRAPH 1999, Computer Graphics Proceedings;
    An online version can be found at http://www.cs.utah.edu/~shirley/papers/sunsky/
    This paper includes source code examples and is the base for the VRaySun and VRaySky plugins.
  • [2] R. H. B. Exell, The intensity of solar radiation, 2000
    This page is available at http://www.jgsee.kmutt.ac.th/exell/IntensitySolarRad.pdf
    This document contains information about the average intensity of the solar radiation, as well as some specific measurements.
  • [3] R. Cahalan, Sun & Earth Radiation
    This page can be found at http://climate.gsfc.nasa.gov/static/cahalan/Radiation/ (Please note that this link is no longer valid).
    These pages contain a list of accurate solar irradiances across a large portion of the electromagnetic spectrum.
  • [4] D. Robinson-Boonstra, Venus Transit: Activity 3, Sun & Earth Day 2004
    This document can be found online at
    http://sunearth.gsfc.nasa.gov/sunearthday/2004/2004images/VT_Activity3.pdf (Please note that this link is no longer valid). 
    Among other things, this document gives the distance from the Sun to the Earth and the size of the Sun derived from astronomic observations.
  • [5] Hosek L, et al, An Analytic Model for Full Spectral Sky-Dome Radiance
    This document can be found online at
    http://cgg.mff.cuni.cz/projects/SkylightModelling/HosekWilkie_SkylightModel_SIGGRAPH2012_Preprint_lowres.pdf
    Describes the Hosek sky model used by the VRaySun and VRaySky