David's Blog

Mostly Hobby Stuff

Light Fade Volumes and Filter Overrides

leave a comment »

One problem with the system I mentioned in my last post was that the transition from outdoor to indoor lighting was rather harsh. So in order to improve this I added something I call light fade volumes, these are simply trigger volumes which cause the influence of a set of lights identified by a filter group to scaled based on the distance of the object through the volume. For example I can place light fade volumes in doorways to gradually reduce the influence of sky lights on the player as they move through the doorway.

In order to support this I needed to add an additional feature to triggers/collision geometry, i.e. a direction for the volume. This direction can be set and displayed in the editor(as shown below). A further motivation for a direction is to support things such as force fields, push volumes, gravity volumes, anisotropic friction etc.

Once I had this working, I noticed that I often wanted a bunch of lights to only affect the static geometry (e.g. steps) but not the dynamic object resting on them (player). To achieve this I added a property set which can be applied to collision geoms which specifies an alternative light filter for objects resting on them.


may12 may12_2 may12_3


Written by therealdblack

May 12, 2010 at 9:55 pm

Posted in Hobby Game, XNA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: