Real-Time Sun (Editor)

Available in: Matter: Editors >  Real-Time Sun

Real-Time Sun is an editor used to set up and display a sun that can be modified in real time in your products.

Figure 209 : Example of real-time sun usage.

In order to spare memory usage, decrease the maximum size of lighting and shadow textures in File > Settings > Lighting tab. Default values are nevertheless desirable.

This editor is composed of five boxes: Sun Settings, Shadow Settings, North Setting, Position, and Raytracing.

This editor state is saved individually for each product. Data related to the Real-Time Sun is included in databases exported in KDR format.

Sun Settings Box

The Sun Settings box provides a set of adjustable parameters for creating a real-time sun.

Setting Description
On Check the On box to activate the real-time sun in your product.
Color Click on the Color box to open the color chooser and pick the color to assign to the sun.
Intensity

Enter in this field the value of the desired intensity of the sun. This value must be positive. Unlike the sun type lightings available in the Shaper module, intensity is adjusted according to the sun altitude.

Figure 210 : Example of sun intensity variation.

Real-time sun lighting is added linearly to the existing lightmaps in the model. If your model has very bright lightmaps, the effects of the sun will not be as visible.
Shadow intensity

By default, no light intensity is added to areas which are not sunlit. However, by entering a value in the Shadow intensity field, you can apply an additional light intensity in these shadow areas. The value entered must be positive. The value 0 corresponds to a realistic effect.

Figure 211 : Example of shadow intensity variation.

Lightmap modulator Adding a real-time sun to the lightmap of a product can produce an intensity of a lightmap that is too strong. If this is the case, you can modify the intensity of the lightmap. The field Lightmap modulator is used to set a modulation coefficient for the intensity of the lighting calculated in the Shaper module. The value of this coefficient must be between 0 and 1. The value 0 assigns a null intensity to the lightmap. The value 1 corresponds to the assignment of the lightmap as it is calculated in the Shaper module.
Specular

Tick this check box to display the sun’s specular reflection on your product. Enter its intensity in the corresponding field.

Figure 212 : Example of a scene without and with the sun’s specular reflection.

Shadow Settings Box

Parameters specific to shadows are included in this box.

Setting Description
Shadows in mirrors Tick this check box to display shadows on reflective surfaces. The activation of this option extends the rendering time.
Shadow quality Select the quality of shadows to display from the drop-down menu. The higher the selected quality is, the longer the rendering time will be.
Shadow smoothness

Select the width for the blur effect on shadow edges from this drop-down menu. The more the shadows are smoothed, the longer the rendering time will be.

Figure 213 : Examples of different smoothness in shadows.

North Setting Box

The North Setting box is used to set up the north relative to the reference axis of the database. There are three ways to set up the north direction:

  • By entering a value between 0 and 360° for the angle between the X axis and the North arrow of the compass,
  • By clicking on the compass while holding the left button of the mouse, and dragging it to the desired position,
  • By clicking on the grid to define the orientation of the compass.

Figure 214 : Positioning the compass at a 20.2° angle between the x axis and the compass.

Position Box

The Position box consists of three tabs, one for each sun positioning mode.

Manual Tab

This tab allows for defining the sun position by entering a value for the Azimuth and the Altitude or directly with the widgets by clicking or bringing the sun onto the desired position.

Figure 215 : Manual tab.

Azimuth is the angle in the horizontal plane between the sun direction and the north.

Altitude is the angle between the sun direction and its projection onto the horizontal plane.

Date, Time and Location Tab

This tab allows the sun to be located so as to mimic its position in the sky at a given date and time for a specific location. To do this, select or enter the date and time of your choice in the corresponding data field. Then provide the time zone with the drop-down menu. Areas of the world in darkness are updated on the map.

To activate the shift for daylight saving time, check the Daylight savings box and enter the value in minutes of the desired shift. This is only active on days when daylight saving time is applicable (from the last Sunday of March to the last Sunday of October).

Next, specify your location of choice:

  • By entering values for latitude and longitude in the data fields – the City field then displays User defined,
  • By selecting a city in the City drop-down menu, or
  • By clicking directly on a point on the map – the City field also displays User defined.

Extracted from Environment Tab

Select this tab in order to position the sun at the point defined in the Environment’s Brightest Point box in the Product Environment Properties tab of the Product Environments editor. Positioning the sun in the Product Environments editor is explained in the section Environment’s Brightest Point Box.

Raytracing Box

The features in this box are used to activate the calculation of smooth shadows in the raytracing computation.

Check the Use soft shadows box to activate smooth shadows in the raytracing computation. Then, specify the desired Sun angular diameter and Sample count for the sun. The shadow smoothness increases with the angular aperture of the sun.