Search Unity

Totally newbie trying to replicate a neon particle effect

Discussion in 'Visual Effect Graph' started by Todiloo, Jun 21, 2021.

  1. Todiloo

    Todiloo

    Joined:
    Jan 22, 2016
    Posts:
    42
    So as title sais, I am 100% new to this VFX graph but thought it looked cool. I am trying to replicate the effect found here:
    https://assetstore.unity.com/packages/vfx/particles/neon-line-particle-effects-45717
    upload_2021-6-21_15-30-36.png

    So basically spawn a bunch of neon "bullets" (after destroying an enemy) that gets pulled inside the player object.
    After a lot of trial and error this is what I have got in terms of graph:
    upload_2021-6-21_15-22-16.png
    Without bloom

    upload_2021-6-21_15-23-2.png
    Bloom and animation
    https://drive.google.com/file/d/1B9zQMskFQWTM9ir8lNVLrAXcS5vZ5kTW/view?usp=sharing

    Any tips on improving it? Using URP, with bloom added (had to set threshold to like 0.7 and intensity to 3 to get any bloom effect) but its a bit too muted(so all over the place)

    Particle sprite/texture used (I am hoping to be able to have a texture which I can change the neon color on so different particles have slightly different colors):

     

    Attached Files:

  2. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    15
    Hello Todiloo,

    Does switching your blend mode to additive in the output helps? After that, you can une a "set color" node and change
    upload_2021-6-23_9-51-6.png


    After zooming in your screenshot, I see that the particle has the glow effect but it is not well displayed due to particles being far and small, does changing to a higher camera resolution solves your issue?
    upload_2021-6-23_10-17-32.png

    Finally, as your texture is coloured, I recommend you use a gradient mapping to change colors. This way, you will be able to set a grayscale corresponding to the effect you want, and then use a set color node without any influences of the texture's color, or directly set a gradient with your desired colour.
    upload_2021-6-23_10-22-18.png


    Does any of it helped you solve your issue?
     

    Attached Files:

  3. Todiloo

    Todiloo

    Joined:
    Jan 22, 2016
    Posts:
    42
    thank you thank you!
    I have done about 25 iterations now. I decided on turning off Bloom as the effect is too hard to get good. Instead I opten for the colored particle. I made the color changes and the gradient worked great.

    Do you mind explaining how it works? How is it able to change color of the green but not the white? Should I opt for another texture? My goal is to be able to switch color per spawn but also per particle.

    Blend mode change wasn¨t necessary.

    As a final note, I really love the design of the workflow, much much more intuitive than the "old" particle system. I don't know if the old one will be depricated but the VFX is awesome. I have seen a few examples with awesome 3d effect but really hoping to see some more simple effects as it is a bit of a threshold.
     
    Marie_G likes this.
  4. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    15
    Sorry for the delay, I am glad you could finally solve your issue.

    The set color is able to change the colors but it kinds of add a layer onto it, so if your base is having green colors, having a final red result (for example) would be quiet weird.
    upload_2021-6-23_11-14-34.png

    But your testure is still usable!
    The color mapping : gradient map mode allows you to "remap" colors by remplacing it with shades that you define, resulting on a complete control of the colors:
    upload_2021-6-23_11-16-40.png

    You can also change the alpha parameters of your image if you want:
    upload_2021-6-23_11-17-28.png

    So, if you set you gradient map with a nice grayscale, you will be able to set any color of your texture without any weird blendings/artefacts: That way, you can create changing colors effects (randomize for example) without any worries.
    upload_2021-6-23_11-19-50.png


    Hope it helps!
     
  5. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    15
    And thank you a lot for the feedback! We are trying to find ways to make the first steps easier with VFX Graph.
     
  6. Todiloo

    Todiloo

    Joined:
    Jan 22, 2016
    Posts:
    42
    It helps tremendously, thank you for your replies. I have been on this for a few days and now I am closer than ever to get the effect I want.

    Just for fun I attached the WIP. Can probably add a lot cool stuff to it but it's getting close.
     

    Attached Files:

  7. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    15
    Great work!
     
  8. Todiloo

    Todiloo

    Joined:
    Jan 22, 2016
    Posts:
    42
    Side question. I realize I maybe actually should do this effect in the normal particle system to easier know when the particles dies(reach player). I saw some example of GPU events but is this feasible?

    So the effect is that an enemy is destroyed. My particles spawn and head towards the player. However the time it takes to reach the player is a bit dependant on if the player moves. Is there a way to know when the unspawn or am I totally using the wrong tool for the job?
     
  9. Marie_G

    Marie_G

    Unity Technologies

    Joined:
    Mar 9, 2021
    Posts:
    15
    You can use a "trigger on die" at the end of your update, linked to a GPU event and an other particle system,
    The "child" particles will spawn when first one dies.
     
unityunity