Latest  | Search | Go
Edit this page   |   Attach file 

  Home | Tutorials | Technical Reference | Runtime | API Documentation | LightingTutorial  

An overview on how to use the Light actors, and shadow projectors in RB

Tutorial Author:Clifton Poli

Light Actor

To add a light to your scene, either click the light icon Lighttutpic1.jpg, or select Light from the script drop down list and click insert.

Omni

Lighttutpic2.jpg

In the light properties, the Type property should be set to 1 for omni, or 8 for Omni projector.

Properties

  • Diffuse
    • Color of light

  • Intensity
    • Brightness of light

  • OmniProjector Map (Cube)
    • Projection cubemap for cube projector

  • OmniProjector Map Blurred (Cube)
    • Blurred (distance based) projection cubemap for cube projector.

  • Range
    • Sets range of light.

Spot

Lighttutpic3.jpg

In the light properties, the Type property should be set to 2 for spot.

Properties

  • Spot Projector Map
    • Projection map for spotlights, you must select a texture for this light type before it will work.

  • SpotFalloff
    • Recommended range 1-130. If you set the range above 130 you may get distortions in the projected texture.

  • SpotHotspot
    • Recommended range 1-130.

Note:        SpotFalloff should always be greater than or equal too SpotHotspot.

Directional

In the light properties, the Type property should be set to 4 for directional.

The best example of what a Directional light is would be the sunlight actor in the dynamic sky. It is a light with an infinite range.

Shadow Projector

Lighttutpic4.jpg

In the light properties, the Type property should be set to 2 (LIGHT_SPOT), and ShadowProjector should be set to true to enable the shadow projector. If you're using a CombinedLight, then you'll also be getting lighting in addition to shadowing. If you only want shadowing, Insert a Light from the class list on the RealityBuilder toolbar.

Properties

  • Shadow Map Size
    • Size of shadow map. Bigger is less aliased, but slower and uses more memory.

Note:        When choosing a Shadow Map Size, it's best to find an acceptable balance between quality and performance. Note that lower performing hardware can make use of the ShadowMapScale setting in the RealityEngine.ini file to reduce to half or quarter resolution shadow maps.

TimedLights

To add a TimedLight to your scene select TimedLight from the script drop down list and click insert.

Properties

  • AdjustByDayTime
    • Whether the light adjusts its intensity according to the time of day, using its TurnOnTime/TurnOffTime values.

  • FlickeringLight
    • Whether the TimeLight flickers at intervals when its on.

  • FlickerPortion
    • Portion of the Light Intensity that flickers.

  • FlickerSpeed
    • Speed of the light flickering.

  • NonFlickerPortion
    • Portion of the Light Intensity that doesn't flicker.

  • ProjectedTextureFileName
    • The texture file projected if this Light is a spotlight projector.

  • RandomizeFlickering
    • Whether the TimedLight's flickering is randomized, for an erratic appearance. This will only take effect if FlickeringLight is also set to true.

  • TurnOffHoursEnd
    • Time that the object finishes turning itself off.

  • TurnOffHoursStart
    • Time that the object starts turning itself off.

  • TurnOnHouseEnd
    • Time that the object finishes turning itself on.

  • TurnOnHouseStart
    • Time that the object starts turning itself on.

SkyColorLight

To add a SkyColorLight to your scene select SkyColorLight from the script drop down list and click insert.

SkyColorLights match the color values of the DynamicSky Light. This is useful for simulating light coming through windows. SkyColorLights have the same properties as regular light actors, however, they cannot be a shadow projector.

Light Lists

Light lists are a level designer's best friend. They are one of the most important ways to optimize the performance of a scene. Because Reality Engine is fill rate limited, i.e. the more lights being rendered on a surface the more fill rate it uses up, it is important to take great care in setting up the light lists effectively. If you don't, anything in the radius of the light (which is not always obvious) will get an extra rendering pass and this is not good!

Every light has its own light list. There are two modes for light lists: Include and Exclude. An Include List includes all of the objects in the list to be lit by the light, and excludes everything else. An Exclude List excludes all of the objects in the list from being lit by the light but things not in the list which are also in the lights's radius will be lit. When setting up light lists, fewer objects in the list will yield better performance. It is best to choose either Include or Exclude mode based on which will allow you to put the least amount of entries in the list.

When setting up the Light Lists for Shadow Projectors always use Include lists. Exclude lists do not work with Shadow Projectors. Include lists for Shadow Projectors denote both shadow casters and shadow recievers.

Attachment sort Action Size Date Who Comment
Lighttutpic1.jpg manage 17.3 K 25 Nov 2004 - 05:42 Main.guest  
Lighttutpic2.jpg manage 29.4 K 25 Nov 2004 - 06:01 Main.guest  
Lighttutpic3.jpg manage 46.4 K 25 Nov 2004 - 06:35 Main.guest  
Lighttutpic4.jpg manage 35.1 K 25 Nov 2004 - 06:49 Main.guest  

LightingTutorial   Edit | Attach | Ref-By | Printable | Diffs | r1.6 | > | r1.5 | > | r1.4 | More