[Fluent Inc. Logo] return to home search
next up previous contents index

28.2.6 Adding Lights

In FLUENT you can add lights with a specified color and direction to your display. These lights can enhance the appearance of the display when it contains 3D geometries. By default one light is defined. You can turn on the effect of the existing light(s) using the Display Options panel or the Lights panel, and you can add new lights using the Lights panel.

Turning on Lighting Effects with the Display Options Panel

To turn on the effect of lighting, you can use the Display Options panel.

Display $\rightarrow$ Options...

If you turn on the Lights On option under Lighting Attributes and click the Apply button, you will see the lighting effects in the active graphics window. To turn off the lighting effects, simply turn off the Lights On option and click Apply.

You can also choose the method to be used in lighting interpolation; select Flat, Gouraud, or Phong in the Lighting drop-down list. (Flat is the most basic method: there is no interpolation within the individual polygonal facets. Gouraud and Phong have smoother gradations of color because they interpolate on each facet.)

Turning on Lighting Effects with the Lights Panel

You can also turn on lighting effects using the Lights panel (Figure  28.2.9).

Display $\rightarrow$ Lights...

For constant lighting effects in the direction of the view, turn on the Headlight On option in the Lights panel. This option has the effect of a light source directly in front of the model, no matter what orientation the model is viewed in. To disable this feature, turn off the Headlight On option in the Lights panel.

In the Lighting Method drop-down list, choose Flat, Gouraud, or Phong to enable the appropriate lighting method. (These methods are described above.) To disable lighting, select Off in the list. To see the lighting effects in the active graphics window, click the Apply button.

Defining Light Sources

You can control individual lights in the Lights panel (Figure  28.2.9). The Lights panel allows you to create a light and then turn it off without deleting it. In this way, you can retain lights that you have defined previously but do not wish to use at present.

Display $\rightarrow$ Lights...

Figure 28.2.9: The Lights Panel

(You can also open the Lights panel by clicking on the Lights... button in the Display Options panel.)

By default, light 0 is defined to be dark gray with a direction of (1,1,1). A light source is a distant light, similar to the sun. The direction (1,1,1) means that the rays from the light will be parallel to the vector from (1,1,1) to the origin. To create an additional light (e.g., light 1), follow the steps listed below.

1.   Increase Light ID to a new value (e.g., 1).

2.   Turn on the Light On check button.

3.   Define the light color by entering a descriptive string (e.g., lavender) in the Color field, or by moving the Red, Green, and Blue sliders to obtain the desired color. The default color for all lights is dark gray.

4.   Specify the light direction by doing one of the following:

  • Enter the ( X, Y, Z) Cartesian components under Direction.

  • Click the middle mouse button in the desired location on the sphere under Active Lights. (You can also move the light along the circles on the surface of the sphere by dragging the mouse while holding down the middle button.) You can rotate the sphere by pressing the left mouse button and moving the mouse (like a trackball).

  • Use your mouse to change the view in the graphics window so that your position in reference to the geometry is the position from which you would like a light to shine. Then click the Use View Vector button to update the X,Y,Z fields with the appropriate values for your current position and update the graphics display with the new light direction. This method is convenient if you know where you want a light to be, but you are not sure of the exact direction vector.

5.   Repeat steps 1-4 if you want to add more lights.

6.   When you have defined all the lights you want, click Apply to save their definitions.

Removing a Light

To remove a light, enter the ID number of the light to be removed in the Light ID field and then turn off the Light On button. When a light is turned off, its definition is retained, so you can easily add it to the display again at a later time by turning on the Light On button. For example, you may want to define three different lights to be used in different scenes. You can define each of them, and then turn on only one or two at a time, using the Light ID field and the Light On button. Once you have made all the desired modifications to the lights, remember to click the Apply button to save the changes.

Resetting the Light Definitions

If you have made changes to the light definitions, but you have not yet clicked on Apply, you can reset the lights by clicking on the Reset button. All lighting characteristics will revert to the last saved state (i.e., the lighting that was in effect the last time you opened the panel or clicked on Apply).

next up previous contents index Previous: 28.2.5 Changing the Colormap
Up: 28.2 Customizing the Graphics
Next: 28.2.7 Modifying the Rendering
© Fluent Inc. 2006-09-20