Request - internal visibility check when lighting

Blitz3D Forums/Blitz3D Programming/Request - internal visibility check when lighting

JoshK(Posted 2004) [#1]
Moved here, for a more complete and better description:
http://www.blitzbasic.com/Community/posts.php?topic=34363


Warren(Posted 2004) [#2]
Hardware lights are so fast for that very reason ... they don't check visibility and they don't cast shadows.

This might be useful, but I think you'd get enough artifacts that it wouldn't be all that useful. Like, an entity is partially behind a wall but it still gets entirely lit because the wall isn't throwing a shadow.


JoshK(Posted 2004) [#3]
That's how most games do lighting of things-that-move-around-in-the-map. This is really for characters and small items, not for lighting a level. It works nicely if you just create lights for every lightmap light. If you are standing in the shadow, you are not lit. If you step out into the light (and since the lightmapper used the same light position, it has drawn lights there) you are lit.

I do this with vertex lighting for lighting characters and such, and it looks really good, but calculating and changing all the vertices is much slower than if the gfx card does it. It's also impossible to do your own vertex lighting on referenced prefabs.


JoshK(Posted 2004) [#4]
Actually, what would be simpler to implement, and give more control to the user, would be a DisableLight(light,entity) command, or something like that.