**0**

# Binary space partitioning

Started by Nov 17 2011 12:09 PM

,
4 replies to this topic

###
#1
Members - Reputation: **109**

Posted 17 November 2011 - 12:09 PM

Hello ,

I have been reading Real Time Collision Detection to understand the various concepts related to collision detection in games.

And I am having some problem understanding Binary Space Partitioning .

I am failing to understand what does "polygon" represent here when you say divide the polygon if it the selected dividing plane intersects it.

Is it the Polygons that make the model or the Polygons of the Convex hull of the model ??

For example , if there is a cube exactly in the center of the room and i select a dividing plane along the diagonal of the room . It will intersect the cube as well along the diagonal or maybe into two halves depending on its orientation . So , need i divide my cube in to two separate models(or create two modelmesh for the cube model each mesh storing the two halves of cubes) or just the convex hull of the cube ??

I assume in case of a solid leaf BSP for collision queries , Convex hull will do the job . However , what about Node -Storing BSP for rendering or Leaf-Storing BSP??

Incase we need to divide the polygons of the model itself , Could someone please direct me to some article explaining the same. Also if there is any support for model partitioning in XNA ?

Ty

Nish26

I have been reading Real Time Collision Detection to understand the various concepts related to collision detection in games.

And I am having some problem understanding Binary Space Partitioning .

I am failing to understand what does "polygon" represent here when you say divide the polygon if it the selected dividing plane intersects it.

Is it the Polygons that make the model or the Polygons of the Convex hull of the model ??

For example , if there is a cube exactly in the center of the room and i select a dividing plane along the diagonal of the room . It will intersect the cube as well along the diagonal or maybe into two halves depending on its orientation . So , need i divide my cube in to two separate models(or create two modelmesh for the cube model each mesh storing the two halves of cubes) or just the convex hull of the cube ??

I assume in case of a solid leaf BSP for collision queries , Convex hull will do the job . However , what about Node -Storing BSP for rendering or Leaf-Storing BSP??

Incase we need to divide the polygons of the model itself , Could someone please direct me to some article explaining the same. Also if there is any support for model partitioning in XNA ?

Ty

Nish26

###
#2
Members - Reputation: **1943**

Posted 17 November 2011 - 01:11 PM

This is probably for ray tracing. You split the world in half, some triangles are on the left side, some on the right. Some triangles are actually being cut like a knife. You cut them into 2 pieces, one piece goes left, one goes right.

Follow my RTS game ICBM

https://twitter.com/dpadam450

http://www.gamedev.net/blog/2202-dpadam450s-journal/

###
#3
Members - Reputation: **109**

Posted 17 November 2011 - 11:21 PM

I understand that i have to store the polygons in the positive and negative halfspaces of the dividing plane and split the polygon being intersected by dividing plane . What i am failing to understand is which polygons??

Polygons that make the model or Polygons from the convex hull or Bounding Volume of the model ? What will be my input ?? Polygon soup or Model Vertices + Indices (and i will construct triangles and then split them)??

And how do i store them once i recognize the polygons in negative and positve halfspaces?? Do i create two new models and store the polygons belonging to opp halfspaces in one model each? Also if that is the case how can i partition a model in XNA ?

Polygons that make the model or Polygons from the convex hull or Bounding Volume of the model ? What will be my input ?? Polygon soup or Model Vertices + Indices (and i will construct triangles and then split them)??

And how do i store them once i recognize the polygons in negative and positve halfspaces?? Do i create two new models and store the polygons belonging to opp halfspaces in one model each? Also if that is the case how can i partition a model in XNA ?

###
#4
Moderators - Reputation: **48717**

Posted 17 November 2011 - 11:29 PM

What are you using the BSP for? You mention that you're reading Real Time Collision Detection, so I would guess that you're using a BSP to accelerate collision detection routines... if so, then you want to split the hulls of the objects.

If you were using a BSP to accelerate rendering of triangle meshes, then you would split the actual renderable triangles.

If you were using a BSP to accelerate rendering of triangle meshes, then you would split the actual renderable triangles.