View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# How to make a true mirror?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

5 replies to this topic

### #1jerry2  Members

Posted 28 September 2001 - 12:50 AM

i want to know how to make an effect as follow: make a mirror at the center of the scene,and leave a object(such as cube.etc.)at one side of the mirror,then i can move the camera,and when the camera stands in front of the mirror(the side of the object left in the scene),i can see the shadow of the object which is showed by the mirror. i know a way to make specular effects of slippy surface.that is: make another objects which is symmetric to this one,and place it to the another side of the slippy surface at an equal distance with the distance between the first object with the slippy surface,and then use the alpha blending to make people wrong impression that is like the specular effect. but it''s limited,because if the camera is moved to back of the mirror,u will the truth:a symmetric object is on the other side. So,is there a better way to make a more real mirror specular effect? thanks jerry2 Programming,make a whole new world.

### #2Vlion  Members

Posted 28 September 2001 - 09:22 AM

The symetric method works, but its rather inefficient, yes ?
Check out NeHes tutrials.

I came, I saw, I got programmers block.
~V''''lion

### #3jerry2  Members

Posted 28 September 2001 - 10:18 PM

i know.but what''s the efficient way of urs?

jerry2
Programming,make a whole new world.

### #4Vlion  Members

Posted 30 September 2001 - 05:56 PM

i can give you a general algorithimn for totally realistic mirroed textures.
But i doubt its real-time-able.
NeHe has a tutorial on it. There are probably a slew of other tutorals out there that i dont know of.
Personally im not interested a great deal, Im not really interesed in the latest/greates 3d engine.
So go search.

I came, I saw, I got programmers block.
~V''''lion

### #5Malloc  Members

Posted 02 October 2001 - 06:18 PM

Not sure but isn''t there a way to to this with Stencil Buffers?

Just Draw Your Mirror, xchange the Stencil Setting to GL_KEEP or something like that, draw all the geometry to be mirrored also inverted, then turn off the stencil, draw all again but normal. That should eliminate some problems with the camera.

something like that, i don''t remember well the function names, but soon if i have time i should post back the method.

I think there is a tutorial for that on NeHe, also check the glbook.gamedev.net and download the book samples, there is some mirror samples.

### #6jerry2  Members

Posted 02 October 2001 - 09:21 PM

thanks

jerry2
Programming,make a whole new world.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.