Hi!
I have a map that is a house with some rooms in it - the rooms contain lots of
other things that I do not want to render if they are not visible.
Currently I have a BSP tree that I use for culling against the frustum. But
because of the fact that I allow the player to walk outside of the house and
around it,
my frustum is quite large (so one can see the other end of the garden
when outside) and therefor most of the geometry is included in the
frustum (not if you look over the fence at the sky box of course, but most of
the times).
When I am outside of the house and look against a wall, all the geometry in it is
rendered, because it is in included in the frustum volume...
Is there any algorithm I could use to improve this PVS? Do I really need to use
portals? Because my map is done in Blender, I don't have special features like
defining portals etc. available in it.
My current idea is to separate the interior elements of the rooms from the map
and keep them seperately. Then I define a bounding sphere around each
element. When drawing the map I'd like to check against each bounding sphere whether
it is visible or not - and only render the furniture when the bounding sphere is visible - but how do I test this?
Does anybody have a hint which way I could optimize my PVS? Or does
someone has a tip how to check quickly whether a sphere or part of it is
visible?
Thank you in advance,
Stefan
How can I improve my PVS system?
Started by Phaetos, Nov 06 2005 08:29 PM
2 replies to this topic
#2
Posted 06 November 2005 - 09:27 PM
For rooms, I might suggest that bounding boxes would be more appropriate than bounding spheres, as they will fit more closely the shape of a room.
Separating the indoor and exterior environments is a good idea. You might try implementing occlusion culling. This works similiarly to frustum culling, except you have hidden object called "occluders" (aka "antiportals") in the scene; you form a frustum from the silhouette edges of the occluder and the eye point, and cull everything inside it. You could set the exterior walls of the house to be occluders. Interior walls could also be occluders, helping cull other rooms when you are inside. The only thing you would have to worry about is making holes for doors and windows.
Separating the indoor and exterior environments is a good idea. You might try implementing occlusion culling. This works similiarly to frustum culling, except you have hidden object called "occluders" (aka "antiportals") in the scene; you form a frustum from the silhouette edges of the occluder and the eye point, and cull everything inside it. You could set the exterior walls of the house to be occluders. Interior walls could also be occluders, helping cull other rooms when you are inside. The only thing you would have to worry about is making holes for doors and windows.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 07 November 2005 - 09:37 AM
Hi Reedbeta!
Thanks for your suggestions - I think I will try the following:
After generating the BSP-Tree I build up lists of connected Vertices. That
means I get a Vertex-list for the couch, a list for the shelf, a list for the TV,
etc... Then I build bounding boxes around each of these. I only generate lists
when the number of connected vertices extend a given threshold (200 for
example).
After this, I will scan the non-BSPed faces for "large" faces - and every face
that extend an area of some value will be taken as an occluder...
So finally I will end up with a list of complex parts of the map having bounding
boxes, and a list of occluders that are then used for checking the visibility of
the boundig boxes...
Sounds promising... I'll try this :)
Thanks again!
Stefan
Thanks for your suggestions - I think I will try the following:
After generating the BSP-Tree I build up lists of connected Vertices. That
means I get a Vertex-list for the couch, a list for the shelf, a list for the TV,
etc... Then I build bounding boxes around each of these. I only generate lists
when the number of connected vertices extend a given threshold (200 for
example).
After this, I will scan the non-BSPed faces for "large" faces - and every face
that extend an area of some value will be taken as an occluder...
So finally I will end up with a list of complex parts of the map having bounding
boxes, and a list of occluders that are then used for checking the visibility of
the boundig boxes...
Sounds promising... I'll try this :)
Thanks again!
Stefan
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












