Skip to main content
GameDev.net gamedev.net
🔒 Locked

BSP leaf question

Started by shadow12345 Apr 21, 2003 at 6:20 PM 6 replies 350+ views
Original Post
shadow12345
shadow12345
When determining if polygons are visible, do you 1)determine what leafs are potentially visible from the current sector, then test each polygon in the potentially visible leafs against the frustum and only render those polygons that are visible or 2)determine what leafs are potentially visible from the current sector, then test each leaf against the frustum and render the entire leaf (even if only a part of it is inside the frustum). From what I understand each leaf has a bounding box that can be tested against the frustum? [edited by - Shadow12345 on April 21, 2003 7:24:39 PM]
Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
Basiror
Basiror
if you are using portals you can test these portals if they aren t hidden by another one then render the leaf and check the other portals of this leaf ..... recursive

i assume you know how to build leafs
http://www.8ung.at/basiror/theironcross.html
shadow12345
shadow12345
I don''t think you answered my question. Let''s say the camera is in leaf A, and from leaf A leafs B, D and E are potentially visible (there are portals from A into those sectors). When rendering, do I test to see if the other leaf''s bounding boxes are in the frustum, and then if it is in the frustum test each polygon to see if it is in the frustum. Or do I just test to see if the leaf''s bounding box is in the frustum and then render every polygon without making sure it is in the frustum.

Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
Basiror
Basiror
check if the portal polygon is in your frustrum and then check your portal if it is visible render the leaf it belongs to otherwise skip it
sounds logic doesn t it?
http://www.8ung.at/basiror/theironcross.html
shadow12345
shadow12345
If the portal is visible, and the subsequent leaf is visible, do you render the entire leaf automatically or do you test every polygon in that leaf against the frustum and only render the visible polygons of the visible leaf.

Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
Mihail121
Mihail121
checking each polygon agains the frustum will be FPS killer!It will even be more slower than rendering everything with 5 passes.So just render the hole leaf if it''s in the frustum ofcourse.A way to do extra culling do check if geometry is already rendered by another leaf and skip it.That''s my advice.Take care!

The PAIN is coming...this summer!!!In cinemas everywhere.
Basiror
Basiror
why do you think there are portal polygons
they are there to prevent per polygon testing

also leafs may be merge due to size sparing
imagine a leafs contains only 3 triangles and has 8 neightbours with 3 triangles and each of there leafs has portals

if that s the case you can render the entire scene without vis testing which might be even faster
http://www.8ung.at/basiror/theironcross.html
shadow12345
shadow12345
That''s what I wanted to know, thanks you guys.
Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.