Questions tagged [octree]

An octree is a tree data structure in which each node has eight child nodes. A major application of octrees is in 3d graphics as they are the primary structure used for storing voxel (volumetric pixel) data.

Wikipedia: "An octree is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a three dimensional space by recursively subdividing it into eight octants. Octrees are the three-dimensional analog of quadtrees."

Relevant topics include voxels and color quantization.
For more information see http://en.wikipedia.org/wiki/Octree

148 questions
4
votes
1 answer

How to find adjacent / neighbor cubes using octree datastructure?

I have created a boundary octree for a closed surface. All the octree cubes that contain the surface are divided up to the same level. So all the leaf nodes are of the same size. I need help in finding out the neighbors for each of these terminal…
frodo baggins
  • 41
  • 1
  • 3
4
votes
1 answer

Python3. Octree implementation engages a lot of memory. How to optimize?

I develop game server and want to keep real-time objects positions on the maps. For this purpose I'm using octree algorithm. But for now my implementation engages a lot of RAM, for test I tried to populate several maps and even without objects…
Sergio Ivanuzzo
  • 1,820
  • 4
  • 29
  • 59
4
votes
2 answers

Large 3D scene streaming

I'm working on a 3D engine suitable for very large scene display. Appart of the rendering itself (frustum culling, occlusion culling, etc.), I'm wondering what is the best solution for scene management. Data is given as a huge list of 3D meshs, with…
ingham
  • 1,636
  • 15
  • 30
4
votes
4 answers

Efficiently identifying connected cells\voxels

I'm trying to identify the most efficient way to test if two cells\voxels are connected. I'll discuss the issue in 2 dimensions for simplicity and consider the cells in the diagram... Now I'll just confine the problem to the vertical axis, call it…
AlexS
  • 510
  • 2
  • 7
  • 23
4
votes
1 answer

How to implement an octree in C#?

First time posting here but I've been reading the site for a few years now. I'm trying to implement a simple generic type Octree in C# (using some XNA includes). I've thoroughly researched and I understand the concept, I just can't seem to make it…
user1927218
  • 41
  • 1
  • 2
4
votes
1 answer

C++ Octree Container

I've searched all over the web for an explanation of how an Octree Container works. I can not find any clear cut explanations of how one works. (atleast, that make sense to me...) Does anyone know how to implement an Octree Container? One that has…
User
  • 659
  • 2
  • 12
  • 29
3
votes
1 answer

Storing triangles with shared edge in Octrees

I am trying to load an STL mesh file and store its triangles an in octree data structures for some scientific analysis (not for gaming). as shown in the image, Triangle 1 is stored in octree nodes NE, SE, SW and NW while triangle 2 is stored in…
Arash
  • 141
  • 10
3
votes
2 answers

How to construct an octree in C++

I am implementing an Octree in C++ which should later contain a mesh for rendering. But at the moment I am struggeling with the construction of the Octree. To be more precisely it is the addNode() function which causes problems. I thought of a…
00Jan00
  • 117
  • 1
  • 12
3
votes
1 answer

Octree neighbour search

I have an octree, that stores a voxel-based fluid. When I simulate the fluid, I need to access the leaves around the current node, how can I implement such a search? You can assume the node stores a pointer to its parent node.(Perhaps other data is…
akaltar
  • 1,002
  • 1
  • 19
  • 25
3
votes
3 answers

find set bits positions in a byte

I was tyring to create a sparse octree implementation like the people at nVidia ("Efficient Sparse Voxel Octrees") were doing for their voxel things when I came across this issue: I have a bitfield of type byte (so 8 bits only) that tells me where…
HaMster
  • 533
  • 1
  • 6
  • 17
3
votes
2 answers

How send recursive data structure to OpenGL shader?

how can I send recursive data structure, like octree, to OpenGL GLSL shader? I think, I can send it as array of nodes and use indexes instead of pointers, is it a good idea? Are there other options to do it?
Nyan Cat
  • 303
  • 1
  • 5
  • 14
3
votes
1 answer

Dynamic hashmap for octree

Is there memory AND speed efficient way to store unique key:value pairs dynamically in hash map? Keys are guaranteed to be unique but the amount of them is changing frequently. Insertion and deletion has to be fast. What I've done is octree (not…
pks
  • 51
  • 6
3
votes
1 answer

How to iterating a Quad/Oct tree

I am having a difficult time grasping how to iterate an octree or quad. And it may be because I am not experienced with different mythologies of iterating. But let’s suppose that I produced a quad tree that holds float x,y,z; dword color. Now,…
User
  • 659
  • 2
  • 12
  • 29
2
votes
0 answers

How to best create an Octree/BVH in GPU memory without pointers?

I've been working on a GPU-based boid simulation recently. I've spent most of my time trying to get the underlying sorting system working, in an attempt to avoid having each boid check every other boid—I'm ideally looking for this algorithm to end…
2
votes
2 answers

How can I determine quickly how many points of given set does a sphere contains?

Given a set of points in a form of (x, y, z), and a set of spheres in a form of (x, y, z, radius). The goal is, for each sphere, to count the number of points within the sphere. I compared the Euclidean distance of the center of the sphere and the…
장지훈
  • 21
  • 1
1
2
3
9 10