-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The Problem: Frustum culling always checks the original positions for the parts of Skinned meshes even after animations applied.
Examples:
FrustumCulling-SkinnedMesh.mp4
https://forum.gdevelop.io/t/3d-model-culling-does-not-update-with-animations/74545
https://discord.com/channels/258623956158906368/936338995875577926/1479144249114235050
I believe engine doesn't even use boundingSpheres for skinned meshes while doing Frustum Culling. Because even if we use child.geometry.computeBoundingSphere(); in a short code snippet to trigger when the certain animation is ran. Console logs shows that such as boundingSphere.center is changed, but frustum culling still happens like the 3d model is at the no animation state (T-pose).
I don't know if gdevelop uses custom frustum culling logic or not, but bounding volumes for 3d models needs to be updated when the updateAnimation is happening.
This is causing serious premature culling for the character models. this issue is more obvious especially in fps style games.
Steps to reproduce
The examples explain it a lot, but
- play death animation of character model2.
- you will see parts of the model is gonna prematurely culled.
GDevelop platform
Desktop
GDevelop version
5.6.261
Platform info
Details
OS Windows
Additional context
No response