Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Feedback Wanted: Visual Effect Graph

Discussion in 'Graphics Experimental Previews' started by ThomasVFX, Oct 21, 2018.

  1. shadewing23

    shadewing23

    Joined:
    Jan 30, 2019
    Posts:
    6
    Also has anyone trying on Decal Output? I'm trying to made an burnt floor but the sprite didn't display if the camera was too close. (I did scale up bound size, result is the same)
    Capture2.PNG


    And it display on the capsule even I uncheck the Receive Decals, any help on it?
    Capture3.PNG
     
    Last edited: Aug 15, 2019
    SKoptev likes this.
  2. volvis

    volvis

    Joined:
    Jan 10, 2013
    Posts:
    6
    Hello! Does somebody know what's causing this issue? I'm creating a build for iOS13 and the app stalls visibly (5 secs or so) every time it encounters a new VFX graph. This happens only once, and there's no stall when accessing the scene later.

    Unity 2019.1 / VFX Graph 5.16.1

    This error message seems related:
    Metal: Error creating compute pipeline state: Compiler encountered an internal error.
    (null)​
     
  3. 1000cranes

    1000cranes

    Joined:
    Jun 16, 2015
    Posts:
    5
    Hi I'm having issues with getting accurate reflections with the VFX-graph. I'm creating a simple bubble effect using a lit mesh output with a default unity sphere mesh. All my spawned bubbles have cube reflections. I've included my output settings below. My scene has fresh reflection probe in it which accurately updates any regular HDRP materials but any VFX graph spawns still have issues with their reflections. Any ideas?

    VFXGraph_Reflection_Issue.PNG BubbleMeshOutputSettings.PNG BubbleSettings.PNG
     
  4. unity_IpxdANggCs1roQ

    unity_IpxdANggCs1roQ

    Joined:
    Feb 19, 2018
    Posts:
    25
    Hi.
    VFX graph doesn't seem to work with vulkan android device on 2019.3.0a12(Universal RP 7.0.1)
    I've tested VFX graph with my own project and simplest universal RP default scene. It correctly works on unity editor, but is not drawn on my android device.
    [2019.3.0a12(Universal RP 7.0.1)]
    My project with VFX : app launch -> first frame is drawn -> blackout and crash
    My project without VFX : OK
    Default project with VFX : only vfx is not drawn
    [2019.3.0a7(LWRP 6.9.0)]
    VFX : OK
    Is this related to recent SRP change?
    my device : Zenfone 6 android 9, Windows 10
     
  5. Sinbad3D

    Sinbad3D

    Joined:
    Oct 11, 2016
    Posts:
    17
    Hoping you still want general feedback here, I have a few issues / suggestions. I'm pretty new to VFX Graph but have managed to create some really nice effects with it and generally think it's great, but there are a few niggles it would be great to iron out.

    1. Some options are "hidden" in the Inspector

    I was having trouble figuring out how to change a Color Over Lifetime block to multiply colours instead of overwrite them; I was sure I'd seen it but couldn't for the life of me find it. Turns out it was hiding in the Inspector, when you select that box, and when you change some of the options in the inspector, the content of the block in the graph changes.

    Given that you tend to need quite a lot of space for the VFX Graph window, the Inspector is often obscured (for me) so it's really easy to forget or not even realise that there are more options there. Perhaps there should be an option to add an inspector to the RHS of the VFX Graph window itself, or at least have some kind of indicator that more options are available than are visible in the graph?

    2. Initialise in Local / Update in World

    It seems to me that it's a really common requirement to spawn / init particles in local space, but simulate them in world space. You often want to spit particles out of a moving object but have them be detached from then on; this is how the old particle system worked. In VFX initialise and update change between local/world together, so the way I addressed this was to set everything to world space, and add a parameters which drove the Initialise block's transforms. This is "fine" but it seems an unnecessary faff when this is such a common requirement. Maybe I missed something?

    3. Customise attributes?

    I had a situation where I wanted particles to change between 2 colours over time, but I wanted those two colours to be defined per particle so I could have a single system. Now, I can have a single color attribute per particle and use a global gradient to ramp that (and that's what I settled on), but really I wanted to be able to hue shift to another per-particle colour over time as well as this global ramp. Attaching a full gradient per particle would be too costly of course but I think there might be space to add one extra colour per particle and use the age myself to lerp them, especially as I'm not using much else. Would being able to customise attributes more be a possibility in the future?

    Possibly I could work around it using a global 2D map of colours (age transition left/right, one row per colour set?) but that's a lot more complex to set up and harder to make dynamic when just 1 extra colour on a particle would do.

    4. Please add SetColor

    A small thing since SetVector4 works and the conversion is implicit, but I was scratching my head and Googling and I'm sure lots of people will too when a quick overload will solve that in no time :)

    Thanks!
     
  6. ThomasVFX

    ThomasVFX

    Unity Technologies

    Joined:
    Jan 14, 2016
    Posts:
    26
    Yes, that is indeed an issue if you work with an undocked window. what you can do (that I also do) is to add another inspector docked into the left/right part of your detached window.
    VFX Graph has so many options that we have to carefully choose what we expose or not in the graph, and as the inspector is mostly often used in the editor, we chose to use its space in order to display these options based on selection of a visual element in the graph.

    That was indeed an issue that bugged us for a long time so we had to use Transform and LocalToWorld and WorldToLocal operators in order to perform space transformations. Now, we have spaceable properties in the set position blocks. Instead of using a Vector3, we use a Position which is a Vector3 and a Space (L/W icon as a toggle left to the Vector3 field). So when you use a position you express a value in a space. For instance a 0,0,0 Local in a world-space simulation will perform the local-to-world space transform automatically.

    upload_2019-8-22_17-56-54.png

    Right now, we have a Get Custom Attribute Operator and Set Custom Attribute Node that are part of the Experimental Features (in order to activate them, go to Preferences/Visual Effects and Check the Enable Experimental Blocks/Operators checkbox). We are working on a more elegant solution that shall come a bit later.

    upload_2019-8-22_18-0-16.png

    We could add the prototype indeed, as we only supported low level data types for setting properties. But indeed we could add a prototype to set a color.
     

    Attached Files:

    Sinbad3D likes this.
  7. Sinbad3D

    Sinbad3D

    Joined:
    Oct 11, 2016
    Posts:
    17
    @ThomasVFX Thanks for your fast and comprehensive replies!

    I completely missed the block-level L/W toggle, that's quite subtle. Maybe it should be bigger or a bit higher contrast? Maybe I'm just not very observant ;)

    The docked inspector is perfect, didn't realise you could do that. May I suggest an inspector is docked in the VFX window by default? It's a lot easier to remove if you don't want it than to realise there are things missing that you can't see in the graph. Might help new users trying to find things, or maybe it's just that the documentation is quite light at the moment and doesn't mention the inspector at all AFAICT (just the blackboard and component panels)

    I look forward to the custom attributes finding their way out of experimental mode :)

    Thanks again!
     
  8. kirilli

    kirilli

    Joined:
    Mar 5, 2019
    Posts:
    34
    I would like to make a shopping cart wheels in vfx graph and attach them to a cart prefab. I would like to figure out how to get the wheels to orient in the direction the cart is moving. I tried to orient along velocity but the lit mesh disappears with that setting.
    upload_2019-8-23_17-2-11.png
     
    Last edited: Aug 24, 2019
  9. ThomasVFX

    ThomasVFX

    Unity Technologies

    Joined:
    Jan 14, 2016
    Posts:
    26
    AlongVelocity renders invisible all particles that do not have zero length velocity attribute. If I get your intention correctly, the effect is attached and all simulation is in local. However, in this case, your 4 wheel particles do not have any self-velocity (as you try to get the parent object velocity), What you need probably is to use another mode such as Fixed orientation where you will specify the rotation axis (front) and the up axis(up), then use Z angular speed to rotate your wheels.

    AlongVelocity's most purposed in order to orient particles based on their own movement, such as sparkles
     
  10. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    837
    Is there spawn Rate over distance parameter in VFX graph ?
     
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,844
    You can create a parameter and pass it to spawn rate (the first block). Then in a script, simply send the magnitude of movement to it * some value from script side.
     
    konsic likes this.
  12. Deusald

    Deusald

    Joined:
    Feb 11, 2014
    Posts:
    26
    How far you are from integration with Shader Graph?
     
  13. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    I've been spying on Github commits and the two most active recent branches for the VFX graph are the sg-into-vfx branch and the particle-strips-2 branch. The latter looks nearly ready for a merge: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/4431

    Yay! Trails!

    We're just waiting for Vlad Neykov to approve it. Hurry up Vlad! ;-)

    The shadergraph into vfx branch doesn't have a pull request yet but it looks kinda close to being finished. The test scenes seem to mostly work. I'm hoping they'll wire up the position input before they're done so we can control particle vertices via a shader. https://github.com/Unity-Technologies/ScriptableRenderPipeline/tree/vfx/feature/sg-into-vfx
     
    konsic likes this.
  14. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    837
    Please add trails to v6.9.2 in 2019.2 also.
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,844
    To be fair we all want to be on 2019.3 version of HDRP for stability in the end :) just saying... as it will not be finished until then.
     
  16. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    90
    Yes there is a block for spawn (distance by the fx) and a block for update that outputs gpu events (distance by particle) for that.

    Experimental shader graph integration will be in 2019.3.
    Particle strips will be released at the same time.
     
    hippocoder likes this.
  17. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,844
    Nice! Will we be able to have similar performance to Simple Lit? I only need Simple Lit with some adjustments instead of using something more expensive...
     
  18. ShiftedClock

    ShiftedClock

    Joined:
    Sep 12, 2012
    Posts:
    7
    Hello, I'm having trouble incorporating VFX particles into my scene with raymarching, using LWRP.

    I believe the problem is that the VFX particles are not contributing to the camera's depth texture. For instance, in the attached picture, the yellow sphere is a raymarched object added in a PostProcessEffectRenderer. The cube and spheres in the background are meshes that the raymarched object correctly intersects. The point particles overlap with the meshes appropriately, but the raymarched sphere is always drawn on top of the particles.

    I believe this is because the particles are not writing to the camera's depth texture, but I may be wrong.

    The fragment shader of the raymarch effect calculates the scene depth from the _CameraDepthTexture, like so:

    Code (CSharp):
    1. float depth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(i.texcoord));
    2. depth = Linear01Depth(depth);
    3. depth *= length(i.ray);
    There are signs that VFX particles should have an optional depth pass, notably in the file "\com.unity.visualeffectgraph@6.9.1-preview\Shaders\RenderPipeline\LWRP\Templates\VFXParticlePoints.template", there is this line:

    ${VFXInclude("Shaders/ParticlePoints/PassDepth.template"),USE_OPAQUE_PARTICLE}


    But setting the Blend Mode of the Point Output node to Opaque does not seem to work.

    Is this something that may be added later? Or will it be avoided for performance reasons?

    Am I approaching this from the wrong direction? Or is the solution found somewhere in using a scriptable render pipeline?

    Any thoughts or advice is appreciated.

    Edit: I tried the solution suggested in this thread: https://forum.unity.com/threads/lwrp-vfx-particles-and-depth-buffer.706898/ , but it made the VFX graph not work for me at all.
     

    Attached Files:

  19. SKoptev

    SKoptev

    Joined:
    Jan 15, 2019
    Posts:
    34
    Hello!
    Give me advice, please - how can I implement puddles from rain via VFX graph?
    Decal output could be useful, but it doesn't write on normal buffer (color only).
    Also, it is unclear - how you can synchronize the drop on the water surface, and the occurrence of puddles.

    Thanks in advance, any advice will help a lot!
     
  20. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    7.11 Changelog in vfx/2019.3-staging has a mistake:

    • Color and Depth camera buffer access in HDRP now use Texture2DArray instead of Texture2DArray
     
  21. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    90
    Good catch !
     
    elbows likes this.
  22. Sinbad3D

    Sinbad3D

    Joined:
    Oct 11, 2016
    Posts:
    17
    Is it possible to alter the final colour of a particle post-texture sample? Let's say that I want to use a parameter to lerp from the usual colour of a particle (based on particle colour and texture) up to full white. I don't seem to be able to figure out how to do it.

    All of the colour operations seem to only apply to the particle colour, not the final colour. Therefore it's impossible to add to the post-texture colour value, if you scale up the colour op it ends up being multiplied by the texture again afterwards since it's only applying it to the particle colour.

    This would be really simple in the old particle systems by just putting a lerp in the shader after the texture sample * particle colour, but I can't figure out how to do it in VFX Graph.
     
  23. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    90
    No, all operations in the VFX Graph are at the particle granularity. For what you want, you need to use shader graph. And the good thing is shader graph integration in VFX graph will be in next 2019.3 package! (in an experimental stage)
     
    Ofx360 and coldpizzapunk like this.
  24. CG_Bull

    CG_Bull

    Joined:
    Feb 12, 2017
    Posts:
    67
    Does have any documentation for custom block api??
     
  25. Sinbad3D

    Sinbad3D

    Joined:
    Oct 11, 2016
    Posts:
    17
    Ah great, look forward to that then. Thanks!
     
  26. Mozq8

    Mozq8

    Joined:
    Dec 30, 2016
    Posts:
    16
    Hey, guys, so I got some footage shot on chroma key, basically it's just a people on green screen, is it possible to use Visual effect graph with mp4 video, is that possible?
     
  27. gopolygongo

    gopolygongo

    Joined:
    Sep 7, 2019
    Posts:
    1
    Hi. Hope everyone is having a good day/week/year. Loving the vfx graph so far but have come across a problem using the rigid body binding... it works fine in the editor but when I make a build its doesn't seem to be working at all.... is this part implemented yet or am I missing something. Cheers M
     
  28. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    I'm not sure what you mean by "use with" - video is video. The VFX Graph is a particle system. There's multiple ways you could use video as an input into a particle system but you haven't explained what you want to achieve.
     
  29. NicorSoftware

    NicorSoftware

    Joined:
    Aug 29, 2019
    Posts:
    9
    Preview pane for the Smoke Effect in Fire and Smoke video is not working.
    Have followed that video frame by frame and still it just displays a box with nothing in it.

    unity version : 2019.2.3f1
    graphics card : Geforce GTX 1080
     
  30. Mozq8

    Mozq8

    Joined:
    Dec 30, 2016
    Posts:
    16
    Oh I see, I want to create something similar to volumetric videos with effects like depthkit and keijiro takahashi effects like holograms not in terms of 2.5d volumetric just the effects.
     
  31. Bahmann

    Bahmann

    Joined:
    Mar 5, 2019
    Posts:
    8
    Hey Guys,

    can anybody show me how it is possible to animate the VFX Graph on fixed points (I would need at least 15-30 Points) or better via a Spline? I already tried to pointcache my Spline GEO but I can't emit on it. does anybody has a solution on how to emit on a spline?
     
  32. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    OK. I understand now.

    Here's a simple example: https://github.com/IxxyXR/Video-VFX
     
    Mozq8 likes this.
  33. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    Either use the supplied multiple point binder component - or write a script that samples the spline every frame and writes the xyz into a texture that's passed into the graph.
     
  34. alexandredizeux

    alexandredizeux

    Joined:
    Sep 3, 2019
    Posts:
    6
    Hi everyone !
    I'm starting to learn unity (coming from Houdini and Blender) and I try to play with visual effect graph by learning from example files found here https://github.com/Unity-Technologies/VisualEffectGraph-Samples but it seems that with the last version of Unity several scenes are broken as you can see in attached files, are you aware of that or it's just me having these issues ?
    Thanks for the work
    Alex
     

    Attached Files:

  35. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    Have you tried opening the VFX Graphs in question? Sometimes between versions I find that I have to recompile the VFX to get them to show up.
     
  36. Bahmann

    Bahmann

    Joined:
    Mar 5, 2019
    Posts:
    8
    Thank you for your response. I tried the multiple point binder but lag to implement more than 3 Points at the to generate the Curvature on how it should move/behave. Do you have any solution on how it would be possible in the VFX graph to add those Multiple Point Binders (15-30) ???
     
  37. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    I'd probably go with packing xyz into a texture if I was doing it myself. I've packing hundreds of coordinates per frame into textures and still reached a decent frameate.
     
  38. Bahmann

    Bahmann

    Joined:
    Mar 5, 2019
    Posts:
    8
    Thanks for the response. I have to talk to our Programmers on how "easy" it would be to implement something like this.

    Till now I did just some testing with .pchache files from my Spline Geometry. Sadly it is not emitting from the beginning of the spline, rather emitting on the path of the spline.

    I've found a script that is animating on a spline but "just" for the old shuriken Particle system


    Do you have any example on how to script this into a texture or how this texture would look like?
     

    Attached Files:

  39. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    Shouldn't take longer than an hour for an average developer.

    A couple of similar examples:

    https://github.com/IxxyXR/VoxelVFX/blob/master/Assets/Scripts/VoxelVolume.cs#L19

    https://github.com/IxxyXR/Text-VFX/blob/master/Assets/Text VFX/Scripts/VFXText.cs#L151

    (look at the bits where we do "SetPixel" or "SetPixels" - they are the only bits you really need to implement)
     
  40. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Hi @ThomasVFX

    Is there a way to quickly and easily record animations tied to parameters in VFX graph? Like Motion Sketch in After Effects?

    Goal is to record this mouse movement to capture the effect.

    Imported the Recorder package and tried that but it didn't identify and record the attributes (only the ones i'm already modifying with a script) as you can see from this image:

    Ideally i don't want to be bothered creating a parameter, trying to figure out what specific variables to alter and when, and then trying to figure out how to script it. Just want to hit record and it auto spins up a timeline recording for me. That would be awesome. Just like a DAW like Ableton or something.

    Is there an easier way to do this now? If not can you PLEASE add this? Would be so good for artists and creators.
     

    Attached Files:

  41. terapong

    terapong

    Joined:
    Mar 5, 2013
    Posts:
    14
    Can Vfx Graph work with Maya blendshape?
     
  42. Mozq8

    Mozq8

    Joined:
    Dec 30, 2016
    Posts:
    16
    Hey guys, I assume that VFX graph is based on some standard terminology for CG, can somebody point me to the right direction in terms of research and learning, maybe some thematic books? All this nodes and parameters looks a bit confusing to me. Already tried the github reference pages but the info is way to generic.
     
  43. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    Depends what you mean "work with". A Maya blendshape is just another skinned mesh once it's in Unity. Something like https://github.com/keijiro/Smrvfx might help.
     
  44. terapong

    terapong

    Joined:
    Mar 5, 2013
    Posts:
    14
    I need to spawn group of jellyfish(animated with maya blendshape) by vfx graph.
     
  45. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    Ah. I see. Nope - only static meshes can be used as particles.

    But it strikes me that you're either planning to have 10s of thousands of jellyfish (in which case you'd want to use billboards as even static meshes of any complexity would bring a GPU to it's knees) or you need smaller swarms and gameobjects would do the trick. I guess there's a tricky middle-ground (too many to use gameobjects but you still want them closer than you could get with billboards) - that's probably where you'd need something like an imposter system or a cunning mix of billboards and meshes depending on distance from the camera.
     
  46. terapong

    terapong

    Joined:
    Mar 5, 2013
    Posts:
    14
    Thank for your help.
     
  47. Poupi

    Poupi

    Joined:
    Jan 11, 2012
    Posts:
    104
    Hey,
    I'm having some troubles to run a project with VFX Graph running on android device (either a phone or an Oculus Quest). I tried to use the classic render pipeline or the LWRP, and everytime the effect is glitched :

    VFXGraph_Glitch.png
    Does anyone has an Android project running VFX Graph without issues ? I tried with 2019.2.5f1 (latest one) and 2019.2.1f with the latest VFX Graph and LWRP Packages.

    Many thanks
     
  48. mouurusai

    mouurusai

    Joined:
    Dec 2, 2011
    Posts:
    306
    Is any way to disable recompiling on enter/exit to play mode?
    Edit:
    The VFX graph window was cause of recompilation, if that window closed no recompile occur.
     
    Last edited: Sep 24, 2019
  49. kkrg001

    kkrg001

    Joined:
    Mar 6, 2019
    Posts:
    3
    Can vfx graph be used with fog? In my lwrp environment, when fog is turned on, it becomes gray like the image.
     

    Attached Files:

    • 01.png
      01.png
      File size:
      121.9 KB
      Views:
      78
    • 02.png
      02.png
      File size:
      119.9 KB
      Views:
      68
  50. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    209
    15 pages...

    Surely it's time to give the VFX graph it's own forum?

    Considering even VFX Toolbox has one!
     
    protoben and mmaclaurin like this.