PDA

View Full Version : Shadow in racing game



Nil_z
03-29-2001, 09:39 PM
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?

Zeno
03-30-2001, 12:01 AM
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

kaber0111
04-01-2001, 10:17 AM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif

baraff's papers, need to print those out and spend a few hours with them http://www.opengl.org/discussion_boards/ubb/biggrin.gif

laterz,
-akbar A.

Nil_z
04-01-2001, 04:27 PM
Do you know where I can some info about project texture? There are only some brief descirption about it in the redbook.

zed
04-01-2001, 08:06 PM
theres an example with the glut source