portal engine hacks
i have devloped a simple BSP and portals engine and i was wondering if anyone had a suggestion for building a "gateway" system, so that you can sort of see through the portal into another area that is not really there, and of course, this area may not have a gate back to the are you are in. essentially, i want to make the "looking glass" for you to step and see through, even though it may lead to a completely seperate area in the map. an ascii art example:
+--------+ +--+
| | / \
| +--+ | / \
| | | | + +
| +PP+ | \ /
| | \ /
+--------+ +PP+
where PP is the portal connecting the two areas, even though the later would not fit in the former and in fact would overlap it were they in the same space.
Thanks
I''ve added this to a portal renderer of my own, its a really funky effect Basically all you have to do is store a matrix transform with your portal, then when rendering push this onto the matrix stack and transform all the geometry viewed though the portal by this new transform.
Moving objects get the same transform performed once on their position to ''teleport'' them to the correct destination, as will the camera. Since on screen the teleport moves them to the same place on the screen you can''t see it
Assuming you''re already using a zbuffer then most of the depth problems are solved, although you may find you need to use the stencil buffer to mask away the portal region to draw correctly (depends how odd your levels can get..).
Flipcodes articles are pretty good i remember, but i''m not sure if they cover this type of weird portal view-teleport behaviour (which i''ve nicknamed moving though Escher space, for obvious reasons ).
Moving objects get the same transform performed once on their position to ''teleport'' them to the correct destination, as will the camera. Since on screen the teleport moves them to the same place on the screen you can''t see it
Assuming you''re already using a zbuffer then most of the depth problems are solved, although you may find you need to use the stencil buffer to mask away the portal region to draw correctly (depends how odd your levels can get..).
Flipcodes articles are pretty good i remember, but i''m not sure if they cover this type of weird portal view-teleport behaviour (which i''ve nicknamed moving though Escher space, for obvious reasons ).
also perhaps if you had a sort of teleporter to another part of the map you could render to a texture the view at the teleport destination then render that to your portal. then you could do some funky shader effects to make it look like a proper teleporter =)
perhaps...
however this wouldnt work if you wanted to have a room leading into itself. for that you could use orangytang''s system.
perhaps...
however this wouldnt work if you wanted to have a room leading into itself. for that you could use orangytang''s system.
The original Unreal did this in some of the multiplayer maps.
You could see through portals and often they had them only go one way, also they used some cool transforms so that you looked through into the other sector it look tilted / skewed. Its a good ability to have in a portal engine.
You could see through portals and often they had them only go one way, also they used some cool transforms so that you looked through into the other sector it look tilted / skewed. Its a good ability to have in a portal engine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement