octrees, frustums and PVS....

Started by
7 comments, last by BlackWind 17 years ago
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...
Advertisement
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.
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.
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?
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?
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.
Every time you implement a singleton, God kills a kitten. Please, think of the kittens!
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?
In VFC you test things against the view cone. Points, AABB, OBB, spehere, etc. With the portal, you test the 4 corner points.
Every time you implement a singleton, God kills a kitten. Please, think of the kittens!
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?

This topic is closed to new replies.

Advertisement