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

Sprite3D View Frustum Culling Issue on Android #40531

Closed
Ralf12358 opened this issue Jul 20, 2020 · 6 comments
Closed

Sprite3D View Frustum Culling Issue on Android #40531

Ralf12358 opened this issue Jul 20, 2020 · 6 comments

Comments

@Ralf12358
Copy link

Godot version:
Head on Branch 3.2; 89f57ae

OS/device including version:
GLES2, Android. Tested with Galaxy S7 Edge and Amazon Fire HD 8

Issue description:
On Android Sprite3D Is culled as soon as the origin is out of the view frustum - without considering the size of the sprite. Works correct on Desktop (Linux) and Browser. Other platforms (iOS) are not tested

Steps to reproduce:
Create new 3D Scene. Add camera. Add Sprite3D. Position Sprite3D to have the origin outside of the view frustum, but parts of the sprite inside the view frustum. View Scene: On Desktop the partial sprite is shown correctly, whereas on Android the complete sprite is culled.

Minimal reproduction project:
See attached minimal project:

GodotBug.zip

@Calinou
Copy link
Member

Calinou commented Jul 20, 2020

This has most likely been fixed in #39867 (in addition to performance improvements). Give 3.2.3beta1 a try 🙂

Edit: I didn't see the part about OP using the HEAD of the 3.2 branch. Sorry about that.

In the meantime, you should use MeshInstance + PlaneMesh or QuadMesh instead of Sprite3D to improve performance and avoid this issue.

@Ralf12358
Copy link
Author

Just to be sure: I'm on head on the 3.2 branch. This should include all fixes from the 3.2.3beta1, right? So, it is probably not fixed.
With the regular 3.2 release: Sprite3D was unusable with less than 1 FPS.
As you suggested I'm now using a QuadMesh, I experiencing a new Android specific issue with pngs with alpha channels. I would like to report a new bug, but before doing so I would make sure to use the newest 3.2 branch.

@Calinou
Copy link
Member

Calinou commented Jul 20, 2020

cc @clayjohn

I suppose this occurs because the culling AABB is never set, so it keeps its default size which is an infinitely small box.

@clayjohn
Copy link
Member

@Calinou are you sure? The OP says that it works fine on desktop but fails on Android. Sprite3D does have an AABB and I think the VisualServer generates another one when the mesh is set.

I'll have to look in more detail.

@clayjohn clayjohn self-assigned this Jul 20, 2020
@clayjohn
Copy link
Member

Confirmed on Windows 10.

@akien-mga
Copy link
Member

Fixed by #40559.

@akien-mga akien-mga added this to the 3.2 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants