Lighting players based on lightmaps

Blitz3D Forums/Blitz3D Programming/Lighting players based on lightmaps

.rIKmAN.(Posted 2004) [#1]
`m trying to use this technique to light my characters correctly in-game, and real time.
I found this: http://www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=kusonagi09182003234308&comments=no

But can`t seem to get it to work, it just reports the same value all the time no matter where I am in my level.

Has anyone got any advice / tips?
Is there a better way?

I`m using levels output from Cartography Shop, with lightmaps.


Rob(Posted 2004) [#2]
I got tired of using lightmaps to do that, for example, if the player jumps off a ledge, the lighting would be incorrect...


fredborg(Posted 2004) [#3]
You can try using these functions: http://www.blitzbasic.com/codearcs/codearcs.php?code=515


.rIKmAN.(Posted 2004) [#4]
Rob: Yeah I thought of that, but haven`t worked out any better way to do it yet :S

Fredborg: Cheers for the functions, but will these do what I want (calculate the pixel colour from the lightmap, based on a linepick from the player in the 3d world) ?

What is the best way to do this?


Ice9(Posted 2004) [#5]
Thats how the old Unreal Tournament engine did the lighting on the player models, from the light map directly below the player. I would think the only other way to do
it would be to create volume lighting data. Anyway you do
it you are going to come up with errors unless you are
doing light mapping calculations on the player.
One other way I could think is to cast a ray from the
light positions to the player checking collision and including fall off. you could place 3 lights parented to the player and consider only the most significant lights
around the player in the the setting of those light colors.


.rIKmAN.(Posted 2004) [#6]
So is using this method good or bad, are there better ways?
I also beleive Ravey used this method in Root (if my mind serves me correctly!)


.rIKmAN.(Posted 2004) [#7]
Am I asking a hard question - cos I`m not getting any replies on BC.com either?


Oddball(Posted 2004) [#8]
This method is fine. But it does depend greatly upon the game. If the objects you are going to light in this manner are never far from the floor then this method is perfect acceptable.


Rob(Posted 2004) [#9]
another method is to use fog on a cubemap camera and render the very low res cubemap to the player, but I've no idea how good this will look.