Giter Club home page Giter Club logo

Comments (7)

yelouafi avatar yelouafi commented on May 22, 2024 1

Thanks! Yeah I think I can get good results and also faster gen time with 0.5. Although Iā€™m sticking to solo navmesh right now since I noted some navigation issues with tiles (most likely related to the pruning issue)

from recast-navigation-js.

isaac-mason avatar isaac-mason commented on May 22, 2024

Thanks again for the repros! I'll do some investigation soon and get back to you.

from recast-navigation-js.

isaac-mason avatar isaac-mason commented on May 22, 2024

Both of these issues appear to be memory related.

For this larger model, it looks like the cell size and tile sizes can be increased a fair bit without sacrificing much precision, which would at least mitigate these issues as nav mesh generation would require much less memory.

Digging into the causes though -


Re case 1: the failure here is emscripten reaching it's currently configured max memory limit - 2gb.

Here's a relevant log from a debug build:

Cannot enlarge memory, asked to go up to 2147487744 bytes, but the limit is 2147483648 bytes!

I've got a couple of WIP changes to help with this.

First, I've got a fix that will lower the max memory usage for generateTiledNavMesh and generateTileCache when keepIntermediates is false. Right now tile intermediates for nav mesh generation are only released after processing all tiles or on failure. I'll change this so they are released after processing each tile. You can track that here: #163

Second, I'm adding a "keep intermediates" checkbox to the navmesh generator website that can be unchecked when attempting to generate navmeshes for large models.

I can also look into whether this limit can be raised, but consuming 2gb of memory in a browser is unideal šŸ˜…
I'm also not sure whether the heap can be shrunk, that needs looking into.


Re case 2: after some number of tiles are processed and added to the nav mesh, navMesh.addTile starts failing with an error code for failing to allocate memory.

This one I still need to do some more investigation on. It doesn't look like emscripten's wasm heap is reaching 2gb, so maybe the error is misleading and has a different meaning.

from recast-navigation-js.

isaac-mason avatar isaac-mason commented on May 22, 2024

Also seems the lib isn't recovering, retrying with other params always gives Aborted after the first error.

I'll also look into this šŸ™‚

from recast-navigation-js.

isaac-mason avatar isaac-mason commented on May 22, 2024

Noted! I'm going to spend some time improving the debugging tools (#165), and after this I'll circle back here hopefully better equipped.

from recast-navigation-js.

Samsy avatar Samsy commented on May 22, 2024

Hello there !

Having the exact same issue with the tiling

from recast-navigation-js.

isaac-mason avatar isaac-mason commented on May 22, 2024

Hey @Samsy, if you can share your model and code I'm happy to take a look šŸ™‚

from recast-navigation-js.

Related Issues (20)

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.