Questions tagged [bsp-tree]

Binary Space Partitioning (BSP) trees are the tree data structures that contain recursively subdivided spaces; they are used mostly for processing 3D graphics, but also have some more obscure uses such as RPG dungeon generation.

More info can be found on the "Binary space partitioning" article on Wikipedia.

This tag was created because the current BSP tag stands for 'Board Support Package' all 'bsp' questions about Binary Space Partitioning (trees) are in effect wrongly tagged.

22 questions
5
votes
1 answer

Am I rendering BSP trees incorrectly?

I have a BSP tree loaded into memory. I first find out what leaf I am in. Next, I decode the PVS. Then, I run through each region in that PVS and see if it lies within my frustum. I have been told that this is the incorrect way to render and that I…
4
votes
3 answers

How do I test if a given BSP tree is optimal?

I have a polygon soup of triangles that I would like to construct a BSP tree for. My current program simply constructs a BSP tree by inserting a random triangle from the model one at a time until all the triangles are consumed, then it checks the…
Martin
  • 5,945
  • 7
  • 50
  • 77
4
votes
1 answer

Does anyone have a BSP example?

Does anyone have an example of using BSP trees in ThreeJS that they could share or know about? I am looking at creating a terrain splatting example and would like to use a BSP (or perhaps octree...?) to help speed up the rendering.
Mat
  • 961
  • 12
  • 28
3
votes
1 answer

Will BSP trees work on single, transparent objects?

I've been trying to implement a three dimensional BSP tree to render single objects (a cube, a box with a cylinder in it, etc.) which are transparent. As far as I understand, this should work, but it is not, and I can't figure out why. Everything…
Fish
  • 85
  • 1
  • 6
3
votes
1 answer

Generating BSP tree from raw data

I know how to utilize a prebuilt BSP tree with old 3d levels like Quake and so and have even written a level renderer. Now, I am moving onto the next step which is actually building that BSP tree myself. I know the process behind it but I was…
Satchmo Brown
  • 1,409
  • 2
  • 20
  • 47
3
votes
1 answer

Binary Space Partitioning - Error in space partitioning logic

So I've been implementing my first BSP Tree, and I think I found a flaw in my logic. I'm pretty lost as to how I could actually refactor this properly to work the way it should. Here's the constructor (an explanation follows): BSPTree::BSPTree(…
zeboidlund
  • 9,731
  • 31
  • 118
  • 180
2
votes
1 answer

How can I merge 2 bsp trees?

I am in work of implementing csg objects with bsp trees. For this purpose I need to merge 2 bsp trees and work with them, but I don't quite understand how to implement this merging. I know how to insert new polygons into bsp tree. But what could be…
Zhukov Artem
  • 331
  • 1
  • 2
  • 12
2
votes
1 answer

Tree building function from precalculated tree

I am building a binary tree. The binary tree is pre-built in a file and I need to construct it. Due to the way it is structured, I read the tree into an array. Each tree nodes look something like this. struct Tree_Node { float normalX; float…
Dan Wilbur
  • 23
  • 2
2
votes
1 answer

How can the equation for a line in 2d space be represented as an array of three values?

I am trying to understand the following function from theparticle Supposedly, the function determines the equation of a line which is represented as an array of the coordinates for two points that lie on the line: [x1, y1, x2, y2]. The function that…
Byrd
  • 27
  • 3
2
votes
1 answer

polygons from BSP

I have a 3d volume given by a binary space partition tree. Usually these are made from polygon models, and the splitted polygons already stored inside the tree nodes. But mine is not, so I have no polygons. Every node has nothing but it's cut plane…
dronus
  • 10,774
  • 8
  • 54
  • 80
1
vote
1 answer

Rendering from a prebuilt BSP tree?

Hey guys. I am loading into memory a prebuilt BSP tree and I am very confused. It is being used in a first person exploring program. How does you recommend I use a BSP tree that is already made. I know I traverse the tree but what do I look…
1
vote
2 answers

3D BSP tree links?

The internet is filled with information on BSP trees in 2 dimensions (i.e. raycasting, all walls are parallel). Does anyone have any links or know of a book that discusses BSP trees in 3 dimensions?
oldSkool
  • 1,212
  • 5
  • 14
  • 29
1
vote
1 answer

Generate every combination of objects (without duplicate) in a BSP Tree

I am making a collision detection system using a Binary Space Partitioning Tree. I have two kinds of objects : Dynamic objects (characters, projectiles) whose collisions with other objects need to be checked, Static objects (like walls) which are…
Paphos
  • 123
  • 5
1
vote
1 answer

How to render a BSP Tree without splitting

I have a BSP tree for depth sorting in an isometric game (I've tried countless other methods) it's seems to be close, but in my game I cannot split the assets. So, items that intercept the current plane, I simply add them to both the "behind" and…
ICanChange
  • 110
  • 7
0
votes
1 answer

BSP tree traversal in relation to position?

This is more of a conceptual question than a coding question. I have figured out the basic concepts of a BSP tree but am having trouble wrapping my head around the positioning. I have figured out that to find my current location in the BSP tree, I…
Pladnius Brooks
  • 1,248
  • 3
  • 19
  • 36
1
2