I often see this effect in some racing game: there is a shadow on the road made by some building, tree…(probably using lightmap). The car move into the shadow and is darkened, then move out of the shadow and be lit. I do not think this effect is done by changing light source(or maybe I am wrong?) Anyone can give an idea about how to do it?
I’m not sure how they do it either, but I’d use a projected texture map.
OpenGL can automatically generate projected texcoords, so I’m guessing they use this feature to apply the shadowmap and multitexture with whatever’s already on the car.
– Zeno
yup.
if your racing game only has 1 light, i highly suggest using a shadow map.
or do lighting the way mark kilgard reccomends us do for 1 directional light…
fairly simple concept at it’s fundamentals, the hardest part is deriving the tangent
vector…
here’s some code to do it…
http://www.angelfire.com/ab3/nobody/calc_tangent.c
i’m thinking about doing a racing game thingy for fun, seems pretty good and place to up my physics abilities
baraff’s papers, need to print those out and spend a few hours with them
laterz,
-akbar A.
Do you know where I can some info about project texture? There are only some brief descirption about it in the redbook.
theres an example with the glut source