Skip to main content
GameDev.net gamedev.net
🔒 Locked

Objects and lights

Started by Michael Meyer Feb 14, 2003 at 9:00 PM 1 replies 350+ views
Original Post
Michael Meyer
Michael Meyer
In a 3d game, there is usually some kind of structure to organize the objects in a level, like a BST or Oct-Tree, right? What is confusing me now is how lights go into those. You can''t just do the same thing as with objects can you? And you don''t want to process all the lights all the time... so...how do you organize them?
S1CA
S1CA
Make a bounding volume for each light. For example a point light has a sphere as its bounding volume, a spotlight has a cone as its bounding volume etc. You have all of the info you require such as light range, attenuation, direction etc.

Treat those bounding volumes just like geometry with regard to your world database organisation (octree, BSP tree etc).

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
Michael Meyer
Michael Meyer
I can''t believe I didn''t think of that.
Thank you!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.