Using light boxes and light areas

Light clipping boxes and areas are used for the implementation of deferred light clipping in CryENGINE. It is a tool that will enable interior spaces to be lit far better and more accurately than they had been in previous iterations of the CryENGINE.

Getting ready

Using light boxes and light areas is highly dependent on the situation. In this example, you should have already completed the prior recipe on Optimizing the levels with VisAreas and portals.

How to do it...

Let's test the process of using a light box:

  1. Drag-and-drop the light box from the Area tab in the RolloutBar.
  2. Next add a light to your scene.
  3. In the lights entity links, add a link to the light box.
  4. The light must have the DeferredClipBounds property set to True. Once set to true, you will see the light will be clipped to that volume.
  5. A deferred light that is linked to either a LightShape or a LightBox will be clipped to that volume regardless of whether it is inside the volume or not:
    How to do it...

How it works...

There is a common problem of light bleeding becoming apparent with the deferred approach: the boundaries of lighting are not controllable. Deferred light for example placed in one room can bleed through the wall into another room.

Thankfully, there is a tool available for artists where they can specify a custom stencil culling geometry for each light source in the scene.

This approach is very cheap provided that the clipping geometry is rather coarse and the stencil tagging is very fast on consoles.

There's more...

You may want to know the limits of using light shapes or what occurs when trying to link to multiple light shapes.

Using a concave light shape

If a concave light shape has been created, the editor should warn the user and not clip the light.

Linking to multiple light shapes

If a light falls inside, or is linked to more than one LightBox or LightShape, the editor will warn the user and clip the light to the first LightBox/LightShape in the list.

See also

  • The Placing the objects in the world recipe in Chapter 2,Sandbox Basics
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.107.193