Bug / Crash ObiInstancedParticleRenderer renders ghosts of dead particles - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Bug / Crash ObiInstancedParticleRenderer renders ghosts of dead particles (/thread-4379.html) |
ObiInstancedParticleRenderer renders ghosts of dead particles - Nyphur - 26-09-2024 Very much in the spirit of Halloween here, but ObiInstancedParticleRenderer appears to be haunted as it's rendering ghost particles. Replication steps:
Expected Result: The ObiInstancedParticleRenderer particles stop rendering when the particles expire. When the ObiParticleRenderer particle disappears, its corresponding ObiInstancedParticleRenderer should also disappear. Observed Result: When particles expire at the end of their lifespan, ObiInstancedParticleRenderer continues to render them at their last known position. In Burst backend they are drawn in their final orientation and in Compute backend they are drawn in their final position but with zero rotation. The particles remain there indefinitely or until their index is re-used by a new particle. ObiParticleRenderer and ObiInstancedParticleRenderer render perfectly in sync right up until the particle expires. RE: ObiInstancedParticleRenderer renders ghosts of dead particles - josemendez - 26-09-2024 Hi, Could reproduce this, thanks! Interestingly enough it only happens when the emitter's blueprint is a fluid blueprint, not when it's a granular blueprint (which is the usual use case for particle instances). Will work on a patch and get back to you asap. kind regards, RE: ObiInstancedParticleRenderer renders ghosts of dead particles - josemendez - 26-09-2024 Hi, Here's the patch. Replace these 4 files in your Obi installation with the ones attached, it should solve the issue. Obi/Resources/Compute/InstancedParticleRendering.compute Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs Let me know if I can be of further help, kind regards RE: ObiInstancedParticleRenderer renders ghosts of dead particles - Nyphur - 26-09-2024 (26-09-2024, 02:08 PM)josemendez Wrote: Hi,Yep, noticed that too! Thanks so much! Regarding use case, what I'm doing is having a thick fluid that has little bits embedded in it. A fluid emitter is much easier to control and keep merged with the fluids. I'm also still deciding which of the two ways I want to do it:
RE: ObiInstancedParticleRenderer renders ghosts of dead particles - Nyphur - 27-09-2024 (26-09-2024, 03:08 PM)josemendez Wrote: Hi, Amazing, that fixed the issue, thank you! I also finished the first iteration of my shader embedding bits of stuff in the fluid and it looks great. |