-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Creating or loading GPUParticles nodes crashes engine on macOS with Compatibility GLES3 renderer (Apple Silicon) #72469
Comments
relevant traceback (copy-pasted from #77681 )
|
I suggest we use a similar workaround as proposed in #54052, where we convert GPUParticles nodes to CPUParticles at load-time on macOS. This will break many particle effects, but it's better than crashing the engine or not having any particles show up. In the editor, GPUParticles rendering will likely need to be disabled on macOS so you can still edit their properties (without affecting the saved scene file). |
Still happening on 4.1.1 on MacOS Ventura 13.5.2 :(. |
Still happening on 4.1.2. Is there no workaround we can utilize in the meantime without using a different machine? EDIT: I guess setting the particle nodes as invisible works for the time being. You'll have to make them visible again at runtime. |
It might be worth checking if ANGLE fixes this issue: #72831 |
Credit to @PlayWithFurcifer for the [sprite sheet][1] and [tutorial][2] that formed the basis of this explosion I've made minor tweaks compared to the settings they used in the tutorial, and had to work out how to translate the settings from the Godot 3 `Particles2D` node to the Godot 4 `CPUParticles2D` node. Working our how to add the texture was the trickiest part, but part of the problem there was working out that it wanted an SVG, not a PNG. I believe the Godot 3 `Particles2D` node is more equivalent to the Godot 4 `GPUParticles2D`, but [Godot crashes when trying to use this on a project using the compatibility renderer on macOS][3] [1]: https://github.com/PlayWithFurcifer/godot-particle-systems-guide/blob/main/Explosion_Sheet.png [2]: https://www.youtube.com/watch?v=F1Fyj3Lh_Pc&t=253s [3]: godotengine/godot#72469
Credit to @PlayWithFurcifer for the [sprite sheet][1] and [tutorial][2] that formed the basis of this explosion I've made minor tweaks compared to the settings they used in the tutorial, and had to work out how to translate the settings from the Godot 3 `Particles2D` node to the Godot 4 `CPUParticles2D` node. Working our how to add the texture was the trickiest part, but part of the problem there was working out that it wanted an SVG, not a PNG. I believe the Godot 3 `Particles2D` node is more equivalent to the Godot 4 `GPUParticles2D`, but [Godot crashes when trying to use this on a project using the compatibility renderer on macOS][3] [1]: https://github.com/PlayWithFurcifer/godot-particle-systems-guide/blob/main/Explosion_Sheet.png [2]: https://www.youtube.com/watch?v=F1Fyj3Lh_Pc&t=253s [3]: godotengine/godot#72469
Credit to @PlayWithFurcifer for the [sprite sheet][1] and [tutorial][2] that formed the basis of this explosion I've made minor tweaks compared to the settings they used in the tutorial, and had to work out how to translate the settings from the Godot 3 `Particles2D` node to the Godot 4 `CPUParticles2D` node. Working our how to add the texture was the trickiest part, but part of the problem there was working out that it wanted an SVG, not a PNG. I believe the Godot 3 `Particles2D` node is more equivalent to the Godot 4 `GPUParticles2D`, but [Godot crashes when trying to use this on a project using the compatibility renderer on macOS][3] [1]: https://github.com/PlayWithFurcifer/godot-particle-systems-guide/blob/main/Explosion_Sheet.png [2]: https://www.youtube.com/watch?v=F1Fyj3Lh_Pc&t=253s [3]: godotengine/godot#72469
Still happening on 4.1.3 on MacOS Sonoma 14.1. Crash immediately when adding or editing GPUParticles node in compatibility mode. However it works normally on 4.2 beta 4. |
For future reference, ANGLE does fix this issue but it's no longer the default in 4.2.1 following #85785. (It was the default in 4.2 only.) You can opt into using ANGLE in the Project Settings (Rendering Driver.macos). This may impact performance negatively though. |
I tried doing that but it still crashes the engine. (on 4.2.1_stable and 4.3_dev - master branch) + I don't know if it would help, but here's the error report from macOS error reporter. |
Adding a GPU particles node also crashes Godot 4.2.1-stable with Driver.macos set to "opengl3_angle" on M1 macOS 14.2.1 (minor version increase from prev commenter). https://gist.github.com/danneu/8cbe6c9f399f37dbbf4d5742e70cf0e5 |
Happens to us also on M1 2021 macOS 14.2.1. Is there any short-term resolution to unblock our team? |
You can convert GPUParticles3D nodes to CPUParticles3D by selecting a GPUParticles3D node then using the GPUParticles3D menu at the top of the 3D editor viewport. This has some limitations though (no support for custom particle shaders, attractors, collision or turbulence). This could be done at runtime automatically, but it would also break visuals in a lot of projects (to the point hiding particles entirely may be preferable in some scenarios). |
Thanks for the suggestion. |
Without modifying the engine source code, the only way to avoid this is to add |
You could also change the renderer to |
Just an update on this issue. It's something that we are looking into, but it looks like there will be no easy solution. GPUParticles work fine on intel macs. On Apple silicon macs, they cause this crash (likely because Apple silicon devices don't have OpenGL drivers, they instead of a layer that implements OpenGL over Metal and apparently that layer is missing support for transform feedback). The typical solution would be to use ANGLE to translate OpenGL to Metal so we don't have to rely on Apple's broken automatic translation. Unfortunately, the ANGLE over Metal variant has significant performance problems and leaks memory rapidly making it unusable. The ANGLE over OpenGL variant works much better, but doesn't solve this crash. Our best option is to workaround the performance issues and leaks. We already have identified a workaround for the leak, but it requires significant changes and we aren't sure why they are necessary (godotengine/godot-angle-static#3). We need to investigate how to workaround the performance issues still. Needless to say the Apple ecosystem is not friendly to devs who want to support multi-platform and/or older devices. :( |
@clayjohn thanks for the information on this! With Apple's apparent new interest in gaming, do you think it would be worth submitting feedback to Apple dev support or another contact method for the issues that are clearly caused by a poor Apple implementation? 2023 was the last year that Apple officially sold Intel based products and all future Apple systems will be Apple Silicon. So I believe we can expect Apple Silicon and Metal to be the overwhelming majority of iOS and MacOS developer's rendering platform in the next 2-3 years. I myself still have my old Intel MacBook Pro but I just switched to M3 Max. I can basically run Unreal Engine 5, Unity, and Godot with really good performance on M3 and I would greatly prefer the benefit of an all in one development platform vs needing to swap to my Intel Mac or RDP into my Windows machine when I'm not at my desk if I want to target web or compatibility for older hardware that requires the compatibility renderer. |
Unfortunately Apple has been quite clear that they have no intention of supporting OpenGL/WebGL. Apple's interest in gaming only extends to gaming on devices that support Metal (and soon WebGPU for web gaming). The future for Apple devices appears like it is going to be Metal/WebGPU only. Unfortunately, that means it is on us to find workarounds because we are the ones who care about supporting multi-platform and low-end devices. |
What you can do in the meantime is add a After clicking Add, set the override's value to If you're importing an existing project that has GPUParticles in its main scene, edit [rendering]
renderer/rendering_method.macos="forward_plus"
If there's already a |
just stumbled upon this and it is fixed in 4.3.dev6 |
I wonder if this PR #88816 is responsible. It aimed at resolving a crash for super low end android devices. But seeing as this was an odd driver bug anyway, its possible that they shared a common root |
Thank you! this worked for me |
For anyone new to Godot like myself: As of late July 2024 version 4.3 isn't quite released yet but you don't need to build from source. Official 4.3 release candidate builds can be found here: https://godotengine.org/download/preview/ 4.3rc1 fixes the issue for me. |
Godot version
4.0 beta 16
System information
macOS 13.1, GLES3, Apple M1 Pro GPU
Issue description
When creating a new
GPUParticles2D
or aGPUParticles3D
node while having the editor set to the Compatibility (GLES3) renderer on a macOS device with an M1 architecture, it crashes reliably after a brief delay. This also happens when exporting the project and running it, as well as opening an existing project after switching from the Vulkan renderer to the GLES3 renderer. However, it only occurs whenemitting
is set totrue
, a non-emitting GPUParticles node does not cause a crash.This only happens on macOS, it works just fine on Windows.
Steps to reproduce
GPUParticles2D
orGPUParticles3D
nodeemitting
set totrue
Alternatively:
Minimal reproduction project
Minimal reproduction project (zip)
The text was updated successfully, but these errors were encountered: