Darken a model in relation to a lightmap?

Blitz3D Forums/Blitz3D Programming/Darken a model in relation to a lightmap?

JustLuke(Posted 2005) [#1]
I would like to uniformly darken/lighten a moving model in relation to a lightmapped mesh directly beneath the model (so that my characters don't stand out like lightbulbs when they are standing in darkly lit areas and vice versa!)

I was hoping that there might be a simple way to get the RGB colour values of a point on the texture of a model - kind of like a 3d version of getcolor - so that I could use these values with entitycolor to tint my moving models.

If this is not possible, can anyone here suggest another method of achieving moving models that are darkened/lightened as they pass over the pre-calculated static shadows of a lightmap?


DJWoodgate(Posted 2005) [#2]
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=515

(By the author of Gile[s] which as rumour has it is a pretty good way to make lightmaps.)


JustLuke(Posted 2005) [#3]
Thanks, that's just what I was looking for! I must have missed that when I checked the code archives last night.


Knotz(Posted 2005) [#4]
This discussion may be interesting for you:

http://www.blitzbasic.com/Community/posts.php?topic=41784


Drey(Posted 2005) [#5]
One trick i thought off is having a line pick to the light entity. If it makes it, let the full lighting effect process. Once the line donesn't reach the light, have the light range fade out and blend into whatever color u want. Once the light pick hits the light source again, have a fade in to the orginal properties.

U'll actually find that the do this on professional games. I've been playing HL2, Unreal very closely. I was surprise with what i found. Has long as the object isn't too big, it'll look find.