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

Use threads for baking navigation mesh inside editor #90508

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Apr 11, 2024

Enables threaded navigation mesh baking inside the editor.

Closes #90120

The baking with threads inside the editor was disabled because especially the SceneTree caused crashes in the past.

Now that the problematic parsing step and the baking step are split and a few new guards exist the baking can run on a thread again.

Note that there are still editor freezes from the parsing process with this as that needs to stay on the main-thread due to the SceneTree and nodes.

Longer freezes are primarily caused by the RenderingServer when visual meshes are parsed because the RenderingServer needs to shuffle all that Mesh data from the GPU back to the CPU.

Use collision shapes as source geometry instead of visual meshes to avoid most issues!

Enables threaded navigation mesh baking inside the editor.
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure of the implications but the feature is useful.

@akien-mga akien-mga merged commit 4a4d6df into godotengine:master Apr 12, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@smix8 smix8 deleted the thread_bake branch April 13, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation mesh baking is forced single-threaded in the Editor
3 participants