-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Sprite3D and AnimatedSprite3D is rendering very slow #20855
Comments
I've experienced this as well. After removing them all and replacing with MeshInstance planes, FPS returned to normal. |
I've noticed this also on 3.1, quite bad fps on 2 android devices I tried (GLES2) with just a couple of sprite3d's. If I use the builtin quadmesh instead to display my texture the fps is perfectly fine. |
Same here, I had to get rid of them, and now I know what to use in replacement. I think this is indeed a quite old issue: #2096 I'm not sure, but, if the class has the _draw method, that means it overrides it right? Lines 397 to 526 in 24e1039
|
ImmediateGeometry isn't intended to manage large amounts of geometry, so it should probably be replaced to use some other kind of mesh generation (like ArrayMesh?). |
Yeah I am referring to a few lines drawn (I was reusing part of the navmesh code for my game, and let the path as it was, found out it was slowing down a lot on mobile). |
I'm also having this issue. They almost should put a disclaimer on the sprit3d node. Now I'm going through ~20+ nodes and changing them to meshes. It would be REALLY nice to have a feature like the 2d sprite where you can convert it to a mesh2D with just a click. |
Does Sprite3D need a refactor? Surely an object that simple should not be so slow to render. |
@semirix it should probably just be removed and made into a thin shell for a billboarded quad. |
@clayjohn What about AnimatedSprite3D? It's surely possible to emulate its functionality using a MeshInstance + QuadMesh, but it sounds tedious to set up. |
Yeah... as someone working on a mixed 2D and 3D game I really want that sprite functionality. |
I can only draw about 100 Sprite3D before i drop below 100fps, but i can draw almost 1000 QuadMesh. |
See godotengine#20855. (cherry picked from commit 92fa3e0)
For anyone trying to work around this by using an |
I started looking at this as well but my knowledge of rendering isn't to the point where I can be much help. Seems like ios (ipad mini 2) handles lighting, normal maps and sprite3d objects much better in its pipeline where as even a couple sprite3d objects on galaxy s7 causes huge fps drops. I feel this is pretty huge even for 2d games where you see games like hollow knight leveraging 3d for parallax effects. Also anything mixed mode like using meshes instead of sprites for character skins / items. Another workaround I've used is to create an animated texture resource in a spreadsheet for parsing and import it into the engine. It has a max of 256 frames and very limited control but works for basic playback. Really hoping this gets cherry picked for the 4.0 release. |
Yes. We should probably use ArrayMesh instead of relying on ImmediateGeometry. I don't know how difficult it would be; maybe it's actually really easy. I don't know if anyone actually attempted to rework it to use ArrayMesh 🙂
iOS devices have better performance and better GLES3 support across the board, so that makes sense.
Godot supports pseudo "3D in 2D" since 3.2, without having to rely on the 3D engine for this.
It's the other way around 😉 Pull requests in the |
I'm going to just replace the backend of the Sprite3D with a proper mesh instead of using ImmediateGeometry. |
PR is up now! Please test it if you are having performance issues with Sprite3D! |
Fixed by #39867 in the It's not fixed in |
This has already been fixed, hasn't it? Can we close it? |
See my comment above yours: #20855 (comment) |
Sorry, I thought it was a hanging comment. I didn't realize |
3.x
, not in master
yet)
This was resolved for To confirm this, I benchmarked BenchmarkOS: Fedora 34 Testing projects:
|
3.x
, not in master
yet)
I tried so much variations with/without shading with gdScript, nativeScript (Nim) and different import settings without luck. One archer walk animation, with 8 frame costs 14 fps (reduced to 46fps) . It slows to 19-20fps when I exported it to android also. I'm adding screen shots from my computer with GeForce 940MX screen card (I can play Anno 1404 without any lag with this screen card).
I have only
one
archer on the screen, and I scripted with nim (very fast programming language). I supposed in this example I made the fastest things I can do. If not please share my mistake.Version: Godot 3.0
System: Linux Manjaro (ArchLinux derive)
Frame rate drops too much (14fps for only one node). I expect it to work with 60fps.
Screen shots:
![animation](https://user-images.githubusercontent.com/5237679/43920092-a15685fe-9c20-11e8-8a57-239ac5255ed6.png)
![code](https://user-images.githubusercontent.com/5237679/43920093-a177e1fe-9c20-11e8-96bd-6871f0d70329.jpeg)
![import-settings](https://user-images.githubusercontent.com/5237679/43920094-a198425a-9c20-11e8-8963-ecf67224d97b.png)
![screen1](https://user-images.githubusercontent.com/5237679/43920095-a1b88844-9c20-11e8-9d90-2f4efedd961a.jpeg)
I have only one scene as Archer and I'm using a sprite image only. Nothing more.
The text was updated successfully, but these errors were encountered: