Skip to main content
gamedev.net
🔒 Locked

Reflections

Started by MattCarpenter Dec 17, 2002 at 12:38 PM 0 replies 150+ views
Original Post
MattCarpenter
MattCarpenter
Hey, I was looking at some screenshots for some 3D racing game, and tehy had some nice reflections of headlights on the wet streets. Anybody have any idea how they made those reflections?
//att
Diodor
Diodor
One simple enough idea is to create the scene geometry twice: a normal version and a reflected version. Draw the reflected world (on the other side of the mirror), draw the mirror surface using a blend function, and draw the normal world. This works perfectly when the two worlds do not intersect (reflections on the street - the reflected world is bellow the street plane, the real world is above).

If the two worlds intersect, you can probably use some portal tricks (an old small project of mine: a portal renderer, has two mirrors face to face, creating infinite reflection here).




Test my game.

[edited by - Diodor on December 17, 2002 11:53:27 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.