Search Unity

Feedback Wanted: Visual Effect Graph

Discussion in 'Visual Effect Graph' started by ThomasVFX, Oct 21, 2018.

Thread Status:
Not open for further replies.
  1. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    I can't get the lines output context to display any color other than black. Is there a secret to it?
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    I just wanted to say that VFX graph on LWRP is the bomb. Been waiting to mess with it for so long and now I can for my current project! Loving that it works on the oculus go when OpenGL ES 3.1 is enabled!
     
    Blarp likes this.
  3. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I've been trying to run it on Daydream and got stuck on the fact that LWRP seems to insist on Vulkan which isn't compatible with VR/XR on Android.

    I'm going to try it with OpenGL again...
     
  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Can you tell me your precise Unity version, LWRP version and VFX Graph version?
     
  5. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    2019.1.0b10 Latest LWRP available for that version from package manager, and latest VFX graph available for that version from package manager

    I am on the Oculus Go however, not Daydream so unsure whether it will work the same for you. Certainly vulkan is not required. You have to enable OpenGL ES 3.1 from your player settings, its an additional checkbox. You also need to remove "auto graphics API" and select Open GL ES 3

    EDIT: @andybak from here https://forum.unity.com/threads/lwrp-4-6-0-preview-18-3-5-2-1-19-1-are-out.562291/page-10

    "Yes, we now have support for unlit VFX graphs in LWRP in >5.8.x(19.1) and >6.6.x(19.2) this has only just been put in so expect some issues, I have seen it running on both android and iOS though with my own eyes :)" that was from unity staff, I followed that and used a version above 5.8 (5.10.0 was available to me) and its working with the additional options I mentioned above enabled
     
    Last edited: Apr 4, 2019
  6. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    That will be different depending if "preview packages" is ticked. It will also be different if someone reads this post in week ;-)

    Any chance you could post the actual version you've got installed? I want to reproduce your setup precisely.
     
  7. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    I posted above?

    LWRP 5.10.0.

    Unsure about VFX graph and wont have access to personal PC until much later this evening, but I have preview packages ticked always so just tick it and go for the latest VFX graph and you should be fine.
     
  8. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Sorry - my bad. Thanks for clarifying anyway.
     
  9. shadewing23

    shadewing23

    Joined:
    Jan 30, 2019
    Posts:
    6
    Are there the way to put shader in the VEG particle? Like material in Shuriken.
     
  10. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    No problem, let me know how you got on and if you have any problems I can always give you some more pointers, have access to my LWRP project now so can load it up and go through any differences should you need
     
  11. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    Maybe I'm blind, but is it actually possible to let lit output nodes emit light? Cranking the color up to HDR ranged does not achieve this effect.
     
  12. RavenLiquid

    RavenLiquid

    Joined:
    May 5, 2015
    Posts:
    44
    Wasn't one of the samples emissive?
     
  13. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    yes, but not lit as well. I want to emit spheres, where only a random number of them are emissive, without having to hookup a second output and randomly kill particles.
     
  14. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Not yet but shadergraph integration is being worked on

    Yes, check the lit output inspector. You can add an emissive slot (color or texture) and also choose how the particle color is used in the material (base, emissive or base + emissive)
     
  15. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    Oh man, there's something changing in the inspector when editing Visual Effects as well :eek::)
    Sorry to bother and thanks.
     
  16. stefanwagner

    stefanwagner

    Joined:
    Jul 13, 2016
    Posts:
    1
    Seems like the latest version of Visual Effect Graph does support LWRP with OpenGL 3.1 on Android. But most output nodes (if not all) are using StructuredBuffers within the Vertex Shader. Are there any plans to add output nodes which support OpenGL 3.1 devices who don't support StructuredBuffers (eg. Samsung S8)? Vulkan is running fine on this device but isn't supported by ARCore yet.
     
  17. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    hugokostic and peeweekVFX like this.
  18. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    this might get lost in the thread but I released my in-Unity SDF baker as open source (I use signed distance fields extensively on my project). I get the sense Unity may release some SDF tools for VFX Graph eventually, but hope this is helpful for now:
    https://github.com/xraxra/SDFr

    It outputs RHalf Texture3D's with -1 to +1 values that are normalized to the baker's bounding box magnitude (max distance). There are a couple quick and dirty examples showing it working with VFX Graph and also basic raymarching.
     
    m4d, Mauri, keeponshading and 3 others like this.
  19. mb28

    mb28

    Joined:
    Oct 7, 2012
    Posts:
    27
    Anyone have luck getting world space particles to work? I've got a particle emitter attached to a moving game object. Would be great to get worldspace emission. Changing the setting to "world" in visual effects graph isn't working. VFXBasicInitialize also has space set to world and the particles aren't adhering to this setting. Currently in 2018.3.11 and 4.10.0 for the visual effect graph.

    Perhaps I'm missing something here??
     
  20. mb28

    mb28

    Joined:
    Oct 7, 2012
    Posts:
    27
    Figured that one out. Apologies for maybe the obvious answer. Perhaps I need to wait for documentation before jumping into HDRP and Visual Effects Graph. For now, those interested, this will do the trick. VFX is attached to a game object.

    LocaltoWorld piped into Initialize block...


     
    Last edited: Apr 13, 2019
  21. JotaRata

    JotaRata

    Joined:
    Dec 8, 2014
    Posts:
    61
    Has anyone used the Decal Output? I'm having troubles when setting the soace world and usong a Decal OitpOu
     
  22. adamchild

    adamchild

    Joined:
    Jul 13, 2015
    Posts:
    1
    Hi, I'm having issues getting LWRP and VFX Graph working under Single Pass Instanced rendering in VR.

    I've updated the shader passes inline with the single pass instancing guide here: https://docs.unity3d.com/Manual/SinglePassInstancing.html but I'm only getting rendering in the left eye. Is this supported? Thanks for any pointers
     
  23. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    169
    Is it possible to create a for loop inside VFX Graph, for example, I need to check the distance from each particle to 10-30 objects and create a spherical mask around each of them?

    Also, a second question - is it possible to make Vertex offset of each particle, like in regular shaders? Lately, I check the butterflies sample and I thought that it would be better to keep the animation of butterflies in texture and use this texture for vertex offset. It can be achieved with standard shaders but just wanted to ask about the VFX Graph.
     
    Last edited: Apr 16, 2019
    createtheimaginable likes this.
  24. RavenLiquid

    RavenLiquid

    Joined:
    May 5, 2015
    Posts:
    44
    I'm trying to upgrade to VFX 5.13 via the package manager in 2019.1.0f2, but it is giving me a shasum error. I'm not sure if the error is on my machine or if something is wrong with the package?

    Edit:
    It seems to work now.
     
    Last edited: Apr 16, 2019
  25. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    356
    Hello,

    Is there a way to get particle attribute by specific Id as a Node outside contexts ?
    I want to get get the position of particle N+x but didn't find anything.
     
    sphoria likes this.
  26. SKoptev

    SKoptev

    Joined:
    Jan 15, 2019
    Posts:
    37
    Hello!
    How can I add custom attribute to my VFX graph, and enable creation of nodes "set custom attribute"/"get custom attribute"? See it in example "SpaceshipHoloTable" from VisualEffectGraph-samples project, cannot reproduce in my own.

    Also, cannot create block "Add position from map" in "Initialize" context (by "create block" context menu), but if it copied from "portal" sample (ctrl+c, ctrl+v) - works fine. Looks like some features locked now, how it can be unlocked?

    Thanks in advance!
     
    Last edited: Apr 19, 2019
  27. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    356
    In the latest blog post about FpsSample, they extended with custom stuff.
    But apparently with the latest version of VEG we cannot accces VFXOperator or VFXBlock.

    When we'll be able to create custom stuff with the latest VEG ?

    Thanks
     
    createtheimaginable likes this.
  28. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Have a look at the VFXExtras directory in some recent Keijiro repos: https://github.com/keijiro/Vdn8

    He's using an .asmdef to get access to internals.
     
  29. Kuroshiki

    Kuroshiki

    Joined:
    May 10, 2013
    Posts:
    4
    Hello !
    Sorry if this isn't the right place to ask.
    I am trying to make VFX work with LWRP on Android.
    I am using this test project from Keijiro repos: https://github.com/keijiro/LwrpVfxTest
    When I build on Android, instead of seeing this: https://twitter.com/i/status/1111987916908036096
    I see this: screen.png
    I tried to replace the graph with a Simple Particle Effect and again something weird is happening:
    screen02.png

    I am using Unity 2019.1 with LWRP and Visual Graph package version 5.10.0 (tried upgrading to 5.13 and it didn't solve anything). Maybe I am doing something wrong in the build settings ?
    If anyone has an idea on how to solve this I would be really grateful.
     
    ROBYER1 likes this.
  30. coldpizzapunk

    coldpizzapunk

    Joined:
    Aug 20, 2014
    Posts:
    30
    Is there a way to rotate a pcache input so I can place it better in a scene. I have the Transform setup to feed into the Position Driven by Map / Bias, but it only moves the position it doesn't seem to change rotation when I rotate the transform. I would like to use a Proxy object in scene to drive both position and rotation of the initial particle Pcache that is setting the initial position of particles.
     
    gaelleBe likes this.
  31. bjedlowski97

    bjedlowski97

    Joined:
    Feb 13, 2018
    Posts:
    46
    Hey could anyone help me please. I want to recreate something like this
    in the visual effects graph. Mainly I want to make a subemitter that follow the main particle movement while they emit what I want, Like how in the video he has sparkles spawning from the main firework. Any help would be great thank you
     
    konsic and createtheimaginable like this.
  32. RavenLiquid

    RavenLiquid

    Joined:
    May 5, 2015
    Posts:
    44
    Check out the unity VFX graph samples. I think the one you want to look at is the one with the genie. It has multiple emitters in the same graph. You want to kick off the explosion with an event from the first effect. I think it can be done the same way as the smoke -> genie transition with a gpu event.
     
    ROBYER1 likes this.
  33. bjedlowski97

    bjedlowski97

    Joined:
    Feb 13, 2018
    Posts:
    46
    Ok thank you I will check it out
     
  34. michaelybecker

    michaelybecker

    Joined:
    Jun 18, 2014
    Posts:
    19
    Seconding @adamchild 's question above - VFX Graph currently seems to default to multipass and only render to the left eye when the rendering mode is single pass instanced (as is my case on the Magic Leap One). This has been repro'd by a bunch of folks, and someone has been able to fix it by manually converting the VFX Shaders to support SPI (forum post is gated behind a login, sorry).
    Any ETA on SPI support for VFX on the LWRP? I think a lot of XR devs are going to run into this.
     
  35. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @coldpizzapunk,

    Right after you set the position of your pcache, you can get the particle position and run it via a Transform Position node. Something like this:
     
  36. RavenLiquid

    RavenLiquid

    Joined:
    May 5, 2015
    Posts:
    44
    I'm trying to get conform to sdf to work, but I'm having some issues with wide shapes like text. Particles seem to be always attracted to the center of my SDFs, making it hard to spread them out side ways to fill the whole shape. Is there a good way to evenly fill text from like the top or bottom?
     
    pojoih likes this.
  37. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I figured out this trick recently but it does bring home the slightly odd distinction between nodes and blocks. There seems to be very little reason why some things are one and not the other. What was the thinking behind the original design decision?
     
  38. michaelybecker

    michaelybecker

    Joined:
    Jun 18, 2014
    Posts:
    19
    Another question/update: running into really anomalous behavior on Android and the Magic Leap One, w/LWRP and ARFoundation or Lumin respectively (yes, lots of moving pieces here) - the coordinate space seems to be all over the place; compare the simple scene:
    https://ibb.co/qD3WtD4

    with the result.


    I experienced a very similar bug building on the Magic Leap One... Something is completely wrong in the worldspace/scale transform, I suspect LWRP is to blame. This is w/varying versions of everything (so, all the way up to the latest preview of LWRP/VFX, coming from the first LWRP-compatible VFX package - 5.10 or so?), on both ARFoundation (Pixel 3) and Lumin as build targets.

    Seems pretty consistently buggy/wrong - all thoughts appreciated!
     
  39. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hey @Kuroshiki , this is a known issue with a driver bug on some Adreno GPUs. We made a public link for it so you can track its status:
    https://issuetracker.unity3d.com/is...rtifacts-when-viewed-with-certain-mobile-gpus
     
  40. bjedlowski97

    bjedlowski97

    Joined:
    Feb 13, 2018
    Posts:
    46
    upload_2019-4-26_12-34-20.png
    Hello, I was wondering if anyone could help me with this part of my vfx. I am trying to get my particle to be attracted to a gameobject over their lifetime, so it can loop. But I am not sure what I can do for the time to get it so I can have it loop, such that the attractive force increase as the particle age, and not just the runtime of the scene.

    here is reference of what I have so far, I just want to add some building up, by making the missle spawn then wait a second or two before being attracted my gameobject
     
  41. Kuroshiki

    Kuroshiki

    Joined:
    May 10, 2013
    Posts:
    4
  42. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    Possible feature request or help: I'm trying conform to different signed Distance Fields, based on ParticleID modulo and notice I can't branch or switch Texture3D Nodes.
     
    michaelybecker likes this.
  43. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    169
    Is it possible to sample a regular UV of each mesh particle? Or World Space position of each pixel?
     
  44. michaelybecker

    michaelybecker

    Joined:
    Jun 18, 2014
    Posts:
    19
    Seconded. Lerping between maps, in particular, would be amazing.
     
  45. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    However, you can calculate position from both maps and lerp between that.
     
    michaelybecker likes this.
  46. VladVNeykov

    VladVNeykov

    Unity Technologies

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

    You can use the Age Over Lifetime node, it gives you a convenient 0-1 remap of the particle's age in relation to it's total lifetime (0: born, 1: particle death). This way you can decide at what point of the particle's life what ought to be happening.

    For example, in the image below the age/lifetime node is plugged into a sample curve, which at around the middle of the particle's lifetime will start lerping between 0 to 10:


    As a side note, on your graph in the image you posted, AttractiveTargetPosition is entering the Change Space node as a local variable, and its target space is also local, so it's not really changing the value's space. You can get the same result without using the Change Space node.

    Hope this helps!
     

    Attached Files:

    konsic likes this.
  47. michaelybecker

    michaelybecker

    Joined:
    Jun 18, 2014
    Posts:
    19
    Thanks @andybak - can you please explain how you might go about that? I'm currently "setting position from map", and am unable to connect a lerp node to as an input:



    I'm sure I'm doing something dumb, but documentation is scarce to notexistent. How would you lerp between positions from two (or, ideally, more) maps?
     
  48. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I think you just have to plug in second map and that use time from 0 to 1 to lerp it.

    What is Position texture?
     
  49. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hey @mhazani, in your example you can only lerp between the color values (as that's what SampleTexture2D outputs.) If you want to lerp between positions derived from a Set Position from Map block, you can do something like this:


    The first block is saving the position value derived from the texture to the position attribute, and the second is saving it to the targetPosition attribute. You can save them to any attribute really, even a custom one, but targetPosition is already there, so might as well use it.

    Hope this helps!
    'V
     

    Attached Files:

    michaelybecker likes this.
  50. Raive

    Raive

    Joined:
    Jan 6, 2013
    Posts:
    20
    With the new HDRP bloom only blooming things that are actually overexposed, there is a new slider on lit and a new node in shader graph to make things bloom regardless of exposure (exposure weight). However, I cannot find anything similar in VFX Graph and now none of my particles bloom at all.

    It is spring now and in spring stuff should bloom - please help!

    How do i make VFX Graph particles bloom in HDRP now?
     
    AdamBlastAllBots and hippocoder like this.
Thread Status:
Not open for further replies.