Creating a Light Source

This task shows you how to create a standard light source and define its parameters. Lights let you illuminate the objects to be rendered as you wish for example, by highlighting a specific element in your scene, thus focusing the viewer`s attention.

Note that some of the adjustments detailed in this scenario can also be performed using the Light Commands toolbar.

Open the Lamp.CATProduct document.
  You can choose between three different types of standard light sources: spot, point and directional. 
  1. Click Create Spot Light to create a source with a conical shape:

    Note that the representation of the light source displayed above corresponds to the default representation mode (i.e. "wireframe display"). You can choose to display the light source in shading mode by selecting the appropriate option in Tools > Options > Infrastructure > Photo Studio > Display.

    This light source is located at a given place, emitting the light isotropically inside a cone of influence determined by the privileged direction of illumination (forming the axis of revolution) and the angle that the edge of the cone forms with this axis.

    Spot light sources are mainly used to simulate spot light (the most frequently used lights) and are useful for tuning the lighting of each object individually.

    You can also click Create Point Light :
    This creates a source situated at a given point, emitting light isotropically, i.e. in all directions. This light source type is mainly used to simulate light bulb, for instance.
    Or you can also click Create Directional Light :
    This creates a light source coming from a given direction, generating constant intensity parallel lighting. This light source type is mainly used to simulate a global lighting as the sun does.

    Note: you can click anywhere in the geometry area to see the light symbol:

    Spot light

    Point light

    Directional light

    "Direction vector" represents the privileged direction of illumination of the source for spot and directional light sources. It is visualized by an arrow whose origin is the anchoring point of the source.

    "Anchoring point" is the position of the light source and is represented by a small star. When the source is characterized by a direction, the anchoring point coincides with the origin of the arrow.
    In the case of a spot or punctual light source, the anchoring point physically localizes the source. In the case of a directional light source, it can be used (with the target point) to define the illumination direction.

  2. To activate a light source, right-click it in the specification tree then select the Light On check box.

    Inversely, to deactivate a light source, right-click it in the specification tree then clear the Light On check box.

    Note: Light sources illuminating the scene are said to be active (On). Otherwise, they are inactive (Off) and do not cast any light.

    Due to OpenGL limitations, some active lights may not be seen in the 3D window though they are defined as being "active". In that case, a warning sign identifies the light in the specification tree.
    On most platforms, up to 8 lights can be seen at the same time, however this number may be higher depending on the graphics card.
  3. As for cameras, you can interactively manipulate a light source:

    • the source point (1) rotates the spot about its target point
    • the target point (2) rotates the spot about its source point
    • the upper green manipulator translates and rotates the spot about its target point
    • the lower green manipulator translates and rotates the spot about its source point.

    Note: manipulators only apply to spot light sources. 

  4. Right-click the light then select Properties (or press Alt+Enter) to access the Lighting tab in order to edit the lighting parameters.

    The Properties dialog box can also be accessed by clicking the light in the specification tree then selecting Edit > Properties or Light object > Definition:

    The Type box lets you modify the source type by selecting a new type from the list: Spot, Point or Directional
  5. Use the Color slider or the box to modify the light luminosity, then click the button if you want to choose another color (the default color is white):

    You can enter a value comprised between 0 and 255 for any of these boxes.

    The overall color of a light source is composed of three independent colors: diffuse, ambient an specular. The values of these colors are given in RGB mode or in HLS mode by three real positive values:

    • HLS (Hue, Saturation, Luminance) model is an intuitive, easy to use tool for describing or 
      modifying a color
      Hue is the "color" of the color. It is the name by which the color is designated and is used to
      define the desired color
      Saturation is the intensity of the color. The higher the number, the more intense the color. 
      It is used to tune the purity of the color
      Luminance is the brightness of the color, i.e. the degree to which the pure color is diluted by
      white or black. The larger the number, the lighter the color. It is used to adjust intensity.
    • RGB (Red, Green, Blue) model is a more physical model. It is based on the tri-stimulus theory
      of the human perception system. This model is usually used to define, with a high precision, the
      three primary components of the color.
  6. Click OK to confirm and close the Color dialog box.

  7. Define the light using the slider or the Intensity box.

    The intensity of a light source is the maximal lightness value of three colors (ambient, diffuse and specular). 

    The light color will be computed by multiplying the Red, Green and Blue values you defined in previous step by the intensity value. Therefore, this parameter allows you to adjust the luminosity of the light source, while preserving its chrominance ("color") component.

    You can enter values comprised between 0 and 4: the higher the value, the more saturated (i.e. the whiter) the light. More precisely, as soon as the intensity value exceeds 1, the color starts saturating.

  8. The Falloff box lets you define the light energy attenuation.

    By default, the falloff is Linear and the attenuation start ratio is set to 0 (i.e. the attenuation starts from light origin).

    You can choose between the following attenuations:

    • None: no lighting end which means that the light energy is constant and infinite. The cone limits, however, are kept

    • Linear: light energy decreases linearly with a 1/r ratio ("r" = distance to light origin) and stops at attenuation end. For instance, if the energy received at a distance of 10 mm from the light origin will be equal to 1/10th of the light energy at light origin

    • Realistic: light energy decreases with a 1/r2 ratio and becomes negligible at attenuation end. A realistic falloff requires a high value when distant objects are to be illuminated. 

    Note: directional lights do not disperse and therefore have no falloff.

    The following picture illustrates the three different types of light energy attenuation:

  9.   The Lighting tab also lets you define:

    • Source Angle

    Enables you to define the half-angle of the cone, that is the angle between the revolution axis and the cone edge (for spot light sources only). 
    The angle is a value between 0 and 90 degrees. This means that a value of 90 degrees would generate a light source equivalent to a punctual light source.

    • Attenuation End
    Defines in millimeters the maximum distance for light attenuation (i.e. the distance to the center from which the lighting is null or negligible).
    • Attenuation Start Ratio
    Defines as a ratio from the center to the target, the distance from which light starts to fall off, i.e. to attenuate. For example:
    0 corresponds to an attenuation starting from the center (i.e. from light origin)
    0.5 corresponds to an attenuation starting from the middle
    1 corresponds to an attenuation starting from the end, i.e. a null attenuation.
    • Attenuation Angle Ratio
    Defines as a fraction of the light angle the angle to the light axis from which the light starts to attenuate.
    For example:
    0      corresponds to an attenuation starting from the axis
    0.5   corresponds to an attenuation starting from the half-angle
    1      corresponds to an attenuation starting from the end, i.e. a null attenuation.

    Note that you also position your pointer over the one of the side lines then click and drag the segment to modify the attenuation angle ratio.

    The following are samples illustrating the various results you can obtain for lighting according to the values you set:
    Angle: 30 deg
    Intensity: 0.5
    Attenuation end: 610 mm
    Start ratio: 1
    Angle ratio: 1
    Angle: 30 deg
    Intensity: 1
    Attenuation end: 470 mm
    Start ratio: 0.5
    Angle ratio: 0.5
    Angle: 30 deg
    Intensity: 1
    Attenuation end: 870 mm
    Start ratio: 1
    Angle ratio: 0.75
  10. Use the Area tab if you intend to create a area light source by defining the corresponding light area: Rectangle, Disk, Sphere or Cylinder. In that case, the Properties dialog box slightly changes according the area you selected.

    For more information on area light sources, refer to Defining an Area Light source in this guide.

  11. Access the Shadows tab then select the Ray Traced check box if you want to enable shadow casting. When cleared, shadows are not calculated for this light source.

    Note: this check box is used for rendering only.

  12. Click the Position tab to define the light source anchoring point and the point to which the source is directed, respectively in the Origin and Target areas. You can define this position in millimeters along the X, Y and Z axes.

    Note that you can click the Reset value button at anytime to reset the light source to the default position.
  13. The Reference Axis area lets you define the light source position relative to the model axis or to the viewpoint according to the option you select:

    • Model
      By default, any light source you create is positioned relative to the model and thus, moving the viewpoint moves the light source along the model.
    • Viewpoint
      Attaching a light source to the viewpoint means that moving the viewpoint only moves the model; the light source keeps the same position in the window.

    When a light source is attached to the viewpoint, it is identified by an anchor symbol in the specification tree as shown below for Light 1:

    Note that you can also attach a light source to the viewpoint by right-clicking it in the specification then selecting Attach to View. Inversely, once a light source is attached to the viewpoint, you can re-attach it to the model by clearing Attach to View.

    The Feature Properties tab provides general information on the currently selected light source, e.g. its name, its creation date, etc.

  14. Click OK to apply the parameters to the light source.

  15. If you want to display the light source viewpoint (to visualize the object as if you were positioned behind the light source), right-click the light item in the specification tree then select Light View:

    To go back to the original view, select View > Modify > Previous View or click Previous View in the Viewpoint toolbar. Then, you can switch to the light view by clicking Next View .

    Right-clicking the light item in the specification tree also lets you select Update from View to adjust (i.e. center) the light source when the viewpoint is modified as shown below:

    Update from view->
  16. If you want to position the light source along a perpendicular to the point you click on the object.

    To do so:

    • right-click the light source item in the specification tree (or the light symbol in the geometry area) and select Position along Normal

      then

    • place your pointer over any point of the object and click: the light source is positioned along the normal to the selected point.

    As long as the Position along Normal command is active, you can hold down the left-mouse button and keep on moving the cursor to find the best position

    Note that instead of holding down then releasing the left-mouse button, you can also click a point on the object to position the light source then move your cursor over another point and click again, etc. until you are satisfied with the result.

    When satisfied with the result, deactivate Position along Normal by selecting any other command in the workbench or by pressing Esc.

  17. You can also manipulate the specular effect of your light source.

    To do so:

    • right-click the light source item in the specification tree (or the light symbol in the geometry area) and select Position Specular

      then

    • place your pointer over any point of the object and click: the specular spot is positioned at the selected point.
       

    As long as the Position Specular command is active, you can hold down the left-mouse button and keep on moving the cursor to find the best position for the specular spot.

    Note that instead of holding down then releasing the left-mouse button, you can also click a point on the object to position the specular spot then move your cursor over another point and click again, etc. until you are satisfied with the result.

    When satisfied with the result, deactivate Position Specular by selecting any other command in the workbench or by pressing Esc.

  18. You can position the direction of the light source by right-clicking the light source in the specification tree (or in the geometry area) then selecting Position Direction.

    This command lets you manipulate in a very precise way your light source along predefined circles that are centered on the light target.

    When you click the icon, the light symbol is replaced with the following symbol representing the light manipulator in 3D, the red arrow representing the light direction (i.e. the target):

    When you point at an arrow, a predefined dotted circle is displayed like this:
    If you drag your mouse along that circle, the light source is rotated along its axis.

    Now if you position your mouse over an arc, a predefined dotted circle also appears.
    If you drag your mouse along that circle, this changes the position of the light origin along the selected arc:

    Note that you can move the light position step-by-step by pressing Ctrl then dragging your mouse simultaneously.
    By default, the light source is rotated 10 degrees by 10 degrees but you can modify this value if needed via the Direction dialog box.
 

You can also perform the following actions when right-clicking then selecting one of these contextual commands:

 

Edit Light Direction

This dialog box lets you edit the light direction, the rotation step as well as the quick orientation:

 

 
  • Direction: the three spin boxes displayed let you define the position of the direction vector along the X, Y and Z directions. The direction vector represents the privileged direction of illumination of the source and is visualized by the red arrow whose origin is the light source origin.
    As soon as you modify a value, the light source is updated simultaneously in the geometry area.
 
  • Step-by-Step Rotation: this area lets you define the rotation angle in degrees. The default value is 10.00 but you can enter your own value if needed using the box.
    When the rotation angle has been defined, click the desired button to start rotating your light source about the corresponding axis by the angle you specified.

    For instance, clicking X+ means that the light source is rotated by the specified angle positive (i.e. clockwise) about the X axis whereas clicking -X rotates the light source by the specified angle negative (i.e. anticlockwise) about the X axis:
 
Starting position: X New position: -X
Rotation = 45 degrees
 

Note that using these buttons amounts to manipulating the light source directly in the geometry area by pressing Ctrl.

 
  • Quick Orientation: this area lets you position the light source parallel to the absolute axis system.
    For instance, clicking Y modifies the light origin in order to position the light source parallel to the Y axis.
    Inversely, clicking -Y inverts the position of the light source along the Y axis:
 
Quick Orientation = Y Quick Orientation = -Y
 
  • Compass: this button lets you position the light source according to the compass orientation.

When satisfied, click OK to validate your parameters.

 

Edit Light Parameters

Selecting this command opens the Properties dialog box (detailed above in this scenario) which lets you modify the light source parameters as needed.

 

Save Light Direction

 

Selecting this command opens the following dialog box:

 

 

Once you are satisfied with the position of your light source, click Save to store the light position.
Each light position is saved under the following name: Direction.n, for instance "Direction.1" for the first position, "n" being incremented by one for each new position you save.
You can save as many positions as necessary but keep in mind that you are not allowed to modify the position name.

When finished, click OK to validate.

If you want to use afterwards one of the light positions you saved, just re-select Save Light Direction then double-click the desired position: the light position is updated accordingly in the geometry area.

 

Rotation

The rotation commands let you rotate the light source around the absolute axis system:

  • by default, the Free Rotation contextual command is activated and lets you rotate freely your light source around the X, Y or Z axis using the two green manipulators
  • if you activate the Rotate around X command, you can rotate up or down your light source around the X axis only
  • if you activate the Rotate around Y command, you can rotate up or down your light source around the Y axis only
  • if you activate the Rotate around Z command, you can rotate up or down your light source around the Z axis only.

When you select the rotation around the X, Y or Z axis, the green manipulators are hidden and only the light target is displayed:

 

 

Lock Manipulator

When you point at one of the two green manipulators then right-click, you can also lock the selected manipulator using the Lock Manipulator contextual command. This command applies to the local X and Y axes of the light source.

Locking a manipulator means that the rotation in the plane defined by the selected manipulator is locked: the locked manipulator is hidden and you can only move your light source around the unlocked axis of the light source which means that the mouse moves only up or down.

 
No manipulator is locked One manipulator is locked
 

To unlock the manipulator, right-click then select Lock Manipulator again.

Once a manipulator is locked, you can also click anywhere in the geometry area then press the space bar to hide the manipulator symbol.
This is especially useful when working with big models because you can still change the light position by pointing at the hidden manipulator (in that case, the cursor shape changes) without being bothered by the display of this manipulator on your model.

 

This is illustrated by the example below in three steps (from left to right):

  1. one manipulator is locked
  2. the cursor shape changes
  3. you can still drag the hidden manipulator to modify the light direction
 
 

To redisplay the manipulator, you just need to press the space bar again.

 

When satisfied with the direction position, press Esc to exit the Position Direction command.

 

The rendered image below illustrates the result you can obtain once light sources have been defined:

 

More about light sources

Light sources created in the Photo Studio workbench are supported in:

  • reviews created using DMU Navigator. Refer to the "DMU Review" section in the Version 5 - DMU Navigator User's Guide to for detailed information
  • presentations created using DMU Navigator. Refer to the "DMU Presentation" section in the Version 5 - DMU Navigator User's Guide.