Advertisement

Builiding the Sparese Voxel Octree

Started by March 25, 2023 07:54 AM
5 comments, last by astutejoe 1 year, 8 months ago

Hello everybody. I have a quick question. I was reading the GameAIPro 3 "3D Flight Navigation Using Sparse Voxel Octrees" (http://www.gameaipro.com/GameAIPro3/GameAIPro3_Chapter21_3D_Flight_Navigation_Using_Sparse_Voxel_Octrees.pdf) I understood the layout of the octree and leaf nodes in the memory but Im struggling to understand what "rasterize the collision geometry at a low resolution" means. Is hard to find anything on google that's not rasterizing the rendering geometry. "The first step is to determine how many leaf nodes are required. To do this, rasterize the collision geometry at a low resolution. If the final resolution is 2 m per voxel, then the leaf nodes in the SVO will be 4 × 2 = 8 m cubes." What "m" means in this case? Do I just rasterize the primitives used for collision? If so what 2m per voxel means? Thank you.

I had the exact same questions. m probably stands for meters, so far I think rasterizing means building a grid of voxels? Easier said than done lol. It Feels odd it's only one extremely vague phrase describing what to do, so I'm currently just scouring the internet for existing implementations to figure out how it's done. So far I found this:
https://github.com/leonzheng2/INF584-High_Resolution_Sparse_Voxel_DAGs

Advertisement

Thanks for sharing that. Im taking things a bit slower actually because Im not that good to understand that code yet. So far Im using a library to encode/decode morton codes that basically are the coordinates packed in a 64bits int.

I just filled a chunk of memory with int numbers from 0 to 7. When I decode each individual int to 3 coordinates (x,y,z) they are the curves that build a cube. So far so good but I need a cube for every node,leaf or just one point that will indicate a corner ? So its the root just a single coordinate and then the next level are 4 points that creates 4 “cubes” for partitioning?

Thank you

I progressed a bit, and it seems that “rasterise” here does mean generating a voxel everywhere there's geometry. This GitHub has an implementation that could be useful to understand the process:
https://github.com/Forceflow/ooc_svo_builder

Before I forget, this plugin has it really implemented it too, and with navigation. You can peep the documentation at least, or buy the plugin if you're really curious:
https://blendersleuth.github.io/FlyingNavSystemSite/usage.html

Just found this bad boy too, very simple and straightforward:
https://github.com/midgen/uesvon

This topic is closed to new replies.

Advertisement