Sign in to follow this  
Enrico

Creating sectors from meshes and portals

Recommended Posts

Hi, I am currently trying to display Doom3 and Quake4 maps. The appropriate map compiler gives me the following: - A list of meshes with triangles - Portals with positions and sector indices As you can see, there is no mapping between the meshes and the sectors. There are only sector indices. My problem is now to generate the sectors from the meshes, to use with Portal Culling. My current algorithm:
For all sector ids do:
  Collect all portals with this id
  For all (remaining) meshes do:
    If this mesh is between the portals:
      Add mesh to this sector
This has some problems, where meshes are added to more than one sector if not needed to. But at least it is better than doing Frustum Culling for every single mesh... Any other ideas or things I could try? Maybe I have overlooked something? Thanks, Enrico

Share this post


Link to post
Share on other sites
The meshes that are to be used to draw the sectors are named something_XXX (I don't remember the name specifically), but they're all numbered in that way.

Share this post


Link to post
Share on other sites
Quote:
Original post by PfhorSlayer
The meshes that are to be used to draw the sectors are named something_XXX (I don't remember the name specifically), but they're all numbered in that way.

Hey, this seems to look right :-) :-) Thanks, I just tried to compare the numbers at the end of the names with the sector indices and it seems to work. I will make the mapping later :-)
Thanks :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this