gelly-gmod / gelly

Library to integrate fluids into a game engine
GNU General Public License v3.0
19 stars 3 forks source link

[BUG]: Host buffer is not cleared when all particles are reset, causing flickering #35

Closed Cubature1 closed 1 month ago

Cubature1 commented 4 months ago

GPU

RTX 3050

Operating System

Win 11

Is this specific to performance?

Issue Type

None

Incident Description

(Only observed on gm_construct) (May be exclusive to the unfinished drywall room) While spawning particles, random rings and orbs of liquid appear in the field of view. image Best screenshot I could get^

Log

No response

yogwoggf commented 4 months ago

Hmm, this issue is particularly difficult to triage as my own investigation proved to be a dead-end as this is actually an error with FleX's laplacian smoothing kernels. A quick spike of this issue made a build of Gelly where the host buffers are all cleared, and the renderer uses the raw positions--which solved the issue. However, the raw positions are terrible for rendering, but when using the smoothed positions, the issue comes back.

I'm not really sure what else to do, but given it has minimal impact, I may kick this to the backburner unfortunately

yogwoggf commented 1 month ago

Fixed in 1.21.4. The actual problem was that the simulation would randomly update in between frames, such that the renderer would be notified of new particles when it wasn't actually ready to be rendered.