Code Monkey home page Code Monkey logo

nav3d's Introduction

Nav3D for Unreal Engine

Nav3D banner image

Nav3D is a navigation and cover system plugin for UE4, using Sparse Voxel Octrees to provide pathfinding solutions and associated queries within a full 3D volume. It comprises a number of modular components and does not rely on UE4's other systems, such as Navmesh, AI or Behaviour Trees. This allows you greater flexibility in solving the 3D pathfinding problems for your particular project.

This is a work in progress and part of a wider project I'm working on. For professional projects I'm sure you're already aware of the commercially available SVO solution for UE4, which may better suit your needs. This project was put together as part of my own learning and project development.

Features Overview

  • Nav3D Volume actor - set the size and minimum voxel scale. The software will calculate everything else to achieve the required level of detail.
  • Navigation data can be built from any collision channel (e.g. World Static) within editor and then saved with the level.
  • Nav3D actor component can be added to any actor, providing Blueprints-accessible pathfinding tasks that are executed as asynchronous tasks, away from the main game thread.

Nav3D Blueprints nodes

  • Pathfinding (Greedy A*) supports Manhattan and Euclidean heuristics and includes a path pruning method to remove extraneous path points. In addition you can apply Catmull-Rom smoothing for better-looking paths which don't deviate from their calculated locations.
  • Pathfinding attempts to find the closest accessible locations to the requested start and end points, preventing the majority of pathfinding failures.
  • Nav3D Occlusion component can be added to any actor allowing it to be used as a dynamic obstacle within the navigation system. When the actor moves, its occlusion data is regenerated on the fly and again this is performed asynchronously, away from the game thread.

Occlusion component in action

  • Generate a cover map along with the navigation, which maps the normals of each occluded surface voxel to one of 26 directions, (or if you like math, the faces of a rhombicuboctahedron). This is then used by the Nav3D component in fast async queries, to find the best hiding spots from a single opponent, or from multiple actors.

Cover map generaton

  • Combine the cover system with the Nav3D Occlusion component to provide cover spots on moving actors.

Cover map used with Nav3D Occlusion component

  • Nav3D Modifier Volume can be added to modify the path costs of a given region, for example to create less preferable areas for pathfinding. Modifiers can also invalidate any cover locations, to mark hazardous areas.
  • Extensive debug drawing both in editor and in-game for octree layers, occluded voxels, traversable edges, Morton codes, navigation paths and cover map locations. This is all centralised and run from a single method in the Nav3d Volume.

Nav3D debug drawing with Morton codes

Limitations & Future Work

  • While a Nav3D component will use whatever Nav3D Volume it finds itself within, there is currently no support for travelling between separate volumes, or how the pathfinding will be performed at each end. This is in the development roadmap.
  • The system does not perform any interceptions or trajectory calculations in order to provide pathfinding to moving targets. This is also intended to be implemented in future versions and will likely tie into the Nav3D component owner's movement.
  • The plugin does not take care of any steering or path-following mechanics. It is minimally designed as an environment query and plotting system. Likewise, there is no intention to integrate it with UE4's AI component, EQS or Blackboard (which I personally don't use). Instead I encourage you to integrate it with your own systems and steering behaviours, as required. I'm also working separately on a 3D RVO avoidance plugin and PID controllers for steering and path-following.

nav3d's People

Contributors

darbycostello avatar hurricane86 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.