# SVO Navigation in UE4

**URL:** <https://forums.unrealengine.com/t/svo-navigation-in-ue4/250788>\
**Category:** AI\
**Tags:** General, unreal-engine\
**Created:** [September 14, 2021, 11:23pm UTC](https://forums.unrealengine.com/t/svo-navigation-in-ue4/250788 "2021-09-14T23:23:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4f973aae](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4f973aae](https://forums.unrealengine.com/u/anonymous_user_4f973aae)\
**Post date:** [September 14, 2021, 11:23pm UTC](https://forums.unrealengine.com/t/svo-navigation-in-ue4/250788/1 "2021-09-14T23:23:52Z")

</div>

Hello,

For a game I am developing I was looking into 3D Navigation for pawns. After some research I decided to try it by myself - in theory it does not look too difficult to have a basic version. My game will not have very complex navigation requirements, the environment is basically rather large voxels, and the navigation area is not really big.

Originally I thought using the data structure from UE4 to build the navigation mesh. Anyhow, after working with it for a couple of days now I am actually wondering if this is the best approach.

Basically what I am trying to achieve is an SVO with some simple greedy A\* algorithm. With I have no a couple of problems:

**1. How to identify leaf nodes with an TOctree2**  
Based on documentation and looking at engine code, it does not look like the expose a way to find leaf nodes easily. You can iterate through nodes with a predicate (problem is a leaf is not a node I think) or you can iterate through elements (a leaf node would not have elements since it is representing empty space)  
I am pretty sure there is maybe a way but I havent found it yet. If anybody has an idea would be nice.

_2. Neighbors finding (obviously important for A)_\*  
SVO contains neighbor connectivity information and not only parent-child information. Not sure if this is easily done in TOctree2

Basiclly I am starting to think instead of going with UE’s TOctree2, it is more feasible to work on an own SVO implementation. Similar to this project for example:

And yes I could just use this one or any other implementation. Figuring out how to do it is the main fun part for me, this why I try not to use any plugins. Yes, I am re-inventing the wheel but I enjoy it.

Anybody has some experience on that? Is this possible with Octree2 or do you need an own SVO for that?

Best

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4f973aae](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4f973aae](https://forums.unrealengine.com/u/anonymous_user_4f973aae)\
**Post date:** [September 14, 2021, 11:29pm UTC](https://forums.unrealengine.com/t/svo-navigation-in-ue4/250788/2 "2021-09-14T23:29:04Z")

</div>

Also found this one:

> [@3D Navigation Plugin](https://forums.unrealengine.com/t/3d-navigation-plugin/112703):
>
> Another plugin! After watching Daniel Brewer’s GDC talk on SVO navigation, I thought I’d give it a go…so what we have here is basically a straight UnrealEngine implementation of what is described in this talk : [https://www.gdcvault.com/play/102201…esh-Navigating](https://www.gdcvault.com/play/1022016/Getting-off-the-NavMesh-Navigating) Code is here ( Contributions are extremely welcome and will be credited) : Demo : [[UESVON - Sparse Voxel Octree Navigation for UnrealEngine] ](https://www.youtube.com/watch?v=84AFdg0ykwY) Documentation:

It looks everyone trying to do something similar is going with their own SVO type.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4f973aae](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4f973aae](https://forums.unrealengine.com/u/anonymous_user_4f973aae)\
**Post date:** [September 15, 2021, 6:00am UTC](https://forums.unrealengine.com/t/svo-navigation-in-ue4/250788/3 "2021-09-15T06:00:10Z")

</div>

For the ones interested - I ended up to do kind of a combination. I use Octree to generate the tree with blocking elements. Then I traverse through the tree to identify places were no nodes exists. The unique static traits of an octree makes that rather easy. Then I store these identified empty spaces in a new data structure which also contains its neighbor relations. Suprisingly runs quite performant - I guess for my use-case this is good enough.
