Search Unity

Question Is there any ways to avoid the highter brightness when overlap particle in particlestrip?

Discussion in 'Visual Effect Graph' started by shibi2017, Mar 26, 2022.

  1. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    I want to create a lightening vfx using particlestrip, but when it starts to fade out, the overlap particle add them brightness together and returns to a bad visual efffect:
    upload_2022-3-26_17-43-33.png
    How can I avoid this, I trird all Blend mode but not work:
    upload_2022-3-26_17-44-11.png
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    If I am not wrong if you set premultiply and make correct (texture) setup it should work better.
    Why premultiply does not work?

    * I am assuming you are going to use bloom
    ** If you want to avoid white areas, then it can't work in additive way.
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,723
    Additive is also definitely the worst of the blend modes if you want to avoid this ..."additive" effect when particles overlap.
     
  4. iDerp69

    iDerp69

    Joined:
    Oct 27, 2018
    Posts:
    49
  5. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153

    Here are the visuals withdifferent blend mode, as you can see, premultiply still got some bad visual overlaps, I do not know what you mean that make (texture) setup correctly, can you give more details?
    Additive:
    upload_2022-3-27_14-26-9.png

    Alpha:
    upload_2022-3-27_14-26-45.png

    Premulitiply:
    upload_2022-3-27_14-27-22.png
    Multiply:
    upload_2022-3-27_14-32-12.png
     

    Attached Files:

  6. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    thankyou, ill try to search and learn more/
     
  7. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
  8. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    At first I assumed your problem is about super bright area in place of intersection, but your problem is intersection itself.
    About blend modes: Additive just takes two colors and add togheter, so this mode will generate very obvious intersections, premultiply is some kind of comibination of alpha and additive and it's possible to control it better, however it requires correct texture/setup, because as name suggests alpha must be premultiplied.

    Anyway I don't think this problem can be solved by blend modes - you shouldn't produce so many trails in single place. In addition your trail has very low overall alpha, especially edges and it makes overlap obvious. Maybe this will help?


    Are you sure you have correct setup of Z-write for each output?
     
  9. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    Thank you, Qriva.
    I know if I increase the brightness of the color will make it acceptable in visual. But my screenshot is at the time when lightenging fades out, so the alpha/brightness of the texture is low.
    But I did made wrong about z-write, you're right and thank you again. I download the file in that topic and found that I didn't set the z-write.
    But unfortunatrly I'm using the strip output, there seems no z-wtire settings. So maybe I should avoid low alpha values in my project.
    The video you recommand is awesome, I have watched it before but I do learn more this time. But in this video he did not give a solution about this or am I misssing it?
    Thank you again, when I search on the forum, I saw you many times to give others hands on their question.
     
  10. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    Not sure what version you use, but in 2021.2.13 there are settings for that.
    Well, the best would be to avoid clusers of particles in one place, but you can also try to fade out thunder by making it thinner (erode from outside) instead of changing alpha for whole lightning.
    I am not sure what else can be done, maybe someone else has some other ideas.
     
    shibi2017 likes this.