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

Navigational mesh - analyze cells to check for computational shortcuts #5031

Merged
merged 1 commit into from
Jun 10, 2023

Conversation

Garanas
Copy link
Member

@Garanas Garanas commented Jun 10, 2023

We now collect information while we pre-analyze a cell. This allows us to make better decisions to just flatten a cell. As an example: there is no need to analyze a cell for land capabilities when it entirely consists of water. This saves roughly 5% to 10% on the computation time. It has less of an impact on larger maps as the dominant factor on larger maps is the raw quantity of heightmap samples.

Old situation:

Alpha Quarantine:
DEBUG: NavGenerator - culled 424 labels
DEBUG: Generated navigational mesh in 5.720215 seconds
DEBUG: Allocated megabytes for navigational mesh: 24.007584
DEBUG: Allocated megabytes for labels: 0.198051

Seton's Clutch - FAF version:
DEBUG: NavGenerator - culled 197 labels
DEBUG: Generated navigational mesh in 2.016846 seconds
DEBUG: Allocated megabytes for navigational mesh: 15.915611
DEBUG: Allocated megabytes for labels: 0.141205

Open Palms - FAF version:
DEBUG: NavGenerator - culled 102 labels
DEBUG: Hover grid equals land grid - ditching hover grid
DEBUG: Amphibious grid equals land grid - ditching amphibious grid
DEBUG: Generated navigational mesh in 1.137451 seconds
DEBUG: Allocated megabytes for navigational mesh: 4.909599
DEBUG: Allocated megabytes for labels: 0.080338

New situation:

Alpha Quarantine:
DEBUG: NavGenerator - Flattened 374 sections
DEBUG: NavGenerator - culled 424 labels
DEBUG: Generated navigational mesh in 5.545898 seconds
DEBUG: Allocated megabytes for navigational mesh: 24.007584
DEBUG: Allocated megabytes for labels: 0.198051

Seton's Clutch - FAF version:
DEBUG: NavGenerator - Flattened 414 sections
DEBUG: NavGenerator - culled 197 labels
DEBUG: Generated navigational mesh in 1.924316 seconds
DEBUG: Allocated megabytes for navigational mesh: 15.915611
DEBUG: Allocated megabytes for labels: 0.141205

Open Palms - FAF version:
DEBUG: NavGenerator - Flattened 908 sections
DEBUG: NavGenerator - culled 102 labels
DEBUG: Hover grid equals land grid - ditching hover grid
DEBUG: Amphibious grid equals land grid - ditching amphibious grid
DEBUG: Generated navigational mesh in 1.056396 seconds
DEBUG: Allocated megabytes for navigational mesh: 4.909599
DEBUG: Allocated megabytes for labels: 0.080338

@Garanas Garanas added area: AI related to AI functions area: nav-mesh related to navigational mesh labels Jun 10, 2023
@Garanas Garanas added this to the Development iteration II milestone Jun 10, 2023
@Garanas Garanas changed the title Improve the performance of the navigational mesh Further improve the performance of the navigational mesh Jun 10, 2023
@Garanas Garanas merged commit 02fa5fd into deploy/fafdevelop Jun 10, 2023
1 check passed
@Garanas Garanas deleted the nav-mesh/improve-performance-02 branch June 10, 2023 08:38
@Garanas Garanas changed the title Further improve the performance of the navigational mesh Navigational mesh - analyze cells to check for computational shortcuts Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: AI related to AI functions area: nav-mesh related to navigational mesh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant