Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase recast option EXPECTED_LAYERS_PER_TILE #2947

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sweet235
Copy link
Contributor

@sweet235 sweet235 commented Mar 6, 2024

Fix #2926.

It seems we set an upper bound of tiles for recast. It depends on EXPECTED_LAYERS_PER_TILE, in nav.cpp, we use this number to set something called tcparams.maxTiles.

I had to increase the number to as much as 12, in order to create complete navmeshes for map-cube.

@DolceTriade
Copy link
Member

What impact does this have on other maps? Any difference in time or memory?

@sweet235
Copy link
Contributor Author

sweet235 commented Mar 6, 2024

What impact does this have on other maps? Any difference in time or memory?

I think not. But who can tell for sure. I'll regen all my navmeshes using this, and report back.

@slipher
Copy link
Contributor

slipher commented Mar 7, 2024

Apparently increasing the limit on tiles decreases the limit on some other thing? From NavmeshGenerator::WriteFile()

// there are 22 bits to store a tile and its polys
int tileBits = rcMin( ( int ) dtIlog2( dtNextPow2( d_->tcparams.maxTiles ) ), 14 );
int polyBits = 22 - tileBits;

Maybe this is a good thing to investigate for why part of the navmesh disappears in large maps

@sweet235
Copy link
Contributor Author

sweet235 commented Apr 20, 2024

By trying this, I did not spot any problems yet.

@sweet235
Copy link
Contributor Author

sweet235 commented Apr 25, 2024

This is not the solution. Some big maps still do not get complete navmeshes using this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

My map voxelstorm11 has incomplete navmeshes for small classes
3 participants