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

Navigation mesh source geometry parsing adds geometry out of bake bounds #90919

Open
smix8 opened this issue Apr 19, 2024 · 0 comments
Open

Navigation mesh source geometry parsing adds geometry out of bake bounds #90919

smix8 opened this issue Apr 19, 2024 · 0 comments

Comments

@smix8
Copy link
Contributor

smix8 commented Apr 19, 2024

Tested versions

4.3dev

System information

Windows 10

Issue description

The navigation mesh parsing process for source geometry adds geometry from all parsed nodes.
The properties for this parsing are on the used NavigationMesh / NavigationPolygon resource.

Both resources have properties to limit what is baked by adding baking rect / aabb. This is very much used to bake chunks in larger game worlds. The problem is even if the baking respects these bounds the source geometry parsing does not at the moment.

As such it adds a large amount of more or less useless geometry for the baking process. All the geometry outside the baking bounds gets discarded at the very first steps of the baking. Not only is this a waste of memory but it also takes a lot of time to process all this pointless geometry. There is really not much point of having it in the first place, it is just dead data.

The only exception would be when users parse with different properties than they do the later baking. E.g. parse with a small AABB and increase the AABB larger for the baking. That is only possible when they do things manually in script. Any bake problems in that case are on them.

The navigation mesh parsing process should discard outlines and triangles of objects that are completely outside the baking bounds. This should be added both inside the geometry parser but also on the NavigationMeshSourceGeometryData objects. Users often do not check their own geometry upfront if it makes sense for the bounds so better to also have it internally for the geometry add functions.

Steps to reproduce

Have a large level with a lot of geometry objects that get parsed.
Set a small sized baking AABB on the NavigationMesh.
Watch how long the parsing takes because all those objects outside those bounds are still fully added to the bake geometry.

Minimal reproduction project (MRP)

N/A

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

No branches or pull requests

1 participant