Jump to content
  • Advertisement
Sign in to follow this  
BlackWind

octrees, frustums and PVS....

This topic is 4132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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.

Share this post


Link to post
Share on other sites
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
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
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
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
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
In VFC you test things against the view cone. Points, AABB, OBB, spehere, etc. With the portal, you test the 4 corner points.

Share this post


Link to post
Share on other sites
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!