Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MadKamote

Why is BSP good for collision detection?

This topic is 5422 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! It''s my first post here in this forum. I''m currently planning to make a 3rd person action/adventure game, and I plan to use ABT construct my levels (i expect each to have a size of 130,000+ triangles). I''m planning to use a lo-res version of the level to be used for collision detection. I originally planned to use BSPs for the original(hi-res) level, but the polygon splitting made my level messy, and also the number of polygons in the level went even higher. Anyways, my real problem is to whether to also use ABTs to construct the lo-res level, or to use BSPs instead (for collision detection purposes). I keep on hearing that BSPs are pretty good for this, although i''m not completely convinced. Why is BSP good for collision detection? (aside from the fact that you don''t have to check a point against a polygon in a BSP leaf, since you''re assured that they''re all facing at a point inside the leaf.) Any replies would be greatly appreciated. Thank you very much! Add''l question: since i don''t use BSP, I can''t perform Automatic Portal Generation. I''m not familiar with Occlusion Culling techniques, although I am very curious. Would they be a good alternative to using portals? If so, can anyone lead me to tutorials/documentations regarding these techniques? Again, thank you very much.

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by MadKamote
I originally planned to use BSPs for the original(hi-res) level, but the polygon splitting made my level messy, and also the number of polygons in the level went even higher.

You don''t have to split the actual polys in a bsp, you can just use the planes and point back to the original polys. Splitting is only if you want perfect back to front rendering, instead you can just let the zbuffer do its job.

quote:
Why is BSP good for collision detection?

Like any tree structure, you quicky narrow down your search to just those planes that you''re interested in. But unlike things like Octtrees all the detail in the tree goes where its needed, at the cost of making it much more static. You have to figure out how likely it is that vast parts of your levels will be dynamic.

quote:
I''m not familiar with Occlusion Culling techniques, although I am very curious. Would they be a good alternative to using portals? If so, can anyone lead me to tutorials/documentations regarding these techniques? Again, thank you very much.

Depends what kind of levels you''re wanting. If you''ve got big outdoor ones it might just be best to do frustum culling and some LOD. If you''ve got indoor levels with lots of occulsion you could always have portals and sectors placed manually. More tricky methods like HOM exist but they''re very complicated and you might not see any difference in speed.



[S-Type] [V-Script]

Share this post


Link to post
Share on other sites
quote:
Original post by OrangyTang
Like any tree structure, you quicky narrow down your search to just those planes that you''re interested in. But unlike things like Octtrees all the detail in the tree goes where its needed, at the cost of making it much more static. You have to figure out how likely it is that vast parts of your levels will be dynamic.



The levels would largely be dynamic, so i guess i''ll stick with ABT. (But if it wasn''t, then that would''ve been a good reason for me to go with BSP. Thanks!)

quote:
Depends what kind of levels you''re wanting. If you''ve got big outdoor ones it might just be best to do frustum culling and some LOD. If you''ve got indoor levels with lots of occulsion you could always have portals and sectors placed manually. More tricky methods like HOM exist but they''re very complicated and you might not see any difference in speed.


I was actually hoping to make some ''automatic'' ways to do cullings but i guess i was wasting too much time for it that i forgot that i can do things manually. hehe. Thanks for reminding me. The levels are a mix of indoor and outdoor scenes, so I guess I would mix frustums, LOD''s, and manually placed sectors/portals. Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi

"You don''t have to split the actual polys in a bsp, you can just use the planes and point back to the original polys"

I don t understand that? Could you explain a bit in more detail? I would like to get infos about Not splitting polys for bsp leaves

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
anyone?

Share this post


Link to post
Share on other sites
Add the full polygon to both the front and back nodes rather than splitting it and adding each part to its respective side.

-=[ Megahertz ]=-

Share this post


Link to post
Share on other sites
You can use your ABT for collision detection just as well. I am using an AABBTree myself ( similar to ABT ) for collision detection & raycasting & it works great.

Each leaf in the AABB tree holds 4-10 triangles.

I use raycasts and swept-sphere code to test for collisions.

Share this post


Link to post
Share on other sites
quote:
Original post by SimmerD
You can use your ABT for collision detection just as well. I am using an AABBTree myself ( similar to ABT ) for collision detection & raycasting & it works great.

Each leaf in the AABB tree holds 4-10 triangles.

I use raycasts and swept-sphere code to test for collisions.




Raycasts and swept-sphere seemed new to my ears (I was using Kasper Fauerby''s collision detection algo). Do you have a link for docs about those collision stuffs you mentioned? If not, a brief description will do. please?

Share this post


Link to post
Share on other sites
The swept-sphere code I use is from :

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-TriSphereCollision&forum=cotd&id=-1  


It's pretty much the same as Kasper's technique.

A raycast is simply taking a ray or linesegment, and recursively testing it vs a AA Bounding Box.

I use the technique described here :

 www.cs.utah.edu/~rmorley/pubs/box.pdf 


[edited by - SimmerD on February 9, 2004 11:32:30 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by SimmerD
The swept-sphere code I use is from :

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-TriSphereCollision&forum=cotd&id=-1   


It''s pretty much the same as Kasper''s technique.

A raycast is simply taking a ray or linesegment, and recursively testing it vs a AA Bounding Box.

I use the technique described here :

 www.cs.utah.edu/~rmorley/pubs/box.pdf  


[edited by - SimmerD on February 9, 2004 11:32:30 AM]


Thanks!!!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!