Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Request: save/set nav tile

Discussion in 'Navigation' started by joshcamas, Jul 11, 2018.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    321
    One incredibly useful feature would be able to essentially "set" a tile of a specific tile. (And of course grab a tile as well). This is incredibly important for large open worlds... I've currently navmeshed my large world, and the result is as expected... massive framerate drops.That makes sense! Large open worlds can't have just one massive navmesh loaded into memory at once.

    Since my world is static, rebuilding a local navmesh is simply unneeded, and adds around 60 seconds to my 6 second loading screen.

    Allowing the ability to load/save tiles is essential in my mind... it also would finally allow for the modification of navmesh data, instead of it being a "black box". Turning it into a mesh isn't much help, since there is no way to convert the mesh back into a navmesh.

    Thoughts?

    Josh
     
    Last edited: Jul 11, 2018
  2. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    1,780
    The challenge here is that it's going to take a significant chunk of work on Unity's side to start exposing more granular options for saving and loading data. I hope they put it on the roadmap as it really is the last piece in the entire navmesh puzzle that kind of sucks with no good solutions.

    This post on the recast google group gives some insight into how recast itself looks at this problem:
    https://groups.google.com/forum/#!topic/recastnavigation/xfRkVPS9AZk

    This is why Unity's NavmeshData doesn't act like other assets, it's just a wrapper around the binary recastnavigation data. Unity hasn't serialized it into it's own data format.

    If Unity ever does this and provides another layer of abstraction around the C++ side, we would then be able to load/save individual tiles and stitch them in at runtime. Which would allow for handling large and/or dynamic worlds better.

    It also might be the case that they are simply writing back the entire navmesh after rebuilding say a single tile in some non performant way. Because I know how long it takes to add a tile to an existing navmesh using recastnav directly, and it's nothing close to what it takes Unity when you rebuild with just a single tile that has changes.
     
    joshcamas likes this.
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    321
    I sadly agree, this is really up to Unity to decide this is important enough. Since a tiny minority want this feature, I'm going to guess it will be quite a while, I'm afraid :'(

    But the NavmeshData being a wrapper makes complete sense, that opens my eyes a bit to whats going on behind the hood.