Sign in to follow this  
Revelation60

Spatial data structure

Recommended Posts

I have built BSP trees for my level and I see problems up ahead. Now I draw the level mesh by mesh and I cehck if the mesh is visisble or not. The BSP leafs don't contain meshes, but a set of triangles. So should I build a vertex index array for each subset of triangles that is in a different mesh or is in a different material group but still in the same object? That sounds very complex. Is there a better way?

Share this post


Link to post
Share on other sites
if you are using hardware I would advise not using a bsp tree for rendering, the problem is that the leafs of the tree usually store a very small amount of triangles which will result in a lot more draw calls to your graphics card. Also, the mesh will be split countless times breaking any sort of state/material sorting you have done. You would be better to use some other techinque such as portals, octree etc. bsp trees are mostly used for collision detection in todays games.

Share this post


Link to post
Share on other sites
Quote:
Original post by staticVoid2
if you are using hardware I would advise not using a bsp tree for rendering.


Technically, wouldn't that disregard KD-Trees and ABTs? I'm gonna assume you mean BSP in the sense that Doom, Quake, etc do it by using polygons themselves as the dividing planes, rather than being axis aligned, or wisely selecting (pre-processed) a dividing plane for a given map? I'm curious as I've implemented an Octree myself in my own engine, and currently reimplementing it using a binary tree, but kinda like the way an ABT or KD-Tree works.

Share this post


Link to post
Share on other sites
What do you want to index (objects or polygons making up objects) and for what purpose? (frustrum culling, occlusion culling, visible surface determination, collisions, visibility checking, lighting..)

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