Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved VFX Graph particles flicker when using point cache tool on any count

Discussion in 'Visual Effect Graph' started by Uzair-Mahmood, May 26, 2021.

  1. Uzair-Mahmood

    Uzair-Mahmood

    Joined:
    Mar 21, 2015
    Posts:
    15
    Hi,
    I've been trying to use point cache tool to generate points from a mesh and spawn particles using its position. Everything goes well except when I try to add any force or velocity to them, they start to flicker. I tested with over a million particles on Simple Swarm system and everything works fine. If I attach it to point cache the same swarm starts to flicker.
    Please see the attached video for details. I am using Unity 2020.3.6f1 . I have tested it on 2019.3.0f6 as well.
    aparently there is an issue already reported on issue tracker for a long time ago but there is no solution or any progress on that so if anyone could help with it.

    I have already tried turning off sorting and changing type to alpha or opaque etc. same result. reduced the particle count to 4k and still same.

     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    549
    Hi @Uzair-Mahmood ,

    This is expected: the Update context is triggered each frame, so you are fist setting the position to the point cache location, then you are applying a large turbulence force so the particles move a bit and then when Update triggers again the next frame the particles snap back to point cache position and the process repeats.

    Try moving your point cache block from Update to Initialize so the particles are only set once when they are born and then the turbulence should apply properly without any snapping back to the original position.
     
  3. Uzair-Mahmood

    Uzair-Mahmood

    Joined:
    Mar 21, 2015
    Posts:
    15
    @VladVNeykov Thank you so much. Worked like a charm.
    I understand the execution order now a bit better as well.
     
    VladVNeykov likes this.