Skip to main content
added 57 characters in body
Source Link
ratchet freak
  • 8.1k
  • 20
  • 16

descent uses a portal rendering engine this engine divides the world in convex rooms and the engine knows which room you are in

then to render you render the rooms faces and for each visible face that is a portal you adjust the frustum and render the room that the portal links to

in psuedo code:

renderRoom(room) {
    foreach face in room
    {
        if(!visible(face))continue;
        if(!isPortal(face))render(face);
        if(isPortal(face))
        {
            push frustum
            adjustFrustum(face)
            renderRoom(face.room)
            pop frustum
        }
    }
}

if a portal face is not visible then you don't need to render the room that connects through the portal

tutorial I found for creating a portal engine: http://www.flipcode.com/archives/Building_a_3D_Portal_Engine-Issue_01_Introduction.shtml

descent uses a portal rendering engine this engine divides the world in convex rooms and the engine knows which room you are in

then to render you render the rooms faces and for each visible face that is a portal you adjust the frustum and render the room that the portal links to

in psuedo code:

renderRoom(room)
foreach face in room
{
    if(!visible(face))continue;
    if(!isPortal(face))render(face);
    if(isPortal(face))
    {
        push frustum
        adjustFrustum(face)
        renderRoom(face.room)
        pop frustum
    }
}

if a portal face is not visible then you don't need to render the room that connects through the portal

tutorial I found for creating a portal engine: http://www.flipcode.com/archives/Building_a_3D_Portal_Engine-Issue_01_Introduction.shtml

descent uses a portal rendering engine this engine divides the world in convex rooms and the engine knows which room you are in

then to render you render the rooms faces and for each visible face that is a portal you adjust the frustum and render the room that the portal links to

in psuedo code:

renderRoom(room) {
    foreach face in room
    {
        if(!visible(face))continue;
        if(!isPortal(face))render(face);
        if(isPortal(face))
        {
            push frustum
            adjustFrustum(face)
            renderRoom(face.room)
            pop frustum
        }
    }
}

if a portal face is not visible then you don't need to render the room that connects through the portal

tutorial I found for creating a portal engine: http://www.flipcode.com/archives/Building_a_3D_Portal_Engine-Issue_01_Introduction.shtml

Source Link
ratchet freak
  • 8.1k
  • 20
  • 16

descent uses a portal rendering engine this engine divides the world in convex rooms and the engine knows which room you are in

then to render you render the rooms faces and for each visible face that is a portal you adjust the frustum and render the room that the portal links to

in psuedo code:

renderRoom(room)
foreach face in room
{
    if(!visible(face))continue;
    if(!isPortal(face))render(face);
    if(isPortal(face))
    {
        push frustum
        adjustFrustum(face)
        renderRoom(face.room)
        pop frustum
    }
}

if a portal face is not visible then you don't need to render the room that connects through the portal

tutorial I found for creating a portal engine: http://www.flipcode.com/archives/Building_a_3D_Portal_Engine-Issue_01_Introduction.shtml