Combining Terrain and Portal Engines

Started by
1 comment, last by haphazardlynamed 19 years, 6 months ago
What are good ways to transition from indoor (portal) to outdoor (terrain) engines? my portal engine is simple, its based on 6 sided warped cubes as sectors so my collision detection is just using dot products against each face im not sure how i can combine that with a terrain though.... i suppose i need a way to place part of the portal engine on the terrain surface as a building or entryway.... but I have no idea how to handle collision detection with such a building, or how to know if the player has managed to pass through the door to the normal portal engine or not another problem with a building is, that my portal engine is ... indoors; the player is always, within the sectors whereas a building is the opposite, rather than detect collisions as the player managing to penetrate a wall to get ouside.... its the other way around; the player hitting the building is trying to get inside... so perhaps the building has to be seperate from the portals, and separate from the terrain as well? a special type of object? but that doesnt sound very clean... it would be better if it could somehow be a part of the portal engine code so, anyone ever done this? maybe know any good papers on how to do it? I know Descent3 had combined terrain and portal engine... but i havent seen anything on their method actually.... i think i just had an idea.... that uses the current portal engine stuff with minimal modification..... perhaps i build the entryway/ building as part of my portal engine map architecture, and have it be enclosed by large 'outdoors' sectors, which are special, and are flagged to load terrain so that the terrain covers their floors and their walls are made transparent.... so a portion of being outside, is actually still within the portal engine, -remember seeing that movie 'Blast From the Past' where the guy's bomb shelter had a big cave underground, with the walls painted sky blue and the little house built within it? so it looked like it was outside but wasnt then i have the issue of figuring out when the player has entered one of these regions from the terrain.... which should be simplified now, since the 'outdoors' sectors can be large, few, and a standard enclosing shape -standard like perhaps... the same size as a terrain geomipmap tile, and the same coordinates alignment how does that sound? know any other ways?
Advertisement
The way we do this, very simply, is to have a 2D collision outline that we associate with motion on the terrain. As we move around the terrain, we check for 2D collision against the outlines and if a character or vehicles collides with the outline, we deal with that. And if the collision happens at a portal opening, we allow the character/vehicle to pass through the opening to get inside if it is wide enough.

This works for vehicles and characters that walk, and can be adapted to flying vehicles if the "building" has a fixed height.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
that suggestion is orthogonal to my idea - neither directly supporting nor against it

i supose that yes, i am going to be doing that, my 'outdoors' portal sectors would be a way to simplify the outline of the building
and to keep the terrain engine from having to deal with the comlexity of doors and windows

This topic is closed to new replies.

Advertisement