Reflex Lights Documentation

From Nexus Mods Wiki
Jump to: navigation, search

Reflex lights are special lights used to simulate daylight coming through a portal like doors or windows. They get their intensity and color from surroundings and time of day.

General information

Where to use them

Reflex lights are supposed to be used to let light from skydome into the interiors. Therefore we place them in the door and window frames pointing from the outside to the inside.

Performance

Reflex lights are basically area lights with a slightly more expensive attenuation algorithm. This already makes them fairly expensive in comparison to the other light sources. Shadows on the other hand are relatively cheap, because of directionality and relatively small radius. However it is still not ok to generaly turn shadows on, because in most cases, there's a lot of them in around. The door lights are exceptions and should be set to always cast shadows (Low Spec). Because they can change dynamically whether they're opened or not, we want the light to respond to it. 

Naming convetions

Names should start with rl_ prefix or rl_door_ prefix for windows or doors respectively.


Setting up

1. Go to Entity/Lights/ReflexLights and put it into the scene.

RTENOTITLE

 

2. Position it into the portal.

 

3. Hit Generate Reflex Light to bake the values. As with every light baking, you have to have everything that's visible in game visible in editor. Check your fog settings, light setting, clip volumes and so on to make sure. Also your weather has to be cloudy_frequent_showers and clouds has to be updated (wh_env_rebuildClouds)

 

4. At the Entity Properties make sure the light is Active, AttenuationBulbSize is 0.05, Radius reaches the opposite wall (or maximum distance that the light still influences in case the light is small or the room big).

RTENOTITLE

RTENOTITLE

RTENOTITLE

 

5. AffectThisAreaOnly should probably be ticked on – provided the reflex light is inside it's clip volume and it doesn't cause any artifacts on its borders.

6. ProjectorFov should not exceed 160 degrees. The less the better for performance and eventual shadow casting, but you still need to maintain the proper appearance.

7. Then the most important thing. Check PlanarLight and AreaPhysicalAttenuation in Shape category. Also set the dimensions so it corresponds to the portal size - SourceDiameter and SourceWidth

RTENOTITLE

RTENOTITLE

 

8. At the ToDData section you can see the values computed during generation of the reflex light:

RTENOTITLE

For more details regarding how to set up windows and doors reflex lights, visit this page.