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

Question URP VFX Graph issues

Discussion in 'Universal Render Pipeline' started by AASCENDED, Jul 8, 2021.

  1. AASCENDED

    AASCENDED

    Joined:
    Nov 18, 2018
    Posts:
    6
    I have been having a lot of issues lately with using URP and VFX Graphs.

    Issue 1 - all of my VFX that are created cause the move point of the empty object(or any object) that they are attached to, to be moved up, and no matter how much fiddling I cannot seem to fix it. See Image 1,2.

    Issue 2 - decals placed via output forward decal quad, are not rendering in game view, I tried recreating the Universal Render Pipeline asset and setting it as the active one in Scriptable render pipeline settings. See Image 3.

    Issue 3 - effects spawned on hit.point of a raycast spawn inside of the object, I believe this may be related to issue 1, or is something I can fix via spawning it slighting away from the surface. I tried playing around with soft particles to nullify the issue it had no effect in this situation. See Image 4.

    Image 1
    vfxissue1.PNG
    Image 2
    vfxissue2.PNG
    Image 3
    vfxissue3.PNG
    Image 4
    vfxissue4.PNG

    Any help is appreciated.
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @AASCENDED ,
    In Initialize, open your bounds and make sure your Bounds position is set to 0,0,0.

    Decals require a depth texture; see if enabling it in your URP asset or forcing it on the camera fixes your issue.


    See if 1) fixes your issue. A few other things to consider, if you are doing raycasting, you can probably also get RaycastHit.normal and use that to offset manually your particles.

    Another issue to consider is the orientation of your particles. In Image 4, your particles are trying to orient to the camera, which can make them clip through the surface. You can consider using an orient fixed axis block and plug in the normal you got from the raycast so the particles will orient along the surface of what you hit and not try to rotate on all axes to face the camera.


    Hope this helps!

    p.s. would recommend posting Visual Effect-related questions here in the VFX forum to ensure we can see it and others having similar questions can have an easier time finding the answer.
     

    Attached Files:

    Last edited: Jul 9, 2021
  3. AASCENDED

    AASCENDED

    Joined:
    Nov 18, 2018
    Posts:
    6
    Thank you so much for the help. For anyone wondering all of my issues were resolved following the suggestions made.
     
    VladVNeykov likes this.
  4. thiskidcalledtom

    thiskidcalledtom

    Joined:
    Nov 9, 2017
    Posts:
    35
    Hello! I am suffering from something similar, with the output forward decal quad. Here is a picture of my shader graph and the issue in video format. If you know @VladVNeykov it would be much appreciated!

    Video Redacted.
     

    Attached Files:

    Last edited: Aug 14, 2021
  5. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hey @thiskidcalledtom ,

    Nice image/video combo, makes it easier to see what's up. I think your VFX bounds might not be visible by the main camera, which will make the effect disappear. Try the suggestions here and see if that fixes it.

    On a side note, I would recommend looking into sending events with event attributes; you can have 1 VFX for all your decals and then via script send the exact position where each hit should spawn (you can also send the orientation, for example, to orient particles based on the hit normal if you are raycasting for the hit point). It's a more efficient way of using the VFX Graph than spawning multiple instances of it, and can allow you to pass some helpful data to your graph (position/normal of what you hit, maybe change the color or parts of the effect based on the surface type hit, etc.)
     
  6. thiskidcalledtom

    thiskidcalledtom

    Joined:
    Nov 9, 2017
    Posts:
    35
    Nice one! I found out that it will work correctly in build.. just not in the editor game-view. So I'll diagnose and refer to your links posted to get a fix. Thank you very much! :)