Search Unity

Question Tex index change every bounce.

Discussion in 'Visual Effect Graph' started by raaan127, Feb 16, 2023.

  1. raaan127

    raaan127

    Joined:
    Dec 9, 2019
    Posts:
    31
    I have a texture sheet of debris and want to create a ground explosion/impact
    I meet 2 problems:
    1. The TexIndex of particle change everytime particle collide.
    2. It is seemingly bouncing indefinitely (compare to Particle system collision)
    Is this a bug or some kind of feature? How can I get the result like using Particle system collision? (Bounce 3 to 4 times then stay still)
    I'm using Unity 2022.1.23f1
    vfxgraphtexindex2.gif

    ------
    UPDATE:
    I move "Set Tex Index" node to Initialize then it wont change Tex Index when collide anymore
    But still bouncing
     
    Last edited: Feb 16, 2023
  2. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    154
    Hello,

    Your current setup uses a rough surface in collision block, internally, it uses a RAND3 to generate an arbitrary normal per hit. Thus, it will increment the particleSeed with every collision, you can use constant random per particle in that case:
    upload_2023-2-16_9-25-26.png

    The GPU implementation of collision response in VisualEffectGraph is pretty naive and doesn't integrate any kind resting state, that is why you are getting this infinite bouncing. An improvement of this implementation has been planned but we can't provide an ETA yet.
     
    raaan127 likes this.