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
0
votes
0 answers

Getting PCL Header when decoding with OctreePointCloudCompression

I'm using a simple encode and decode application for sending point cloud data as a stream using TCP. My issue can actually be reproduced just using the code from the following link: https://pcl.readthedocs.io/en/latest/compression.html Before…
notARobot
  • 61
  • 7
0
votes
1 answer

Point Cloud Library Octree lib generating error

I get this error just by including the header file to my code. I'm using visual studio 2019 and c++17, I've included the linker files and all but it doesn't want to work. What could it be? Error C4996 …
0
votes
1 answer

When i need to to stop dividing octants in Octree?

I'm implementing octree data structure. In octants i store triangles. So question: When i need to to stop dividing octants in Octree? I think about max depth or number of max number of triangles in octant, but how i can calculate this values?
0
votes
0 answers

Finding closest triangle from a point using octree

I have a list of triangles in 3D space and a point described with (x,y,z) coordinates. I am writing a method for returning the closest triangle to that point. The naive implementation I wrote initially was to loop through all the triangles, check…
0
votes
1 answer

How to properly assign indexes when transforming octree into array?

I'm attempting to flatten an octree into an array so that I can pass it to the GPU. I want to get the data from my octree, load it into a vector of Voxel structs and then send that over to the GPU. I'm inserting 2 voxels into the octree at the…
0x003
  • 65
  • 9
0
votes
0 answers

How to reset PCL OctreePointCloudChangeDetector secondary buffer/structure completly?

I want to subtract a background pointcloud from my current pointcloud in a ROS nodelet to filter moving objects. My Pointcloud2 subscriber has different steps: accumulate some pointclouds to add noisy areas to the octree load the accumulated…
fehlfarbe
  • 1
  • 3
0
votes
1 answer

Borrow and assign to values behind & reference

So I am trying to make my own octree in Rust, but I'm having trouble with my set function. It's supposed to be recursive, and there is a point where I am matching the child node. Except, it has two errors: It can't borrow a child as mutable,…
0
votes
1 answer

Parallel octree construction on the CPU

I did a simple implementation of an octree. Now I'm trying to make the construction of the tree parallel on the CPU. First I tried to make the step of adding points to the children of the tree parallel (being the most costly step in the…
0
votes
0 answers

How to sort overlapping octree positions

So I have a sorting problem. What I want to do is construct an octree around the camera position, copy the leaf node data to a temporary container, then reset the octree and enter a new camera position. After this, check if any of the new node…
0
votes
0 answers

OcTree method in Matlab

I'm working on a Color Quantization Project in Matlab. I want to add the OcTree mehtod. I have tried with this code I found in Wikipedia: https://en.wikipedia.org/wiki/Octree but it is not working and I do not know why. % Read the original RGB…
Luna
  • 1
  • 1
0
votes
1 answer

Octree with 3d array like interface

I want to use octree to save space, because I have a bunch of 3d arrays with a lot of same data (voxel chunks where blocks just uint16). I've seen implementations of octrees for ray traversal or space partitioning but all of them contain octree…
0
votes
1 answer

BFS to DFS octree conversion in python

I'm working with an octree that has been built by third party software. This software reports how to traverse the tree in a breadth first manner, but I want to traverse the tree in a depth first manner. For my application (building a grid out of…
nop.bot
  • 11
  • 1
0
votes
1 answer

semless mesh based on voxels in Octree for LOD

Octree to hold voxels lod levels, single Octant has 16x16x16 voxels. Need to get neighbor voxels for Octant on all 6 faces (neighbor must not have childs) to create correct mesh borders for seamless mesh. Face can have several neighbors or part of…
Jackalope
  • 93
  • 7
0
votes
0 answers

Storing data in an octree node

I am trying to recursively construct an octree in C# as part of implementing Dual Contouring (https://www.cse.wustl.edu/~taoju/research/dualContour.pdf). The algorithm suggests using three types of octree nodes as some data is only relevant to a…
0
votes
0 answers

How can I improve my implementation of the well-separated pair decomposition

I was trying to implement the algorithm of the 3D well-separated pair decomposition WSPD using an octree. First, I begin by implementing the class OctreeNode as following public class OctreeNode { public static final int BSW = 0; public static…
Kroki
  • 101
  • 2