Hi all!
I'm currently working on implementing my own, small game engine. My first question is: what are the best ways to include lights in the scene graph?
I could add a light to a scene node and that light would be applied to all sub-nodes. However, this would not work in the case where a character is holding a torch: the light is attached to the torch, which is attached to the player. This way, the player (and the nearby scene) would not be lit.
Another option would be to keep the lights on a list and apply the N nearest lights to a mesh. However, this does not seem very efficient as, every frame, the distances between lights and nodes would have to be calculated.
This has bugging me out for a while now...
Thank you in advance