Serious sam portal effect

Started by
5 comments, last by Xetrov 22 years, 9 months ago
If you''ve played Serious Sam, chances are you''ve seen the portal/teleporter thingy. All I want to know, is how in the hell do they do that? Its basically a box, which, when you look at it, you can see the destination.... Well, its difficult to explain. but a damn cool effect. I want it!
Advertisement
Shiteski!!!!

Sorry about that! (posting 3 times)

Stoooopid browser
Unreal and UT use this effect as well. I''m not sure about Serious Sam, but both Unreal''s use portal engines. One of the good things about portal engines is that you can have special effects at places where portals connect (or any of their edges in general). Things like reflection and seeing into another area.

I can''t really explain how portal engines work (they can be pretty complex), but I''m sure you can find an explanation somewhere. BTW: You can delete your duplicate posts.

[Resist Windows XP''s Invasive Production Activation Technology!]
The basic idea is to "not draw" a part of the world you cant see. That can be done with some calculations .
Geez, that sounds scary & complicated....
It isn''t that hard.
Read this tutorial to see how it works, a bit old but still true :

http://www.flipcode.com/portal/

(Portal Engine tutorial)

-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
The easy and fast way would be to make a texture with an image of the destination. This can also be extended to show dynamic changes (movements) in the destination area. Set the camera in this area and render to the backbuffer then can this buffer be copied to the texture.

Another way to limit the drawing area is by using the stencil buffer. Like you do for other things like reflections. The teleporter could be in any shape.

This topic is closed to new replies.

Advertisement