-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
ArrayMesh surface_remove() missing in 4.0 #67181
Comments
See #41767. |
Is there a workaround for now that doesnt include the use of 'clear_surfaces'? @Calinou |
Seconding, I was using this for some very simple deformations and had to give up on those in 4.0 |
Removing surfaces also seems to be missing from RenderingServer3D. So this server cant be used as a workaround. |
This makes it difficult to add surfaces to a mesh without it. Sure you can clear all the surfaces, but if you are relying on the previous surfaces to generate new surfaces, you don't want to clear them all when you need to add each one separately.. :( Edit: Okay, so a workaround I found., I am duplicating the mesh, and refering to the duplicated mesh's surfaces while I clear the original mesh's surfaces. This makes things more bearable. I just clear all the surfaces once, and then create the new surfaces from the duplicated mesh that I've stored at the start. |
I don't know if someone started some work on it, but I started to (re)implement this function and I should be able to make a PR next week for both OpenGL and Vulkan renderers. |
This comment has been minimized.
This comment has been minimized.
Any updates? This would be a very useful function. |
@EsotericDude #76371 implements this feature but it needs to be rebased before I can review it. |
Godot version
4.0 beta 1
System information
Windows 10, Nvidia RTX2080
Issue description
In 4.0, ArrayMesh is missing the 'surface_remove' method and there doenst seem to be an alternative.
Accessing the surface array directly and removing an entry also doesnt seem to work.
Currently the only way is to use 'clear_surfaces'. Which I think would have a negative performance impact if you'd always clear all surfaces and set new ones.
In 3.x 'surface_remove' is still present.
Steps to reproduce
Add a surface to an ArrayMesh via 'add_surface_from_arrays' and try to remove it.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: