wizzo

07-02-2004, 08:24 AM

Hey folks,

While trying to decide who to combine portals, octrees and BSPs for my engine, i read in different places that people cut polygons to make them fit int oa portal or octree. The aim is to make a polygon be in only ONE octree or sector. ok but here are two thoughts:

- By doing a main polygon index you can check before drawing a polygon if it hasnt already been drawn. I'm thinking of the bitset the GameTutorials.com programmers applied on there BSP tut. This way, there is no polygon drawn twice.

- The other point is about vertex count : imagine a polygon that is symetric : each of the 2 sides have the same numbre of vertice. something like that :

http://www.ece.fr:8000/~miffre/public/tmp.jpg

the middle vertical line is the separation between the 2 octrees. If you cut the polygon, well you just add the 2 middle vertice, and you have a right and a left polygon

2 situations:

* first if you see only one of the two octrees :

you'll draw 6 verts if you cut polygons

you'll draw 8 if you dont

* if you see the 2 octrees :

you'll draw 12 verts if you cut the polys

you'll draw only 8 if you check your bitset before drawing

So is this a really good idea to split the polygons ? (well probably if so much people do that, so tell me why :D)

wizzo

While trying to decide who to combine portals, octrees and BSPs for my engine, i read in different places that people cut polygons to make them fit int oa portal or octree. The aim is to make a polygon be in only ONE octree or sector. ok but here are two thoughts:

- By doing a main polygon index you can check before drawing a polygon if it hasnt already been drawn. I'm thinking of the bitset the GameTutorials.com programmers applied on there BSP tut. This way, there is no polygon drawn twice.

- The other point is about vertex count : imagine a polygon that is symetric : each of the 2 sides have the same numbre of vertice. something like that :

http://www.ece.fr:8000/~miffre/public/tmp.jpg

the middle vertical line is the separation between the 2 octrees. If you cut the polygon, well you just add the 2 middle vertice, and you have a right and a left polygon

2 situations:

* first if you see only one of the two octrees :

you'll draw 6 verts if you cut polygons

you'll draw 8 if you dont

* if you see the 2 octrees :

you'll draw 12 verts if you cut the polys

you'll draw only 8 if you check your bitset before drawing

So is this a really good idea to split the polygons ? (well probably if so much people do that, so tell me why :D)

wizzo