Jump to content
  • Advertisement
Adding lighting effects for fires and torches
© Caveman (C) 2000-2013 Rockland Software Productions
Image Tools

Adding lighting effects for fires and torches

Norman Barrows
Sign in to follow this  

Adding lighting effects for fires and torches


The d3d fixed function pipeline provides a large number of ways to influence lighting. global, material, and light data can all contribute.


A good way to control lighting was required. it was decided that materials would be where lighting was adjusted. globals are set to "pass through" values, so they have no effect, lights are static except for attenuation of diffuse for the sun/moon light based on time of day.


instead of one material per mesh subset, the game uses a global database of 7 types of materials (so far) for all objects. that way lights can simply be turned on, globals have no effect, and all lighting can be controlled via a shared global material.


a unexpected upside off this is brightness control. instead of playing with gamma correction, which tends to wash out colors, global materials means its easy to simply multiply all the power values of all materials in the game (all 7 of them) to increase brightness. This also avoids the overhead of adding an extra light for brightness.


The sun/moon uses one directional light. fires and torches each add one point light to the scene. cutoff ranges for point lights are kept short, on the order of 20-30 d3d units from the light source.


© Caveman (C) 2000-2013 Rockland Software Productions
Sign in to follow this  
From the album:


  • 68 images
  • 2 image comments

Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!