Aborted Out Of Memory recast.js

Hello :wave:,

package versions I’m using:

  • @babylonjs 7.6.0 for everything
  • recast-detour 1.6.2

I’m currently having a very similar bug as the following issue.

I’ve created a very simple reproducible playground where you can see the issue.

I can see that the issue only occurs when making enough instances.
When the loop (line 84 in the playground) is set to 5 instances the OOM doesn’t occur but when set to 10 or higher it’s consistent on the error.

cc @Cedric

Unfortunately there is not much I can do here. Recast is limited by the browser allocated memory. No other choice than limiting the geometry and resolution with recast.

I was worried that was the case :thinking:.
Do you happen to know any useful information on how to limit the geometry and resolution with recast?
Thanks in advance!

You can have mesh for rendering and different mesh, simplified, for navigation. Or exclude mesh that will have no impact on navmesh computation. Or replace some meshes with convex hull.


Thanks for the help! I’ll look into the things you’ve mentioned.

1 Like