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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question Animating particles

Discussion in 'Visual Effect Graph' started by Linkruste, Nov 12, 2022.

  1. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Hey there again

    I'm trying to do a lightning bolt using Unity Shader Graph VFX and Shader Graph VFX using this tutorial.

    Only problem, when I use my Shader Graph VFX as Shader Graph in "Output Particle Mesh: Shader Graph", render it on a Plane Mesh, it does not animate at all.

    It is supposed to move as time passes, but a single frozen frame appears instead.

    Could you help me ? I'm using HDRP if it can help.

    upload_2022-11-12_1-18-26.png
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    951
    This is probably not a problem with vfx graph, but shader used there. You did not attach any ss of your shader, so it's hard to help, but check if time node is correctly multiplied with other stuff, it should already "animate" there.
     
    Linkruste likes this.
  3. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    If that can give someone a clue, here's my "Electrical_bolt.shadergraph", used in the "Shader Graph" argument of the "Output Particle Mesh" block:

    upload_2022-11-12_13-21-7.png

    And yes, all the variables i've used has set default values.

    Hoping someone could help me,

    Have a nice day !
     
  4. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Yes, that's what I just did, and I posted it here

    Edit: What's an ss ?
     
  5. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    951
    Just to be sure
    1. Preview of nodes in shader graph animate correctly?
    2. If you press playmode does it still not animate (vfx)?
    3. Unity version?
    If first 2 points are "yes" and you have no clue how to fix it, please export graph + shader and attach here.
     
  6. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Yes, When I press play, the particle spawns then disappear after a few seconds as expected.

    Let me attach you my two files;

    Thank you so much for your help
     

    Attached Files:

  7. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Oh and my Unity version is 2021.3.4f1
     
  8. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Or if you prefer a Unity Package:
     

    Attached Files:

  9. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    951
    Well, when I drop in on scene or press play it definitely animates. My Unity version: 2021.3.10
    GIF 12.11.2022 14-36-34.gif

    Try restarting unity if you haven't already done so.
     
    Linkruste likes this.
  10. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Okay, so... If that can help anyone.
    I noticed that the animation plays when I'm in play mode.
    I just checked the scene display settings and... upload_2022-11-12_14-43-25.png
    That option was unchecked (by default I guess ?)
    My animation works fine now, thank you Qriva for your time, and everyone, remember to check ALL your related settings before thinking there is a real problem.

    Thank y'all, have a very nice day !
     
  11. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    951
    This is why I asked this, I suspected it might be that. Next time instead of asking I should just write about it :D
     
    Linkruste likes this.
  12. Linkruste

    Linkruste

    Joined:
    Oct 30, 2021
    Posts:
    12
    Yesterday it was not animating in playmode and I still don't know why :confused:
    Anyway !
    Thank you for your time and help mate, if I could help you in anything (like scripting) just ask me, it would be a pleasure ! See ya !