🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

What's about MIRROR TEXTURE EFFECT ??

Started by
6 comments, last by NinjaCross 24 years ago
Hey guys ! I wanna introduce some mirrorse in the wads of the game I''m developping.. but i really don''t know how !! Can somebody say me where can i find some informations about MIRROR-TEXTURES ??? (I.E.: mirrors in the wads of Unreal, Half-Life, etc etc). Thankyou in advance for your help ! //------------- Making Funny Fake Codes //-------------
//-------------A straight line may be the shortest distance between two points, but it is by no means the most interesting.http://members.xoom.it/NinjaCross
Advertisement
Hi NinjaCross,

That a pretty interresting subject, i''had think alot about mirror surface (texture).

In real life, a mirror reflect light with the same angle as received light.

(light)    (reflected light)\    /    /  \ a/b /    \//------------------ 


''\'' is the light
''/'' is the reflected light
''/'' is the normal of the plane

a = b; that''s always true !!!

So, using those law of light. I thought, why not trace a ray to the middle of the reflecting plane, that will give us a ray that goes where the light is coming to our eyes. So i thought using another camera behind the mirror (the camera is positionned on the projected vertex), and use the mirror as a clipping plane (frustum clipping).

But, maybe the speed will not be very high, anyway their other way i was thinking implementing mirror surface. But this give some basic. Thought around that, you will figure.

Here a clue, take a mirror. Put it in front of your, And turn around !!!! And analyze what is going on.


Good Luck, Happy Coding ...

LowRad
well, if you''re using portals, it''s pretty trivial. a mirror is just like a portal, but instead of extending the view into the next room or sector, it reflects it back into the current one. same math, same concepts.


--
Float like a butterfly, bite like a crocodile.

--Float like a butterfly, bite like a crocodile.
Hey, nija, what are you talking about ? Mirrors ? in Half Life, Where ?????
(you can find me on IRC : #opengl on undernet)
Hey SkSlayer!! Are you sure you discovered ALL the areas of Unreal Wads ?? ;-)

//-------------
Making Funny Fake Codes
//-------------
//-------------A straight line may be the shortest distance between two points, but it is by no means the most interesting.http://members.xoom.it/NinjaCross
Hey, I didn''t talk about Unreal

Anyway, I don''t like Unreal, even if it''s a good game :o)

I mean, the direct3D version doesn''t work and the OpenGl looks like half a frame per second ... (I don''t understand that !!)

Anyway, I played it over to a friend, it''s a good game... and no, I never looked into the unreal wads
(you can find me on IRC : #opengl on undernet)
Hi everybody!

2 links dealing with mirror rendering in OGL :

http://reality.sgi.com/mjk_asd/tips/TimHall_Reflections.txt
http://reality.sgi.com/mjk_asd/tips/Reflect.html
hope that help!

lunasol
Thankyou guys !!
Your help is everyday very usefull !!

//-------------
Making Funny Fake Codes
//-------------
//-------------A straight line may be the shortest distance between two points, but it is by no means the most interesting.http://members.xoom.it/NinjaCross

This topic is closed to new replies.

Advertisement