Manipulating Light Sources

This task shows you how to manipulate light sources along predefined circles that are centered on the light target.

Open the FreeStyle_Part_26.CATPart document.

  1. Click the Light Source Manipulation icon .

    The Light Source Manipulation dialog box opens.


  1. Select the light source mode:

    • Attached to Viewpoint: the light source is fixed to the screen and the model can rotate independently to the light source position.

    • Attached to Model: the light source is fixed in the reference axis of the current model.


Manipulators appear in the 3D geometry and the red arrow represents the light direction (i.e. the target):


  When you point at an arrow, a predefined dotted circle is displayed.
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 will also appear.
  1. Use the arrows to define the rotation.


  1. Drag the mouse long the circle handler to change the position of the light source origin along the selected arc:


Note that you can move the light position step-by-step by pressing the Ctrl key 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.
  1. Right-click a manipulator and select one of the following 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 spin box.
    When the rotation angle has been defined, click the desired button to start rotating your light source around the corresponding axis by the angle you specified.

For instance, clicking X+ means that the light source will be rotated by the specified angle positive (i.e. clockwise) around the X axis whereas clicking -X will rotate the light source by the specified angle negative (i.e. anticlockwise) around 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 using the Ctrl key.
  • Quick Orientation: this area lets you position the light source parallel to the absolute axis system.
    For instance, clicking Y will modify the light origin in order to position the light source parallel to the Y axis.
    Inversely, clicking -Y will invert the position of the light source along the Y axis:

  • 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

  This dialog box lets you modify the intensity of a light source is the maximal lightness value of three colors: Ambient, Diffuse, and Specular.

  For detailed information on this dialog box, refer to Adjusting Light Source Parameters in the Real Time Rendering documentation.

Save Light Direction

  This dialog box lets you save the light source position.


Once you are satisfied with the position of your light source, click the Save button 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 the Save Light Direction contextual command then double-click the desired position: the light position will be updated accordingly in the geometry area.


  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 will be able to rotate up or down your light source around the X axis only
  • if you activate the Rotate around Y command, you will be able to rotate up or down your light source around the Y axis only
  • if you activate the Rotate around Z command, you will be able to 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 will be locked: the locked manipulator is hidden and you will only be able to move your light source around the unlocked axis of the light source which means that the mouse will move only up or down.


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

  1. the cursor shape changes

  1. 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.