Sign in to follow this  
BlackWind

octrees, frustums and PVS....

Recommended Posts

BlackWind    212
hi, well, i decided to do the space partitioning of my game with an octree, and a frustum culling for the view... i already implemented it, and works fine. My question is, how can i implement a PVS (Potential Visibility Set) in my world? (for NOT drawing the info that is behind of the walls, for example -- vertex,textures,models,etc--) i wont be using any level editor that gives me this information (like the .bsp from quake), and i'm going to have indoors and outdoors scenarios (rooms, gardens, etc...) the format i use for my models is MS3D (from milkshape3d), and for the terrains a raw file containing only the vertex data(then i will texture map them).... is there any possible solution? or what can i do? thanks...

Share this post


Link to post
Share on other sites
ToohrVyk    1596
You may wish to precompute visibility information, as portals, antiportals or a true PVS, when you save the map from an editor or compiler, or when you load it into the game.

Share this post


Link to post
Share on other sites
DaBono    1496
You could create portals (invisible meshes that indicate visibility) in Milkshape and compute a BSP from that.

If you really have lots of meshes, it might be interesting to look at hardware occlusion queries. They're a bit tricky to implement without stalling the GPU, but certainly not impossible. More info can (a.o.) be found in GPU Gems 2, Chapter 6.

Share this post


Link to post
Share on other sites
BlackWind    212
so the idea is that i MUST have an indicator for the walls and stuff like that in my level file?

well.... assuming that i have that indicator....

how would the algorithm go for detecting that i'am in a room and not drawing the next room??
any good idea? or any good tutorial?

Share this post


Link to post
Share on other sites
BlackWind    212
well, i read about this, and i found something named "oclussion queries", its supported for OGL 1.5 or above,
it seems to be easy to implement and a good solution for this..... what do you think?

Share this post


Link to post
Share on other sites
darkelf2k5    286
Quote:
Original post by BlackWind
how would the algorithm go for detecting that i'am in a room and not drawing the next room??


Given that between 2 rooms there is a portal, represented by a quad, if that quad fails the VFC test, you don't have to draw the room it connects to.

Share this post


Link to post
Share on other sites
BlackWind    212
hi,
is VFS visibilty/view frustum culling?
if it is... how do i get the vfs for only one portal?
my frustum culling is for all the world..... how do i calculate a frustum culling for a limited space?

Share this post


Link to post
Share on other sites
BlackWind    212
hi,

but for example, if the room is in front of me, i will always tell that its inside the frustum, even if i have a wall, beacuse when i calculate the frustum, it gives me the clipping planes for all the world (based on the projection and modelview matrix multiplication)....

my question is.... how do i fix it? wouldnt it be easier to use oclussion queries?

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