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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Some advice for a specific effect with forces ?

Discussion in 'Visual Effect Graph' started by Eulmiac, Mar 19, 2020.

  1. Eulmiac

    Eulmiac

    Joined:
    Mar 11, 2020
    Posts:
    10
    Hi everyone,

    Since I'm struggling with another aspect of my project I thought I would be better to start a new post.

    I'm looking for some advices on where to start and how complicated it would be to produce an effect kinda similar to this (sort of decay of the particules when the camera approaches) :



    Moreover do you think there is a way to make this effect not permanently but only when the force field hover the area ?
    Any hint would be very much appreciated, even regarding the shading part (but I'm not there yet) !

    Thanks
     
    Last edited: Mar 19, 2020
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Hi @Eulmiac,

    You could just test for a distance, and if a particle is within the range you want, change the values. Adjust gravity higher, add velocity, change color and so on.

    I'd suggest you follow the same approach as you should with any effect (if you want to succeed) that you split it to parts and figure out how each small detail works.

    Anyway that looks quite easy-ish to replicate.
     
  3. Eulmiac

    Eulmiac

    Joined:
    Mar 11, 2020
    Posts:
    10
    Thanks for this reply Olmi !

    Sorry but since I'm a noob, could you be more specific ? What do you mean by test for a distance ?
     
  4. Eulmiac

    Eulmiac

    Joined:
    Mar 11, 2020
    Posts:
    10
    Up !
    Anyone with a tip pls ? I can't see how I can apply this kind of effect in a falloff area and how to make it reversible...
     
  5. gopolygongo

    gopolygongo

    Joined:
    Sep 7, 2019
    Posts:
    7
    This a test for distance between the main camera and particles
     

    Attached Files:

  6. Eulmiac

    Eulmiac

    Joined:
    Mar 11, 2020
    Posts:
    10
    Thx a lot !
    I see that I can tweak the range in the compare node, nice !
    I'm struggling to grasp the math logic behind all of this, any suggestions for a good reference book or website ?
     
    Last edited: Mar 25, 2020
  7. savorygreatness

    savorygreatness

    Joined:
    Jan 5, 2018
    Posts:
    6
    I would suggest starting here: https://github.com/keijiro/Pcx/tree/vfxgraph-example and looking at that Particles.vfx asset (https://github.com/keijiro/Pcx/tree/vfxgraph-example/Assets/Test), then playing around with the knobs and sliders until it starts to make some sense.

    Ruben is also on Twitter and has posted a lot of background on how these videos were made. He wrote his own shader but this effect is certainly possible.
     
  8. Eulmiac

    Eulmiac

    Joined:
    Mar 11, 2020
    Posts:
    10
    I managed to do something like this with a lot of help (obviously). Now everything goes back to its place but this some kind of collider effect, playing with the set position only.
    Now I don’t know how to apply it to a force becaus.When I do, it glitches and stutters because of the set position telling the particles not to move I guess :confused:

    08.jpg
     
    Last edited: Apr 1, 2020