06-23-2011, 02:04 PM
(This post was last modified: 06-23-2011, 02:08 PM by Descenteer.)

Quote:As it may be - in the technical term of the engine it will only be adding a certain amount of dynamic light to a vertex or not. All I am about to change is which vertecies will have dynamic light added depending on more realistic circumstances.

Just for the sake of clarity : To achive this, you will have to do some kind of lightsource-vertex visibility check. That's a shadow calculation. In your case on a vertex level.

One relatively simple method to achive this would be to cast a ray from the light source to any vertex inside a lights radius and check whether that ray hits any geometry in between. Considering the very simple geometry of Descent levels, that might work without any noticable performance hit. Otherwise you might want to divide the level into some kind of tree structure (bsp or similiar), if Descent doesn't do this already. One caveat though: partially transparent geometry like open doors or fence like structures (everything with alpha channel transparency) will need special treatment or considered completely invisible to the ray.