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

[3.x] Mesh merging - refactor to be backward compatible for CPU / GPU storage #92105

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

lawnjelly
Copy link
Member

@lawnjelly lawnjelly commented May 19, 2024

Allows the old merge_meshes() function to work from the editor.

Fixes #91988

Most of the lines changed here are just moving the implementation functions to a new location. The bug fix is allowing them to be called choosing storage CPU or GPU etc, and defaulting the old function to store in GPU (which is the old way in 3.5).

Notes

  • MergeGroups totally changed the backend for merging, which inadvertently broke the old merge_meshes() function in MeshInstance when used from the editor.
  • The breakage was simply because the new method defaulted to creating the result mesh on the CPU only (as this is significantly faster, as it removes a round trip to the GPU + drivers for any geometry processing).
  • This PR moves the wrappers for the MeshInstance merging functions to the MergingTool, and converts the results from the wrappers to GPU meshes, so they are suitable for use in the editor and rendering.

Allows the old `merge_meshes()` function to work from the editor.
@lawnjelly lawnjelly added this to the 3.6 milestone May 19, 2024
@lawnjelly lawnjelly requested a review from a team as a code owner May 19, 2024 06:58
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.

None yet

1 participant