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

Decal crashes & culling behavior when placing at rapid pace #67353

Closed
ynot01 opened this issue Oct 13, 2022 · 1 comment
Closed

Decal crashes & culling behavior when placing at rapid pace #67353

ynot01 opened this issue Oct 13, 2022 · 1 comment

Comments

@ynot01
Copy link

ynot01 commented Oct 13, 2022

Godot version

v4.0.beta2.official.f8745f2f7

System information

Windows 10, Vulkan Forward Plus, NVIDIA GeForce GTX 1070

Issue description

Placing lots of decals on a mesh silently crashes, and when it reaches the thousands it starts to cull decals.

Steps to reproduce

To achieve silent crash (Closing unprompted with no errors), place a lot of decals in rapid succession.

Godot_v4 0-beta2_win64_0Xp58hmtBt

--- Debugging process started ---
Godot Engine v4.0.beta2.official.f8745f2f7 - https://godotengine.org
Vulkan API 1.2.0 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1070
 
1
2
...
...
204
205
--- Debugging process stopped ---

When it doesn't crash (achievable often by placing at a slower pace), you can see some of the odd behavior that seems to occur around 1,000 decals, old decals will get culled at random but still contribute to nodes and active objects, as can be seen in the debug monitor.

Godot_v4 0-beta2_win64_jFXbTaBghL

To use the reproduction project:

Left-click and drag on the sphere to rapidly place decals
Can rotate the sphere with right-click and drag
Zooming achievable by scrolling

Minimal reproduction project

PaintGlobe.zip

@ynot01 ynot01 changed the title Strange decal crashes & behavior when placing at rapid pace Decal crashes & culling behavior when placing at rapid pace Oct 13, 2022
@Calinou
Copy link
Member

Calinou commented Oct 13, 2022

Duplicate of #56657 (same cause).

The culling behavior is expected – you need to increase Max Clustered Elemenets to circumvent it, at the cost of performance on some GPUs.

PS: For drawing trails with hundreds of points or more, decals may not be suited for performance reasons. Consider using PlaneMesh instead. While a PlaneMesh can't adapt to uneven terrain, trails are usually quite small so it's not that noticeable.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2022
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

2 participants