View Full Version : Shadow in racing game
03-29-2001, 08: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?
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.
04-01-2001, 10:17 AM
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
here's some code to do it..
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
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.
theres an example with the glut source
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.