Portals compiler

Started by
10 comments, last by Genjix 18 years, 10 months ago
i'm trying to write a portal compiler for my engine, Ouroboros. The portals are hand placed in the map editor. Now i'm searching for some algorithms for building the map..could someone point me to an article, tutorials, source et similia?
Advertisement
It might help if you explain a bit more what you mean with a portal compiler.
What must the compiler do?
for example it should do the same things that the doom3 editor does :D
in a nutshell, i create a map in a 3d editor (max, maya, milkshape, it's not important) and place portals between area transitions. The compiler should divide the map in areas, linking an area to another if there is a portal between them.
Maybe :D
Well, firstly you dont really sound like you know what your talking about yourself ^_^. I still don't understand what your trying to achieve. You mention that you have something that you place portals with... so whats the compiler for?
Ollie"It is better to ask some of the questions than to know all the answers." ~ James Thurber[ mdxinfo | An iridescent tentacle | Game design patterns ]
yes, i place the portals in the editor, but how i know which faces should i render when i look through a portal?
Aaah, now I understand, what you are trying to do is the same as the do in Dungeon Siege with continues worlds right?

I would know how to do this exactly, but I might be able to direct you in the right direction.

Assume you have 2 maps/terrains you want to like to each other. Your portal is defined some where. This data is stored in the map file. Your view frustrum (this is the volume that you can see and every thing that is out that frustrum is out of screen) is showing the first map. After some movement, the portal is within the viewfrustrum over the portal, the second map should be loaded and drawn.

In your case the portals should have to be compiled or anything. They need to contain the info which map they are linked too (in Dungeon Siege portals are known as stitches). Dungeon Siege maps are build out of small meshes that are connected to each other, some of these meshes contain stitch-data.

I hope this gives you some idea how to solve the problem.
i don't think he needs this. You are speaking only on how to render the map, not how to write the map file itself -> how to divide the entire map in various sector according to the portal. I think this is what he is searching for.
Quote:Original post by Anonymous Poster
i don't think he needs this. You are speaking only on how to render the map, not how to write the map file itself -> how to divide the entire map in various sector according to the portal. I think this is what he is searching for.


Might be, but he was talking about a portal compiler, I don't know where he got the idea and I don't think there isn't a compiler needed, to achieve his goals. Maybe he doesn't know what exactly a compiler does. In the programming a compiler tries to build an executable or objectfile, if it doesn't succeeds then the compiler gives the reason to his problems.

b3rs3rk, are you looking for an algoritm that does the calculations to divide a map and then store them in some file?
yes :D
Here's a link to a paper that describes an algorithm for automatic portal generation.

ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-4898.pdf

Cheers

This topic is closed to new replies.

Advertisement