Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Wanted: Visual Effect Graph

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

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

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Can anyone share a scene with basic Visual Effect Graph showing how to properly import Point Cache and SDF data? Haven't been able to find an example I can download anywhere...
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,683
  3. kelloh

    kelloh

    Joined:
    Mar 2, 2015
    Posts:
    29
    It would be helpful if ComputeBuffers were a parameter type supported by the system. VisualEffect has SetInt, SetFloat, SetTexture, etc., but not SetBuffer.
     
    lilymontoute likes this.
  4. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    To add to this, being able to specify ReadWrite flags (for SetTexture & SetBuffer) would both be fantastic.
     
  5. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    237
    Hey guys just a quick question. How would one go about to creating slash fx for a character using the vfx graph. I'm looking for something that looks like air distortion.
     
  6. AdamBlastAllBots

    AdamBlastAllBots

    Joined:
    Jun 10, 2013
    Posts:
    21
    Hey guys, how to I get particles to render correctly in front / behind of a surface with refraction? Tried the settings in the VFXQuadOutput menu to no avail.

    This shot is with pre refraction turned on, as you can see the particles are correct behind the glass, however they are also being refracted when passing over the glass areas in front.

    Turning it off renders the particles correctly in front of the glass however they are no longer visible behind the glass.

    Thanks in advance.

    glass.JPG
     
    createtheimaginable likes this.
  7. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    324
    @thinksquirrel_lily @kelloh Those are good suggestions. We'll look into it.

    @Mbot This is the issue with refraction in HDRP, you can only choose if transparent will be taken in to account or not (prerefraction pass) but there's no information about depth. This is an issue not only with particles but with transparent materials in general.

    You can either try to use alpha test instead of alpha blend if you can or write the depth of your particles in prerefraction pass. This could lead to other issues if your particles are not nearly opaque though.
     
  8. vamky

    vamky

    Joined:
    Aug 9, 2014
    Posts:
    70
    Hi Julien:

    Is it possible to import Houdini RBD fracture into the visual effect graph? if not is there any plan for it in the future?
     
  9. eric_delappe

    eric_delappe

    Joined:
    Dec 10, 2015
    Posts:
    26
    Would be nice to have a block for orbital velocity, as in the shuriken particle system.
     
    dadude123 and andybak like this.
  10. Legendary_Mochi

    Legendary_Mochi

    Joined:
    Feb 26, 2019
    Posts:
    1
    Is there an update on if this works with the standard render pipline?
     
  11. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I think that's already been clearly stated. Along the lines of "It works currently for unlit only. It might break in the future and probably won't be supported going forward"
     
  12. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    160
    When will Visual Effect Graph support sub-emitters like in Shuriken?
     
  13. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Send Tristan this error, I really think that Tristan should see this error as I see it a lot... goddamnit Tristan!

    upload_2019-2-28_11-45-51.png
     
    Gametyme, Chrisad, imaewyn and 2 others like this.
  14. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,450
    Thanks so much for this, was wondering why my effects were disappearing when I wasnt looking at the center of the emitter
     
  15. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Yeah - I was wondering this.

    Is the effect achievable with current features?
     
  16. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Mauri, keeponshading, Kirsche and 3 others like this.
  17. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    > Keijiro is on fire again....

    Goddamit, I thought he'd gone quiet!
     
    ROBYER1 likes this.
  18. Lysaght

    Lysaght

    Joined:
    Mar 2, 2019
    Posts:
    1
    Hmm, so i've being trying to test VFX Graph, but I can't seem to spawn more than 10 particles par second.... is there a "maximum particle" limit somewhere ? I don't really understand, since the whole point of a GPU system is to spawn millions of particles x)



    Here you can see I set the Constant Spawn Rate to something high, but result is ridiculous ^^
    Edit: I'm on 4.10.0

    Edit2: Found the solution, it's the Capacity value that must be boosted up to get more particles... I searched too long for that...
    I don't really understand though, why is it called "Capacity" and why it's not linked to the spawn rate/appear in the spawn section. I do understand that since it's GPU, you have to specify some allocation number, which seems logic here. But with no documentation/tutorial yet, it was really tricky to find x)
     
    Last edited: Mar 2, 2019
  19. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    What about read main camera depth for collision? It's not implemented yet?
     
  20. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    We can fornow read vector field map baked from terrain in the houdini
     
  21. MikeChr

    MikeChr

    Joined:
    Feb 2, 2018
    Posts:
    43
    New Question. It seems that the VFX component will play by default when the object is created (onStart). How can I disable play on start and rely on the Play event to run the effect?
     
    konsic likes this.
  22. unity_gNNrUsLksHjX4w

    unity_gNNrUsLksHjX4w

    Joined:
    Mar 5, 2019
    Posts:
    2
    Hi
    i've been testing vfx graph for about a week now and since i'm not very confortable with node system, I thought maybe someone here could help me.
    I'd like to switch from "local" to "World" during the simulation. Not even sure it is possible but I found a box called "LocalToWorld" (or "WorldToLocal"). So i still have hope c:
    What i'm trying to do is a path effect that follow my mesh animation. My mesh is made by particules and I added a "Trigger Event on Die" so when my particules die others spawn. If i just check World instead of Local, the new one are spawning on a completly different place. And adding a "set position" actually make them disappear (like not spawing at all)
    I really hope i explained correctly my issue and someone could helpme.
    Thank you very much.
     
    Last edited: Mar 5, 2019
  23. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Where did you plug Trigger Event on Die ?
     
  24. unity_gNNrUsLksHjX4w

    unity_gNNrUsLksHjX4w

    Joined:
    Mar 5, 2019
    Posts:
    2
    I put it on "Update" and plug it to "GPU Event"
    Actually I just follow this
     
    Last edited: Mar 6, 2019
  25. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    Go back to page 8 of this thread and you'll see Paul show the correct way to spawn events from script. There are some other gotchas on that page as well that you may run into
     
    MikeChr likes this.
  26. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Keijiro has since done something similar for DepthSense.

    Meanwhile I of course could not resist using the RealSense to inject myself into my fluid sim. Please overlook the early prototype programmer art nature of this rushed example, I'm still tweaking a HDRP modification I made so that I can stack multiple Density Volumes on top of each other, each set to a different colour and receiving a different 3D density RenderTexture from the fluid sim. I cut a few too many corners when doing this and lost control of which density went to which colour of DensityVolume when recording this example, so it looks even more garish than I intended! And I didnt setup any proper camera controls or do anything nice with lighting.

    The only fluid sim parameters I was tweaking (using a midi controller) during recording were buoyancy direction. I pre-recorded a RealSense sequence that is then played back repeatedly during this demo, but the real fun stems from using it all live.

     
    keeponshading, id0 and petersx like this.
  27. BensonWu

    BensonWu

    Joined:
    Dec 2, 2012
    Posts:
    2
    Hello guys, I have a question. How do I get uv data? Please help me.
     

    Attached Files:

  28. AWSi

    AWSi

    Joined:
    Jun 18, 2018
    Posts:
    1
    Hi,

    I am trying to stream a point cloud and visualise it using the VFX graph. I have the positions for each point in an array.

    How could I use the values in this array to set the position of each particle?
     
  29. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I've been messing around with writing my own custom blocks: https://gist.github.com/andybak/117c6f1a891bf4503093a2e35d73a593

    (It allows you to overlay a colour using any of the Photoshop-style blend modes)

    I know custom code isn't officially supported yet but that shouldn't stop anyone trying ;-)

    So far the only way I've managed to get my code to compile is to add it to https://github.com/peeweek/net.peeweek.vfxgraph-extras

    I think the solution might be something to do with assembly definitions but I've never messed around with them before so any help would be appreciated.

    I might try and make some custom nodes next.

    EDIT - I forked net.peeweek.vfxgraph-extras so using this is as simple as following the install instructions on my fork: https://github.com/IxxyXR/net.peeweek.vfxgraph-extras
     
    Last edited: Mar 7, 2019
    createtheimaginable and ROBYER1 like this.
  30. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Is there any way to access the dimensions of a Texture2D`?

    I'm trying to do an "image dissolving into dust" effect and it would be much neater if it could derive the width and height automatically.
     
  31. RavenLiquid

    RavenLiquid

    Joined:
    May 5, 2015
    Posts:
    44
    I'm trying to get some custom nodes to work but I'm having some difficulties. It complains about both valuetype and operationtype. I'm, not quite sure what to do with the operation type as it comes from a preset enum, so you can't add one. Also None did not seem to work. I also overwrote the value with my return value type but it was not happy with this either.

    Strangely enough it did work in the editor (I created a gradient from two colors, visually it worked in the editor). And now Unity crashes whenever I try to open or use the effect.

    I created both the expression and the implementation like for example SampleGradient or one of the noise values.
     
  32. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
  33. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    createtheimaginable likes this.
  34. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    167
    Sorry, I actually asked this question before. But is there a change this tool will be available in the standard pipeline? An unlit version of course, because, this VFX Graph is absolutely top notch.
     
    Last edited: Mar 20, 2019
  35. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    If I am remembering properly, in terms of what has been publicly communicated in the past:

    It used to work with standard pipeline at some earlier stage of development, but was not working any longer by the time they first released a VFX Graph preview. They apparently did fix this later, but made it quite clear that they would not be maintaining this side of things in future.
     
  36. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    I figured out how to do something (hopefully) akin to Shuriken's orbital velocity

     
  37. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    There's some interesting VFX related branches in the SRP repo on Github.

    Subgraphs (yes!), triangle and octagon primitives and access to color, normal and depth buffers.

    Can one of the Unity staff confirm if these are still on the roadmap?

    Speaking of which - is there a feature roadmap for the VFX graph?
     
    createtheimaginable likes this.
  38. yty

    yty

    Joined:
    Aug 10, 2009
    Posts:
    82
    Can the Visual Effect Graph be set to Trail Effect?
     
  39. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Not yet.
    I know that ribbons are coming in 2019.1.
    Trails are probably set for 2019.2.
     
    yty likes this.
  40. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  41. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    > Subgraphs are also listed for 2019.2

    Considering 2019.2 is already in alpha I guess the interesting question is "When will these features be merged to master in the SRP repo?"

    Considering the whole thing is in preview my bar for trying out a feature is "it's been merged". I did try checking out some of the other branches but they are in a very patchy state. Subgraphs seems to work but hasn't seen a commit for 17 days and tri/octagon primitives is just plain broken. No sign of a branch for ribbons/trails.
     
    createtheimaginable likes this.
  42. kong_unity

    kong_unity

    Joined:
    Feb 14, 2019
    Posts:
    6
    hello guys i have this

    Library\PackageCache\com.unity.visualeffectgraph@5.10.0-preview\Editor\PackageInfo.cs(20,41): error CS0234: The type or namespace name 'Packages' does not exist in the namespace 'UnityEditor.PackageManager' (are you missing an assembly reference?)

    Unity 2019.2.0a9
    HDRP 5.10.0
    VFX graph 5.10.0
    How can i resolve this, thanks !
     
  43. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    195
    When setting the color over life to an HDR color with intensity > 0 (emissive) it does not show any emissive colors. The same with the cube output produces emissive color as usual.
    Is this behavior intended? If so, how can I change it to be truly emissive?
     
  44. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    324
    You can use GPU events to parent systems. (You need to enable experimental features in the VFX preference panel)

    You can but you have to pass the depth buffer manually at the moment. In next package for 19.1 and 19.2, the process is improved and everything will be automatic.

    You can use a custom event for that and use the SendEvent API

    See the block "Set Position From Map"

    Good suggestion, we can add a node that does this

    Trails are currently being worked on and are planned for 2019.2

    This should work. Can you share more info about that (screen of the graph and result for instance)
     
    createtheimaginable and id0 like this.
  45. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    569
    Any more info on this? I've tried to figure it out by playing but there's no node that seems to produce the right output to connect to the "Evt" input of a GPU Event context.
     
  46. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Same question, i tried the samples in 2019.2 and cant manage to run them
     
  47. ReadyPlayGames

    ReadyPlayGames

    Joined:
    Jan 24, 2015
    Posts:
    49
    I've run into a problem with the VFX Graph. If you make a new Graph, the Initialize context shows up like this:
    Random.PNG

    However, "Set X Random" does not show up in the Add New dropdown menu (Space). The only thing I can get is:
    randomized.PNG

    I'm using 2018.3.9 and the VFX package is at 4.10.0 (preview).

    The only way that I can use Random blocks is to copy it from a preexisting context, such as from the samples. Why isn't "Random" showing up for me?
     

    Attached Files:

  48. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    UE4.22 had some niagara upgrades. Could this get in VFX graph as well like curl field, exponential fallof for vector fields and collision system?

    New: Niagara Vector Field Data Interface
    The Vector Field Data Interface now works the same for both CPU and GPU particles! You can use the Sample Vector Field module to sample vector fields. It exposes three primary inputs:
    • VectorField: This is the Vector Field Data Interface instance, containing the static vector field object itself, and per-axis tiling flags.
    • SamplePoint: This is the point where the vector field is sampled. This defaults to Particles.Position, but this can be customized.
    • Intensity: This scales the sampled vector.
    There are also multiple optional inputs:
    • ApplyFalloff: Check this to apply a falloff function to the sampled vector, so the influence of the vector field approaches zero towards the edges of the vector field's bounding box.
    • UseExponentialFalloff: Check this to make the falloff function be exponential instead of linear.
    • FalloffDistance: When applying a falloff function, this parameter determines how far from the bounding box edges the falloff applies.
    • FieldCoordinates: This makes it possible to override the Emitter's Localspace parameter. It has three options:
      • Simulation: Uses the Emitter.Localspace parameter.
      • World: This overrides the position and transform of the vector field so that it is always relative to the world origin, regardless of the Emitter.Localspace parameter.
      • Local: This overrides the position and transform of the vector field so that it is always relative to the System itself, regardless of the Emitter.Localspace parameter.
    • FieldTranslate: This offsets the vector field relative to the origin as defined by FieldCoordinates.
    • FieldRotate: This reorients the vector field relative to the origin as defined by FieldCoordinates.
    • FieldScale: This rescales the vector field.
    The SampleVectorField module provides a lot of utility functionality, and therefore it might include some overhead. You can use specialized vector field sampling, by including the SampleField node on a Vector Field Data Interface object in the script editor.

    The input expected here will be relative to the volume of the vector field itself, as no transformations are applied for you.

    An example for easily visualizing and using a vector field is included, called VectorFieldVisualizationSystem.

    New: Niagara Curl Noise Data Interface
    The Curl Noise Data Interface now generates procedural curl noise based on an underlying simplex noise function and the results are identical for both CPU and GPU emitters. It is recommended to use the SampleCurlNoiseField module to generate curl noise for your particles. This module has two primary inputs exposed:
    • Strength: This scales the output vector generated by the module.
    • Length Scale: This describes the approximate size of the vortices generated by the curl noise.
    and three optional inputs:
    • Offset: This is used to pan the noise field.
    • Noise Field: This is the Data Interface object itself, primarily used for adjusting seeds.
    • Sample Point: This specifies where to sample from. Defaults to Particles.Position, but other values can also be used.
    The curl noise field does not inherently tile, and does not suddenly end due to its procedural nature. To get a tiling curl noise field, consider using the Vector Field Data Interface instead, with a periodic volume texture curl noise as a vector field.

    New: Deterministic Random Number Generation in Niagara
    We added support for deterministic random number generation for both CPU and GPU Niagara emitters. The behavior of the random number generated can be controlled globally from the Emitter Properties module, with the following options:
    • Determinism: A flag to toggle between deterministic or non-deterministic random numbers for the entire emitter.
    • Random Seed: A global seed used by the deterministic random number generator.
    The RandomRange Niagara function is the recommended way to generate random numbers inside scripts. It now accepts the following:
    • Min: This defines the lower bound of the random numbers generated. It can be any integer or float type.
    • Max: This defines the upper bound of the random numbers generated. It can be any integer or float type.
    • RandomnessMode: This is an enum controlling the determinism mode of the random number generator, and it can be:
      • Simulation Defaults: This is the default behavior; it inherits the value of Emitter.Determinism.
      • Deterministic: Uses the deterministic random number generator.
      • Non-deterministic: Uses the non-deterministic random number generator.
    • OverrideSeed: This determines whether or not to override the seed specified by Emitter.GlobalSeed.
    • Seed: This value is used to override Emitter.GlobalSeed if OverrideSeed is enabled.
    The last three, RandomnessMode, OverrideSeed and Seed are initially hidden, but they can be revealed by clicking the arrow at the bottom of the node.

    New: Collision System for Niagara
    Niagara collisions have been completely rewritten to support ray-trace-based CPU collisions, CPU+GPU analytical plane collisions, GPU scene depth, and distance field collisions.

    Additional features include:
    • Stability has been vastly improved across the board, in comparison to previous Niagara and Cascade implementations.
    • CPU collisions support the incorporation of the scene's physical material characteristics, such as restitution and friction coefficients, and offers several integration schemes.
    • The system has been written as a single module to improve usability.
    • Collisions now work in combination with all renderers.
    • A configurable "rest" state allows particles to remain stable in particularly challenging situations.
    • The equations are physically based/inspired, and work with mass and other system properties.
    • A number of advanced options have been exposed, including static, sliding and rolling friction.
    • Collision radii are automatically calculated for sprites and meshes. Optionally, you can specify this parameter directly.
     
  49. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    324
    All that is listed here is already in the VFX Graph ;)

    Except exponential falloff of Vector Field (We doo have hard falloff though) and of course things related to CPU particles.

     
    konsic likes this.
  50. turboturboturbo

    turboturboturbo

    Joined:
    Dec 2, 2018
    Posts:
    25
    Is trail rendering available in the VFX Graph?
     
Thread Status:
Not open for further replies.