Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    Dismiss Notice

Feedback Wanted: Visual Effect Graph

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

  1. hommes_doutant

    hommes_doutant

    Joined:
    Apr 11, 2017
    Posts:
    2
    Hello,

    The nodes "rectangular to spherical" and spherical to rectangular don't seem to work properly.
    I tested to take positions, convert to spherical then back to rectangular and I don't get back the same mesh. Is that expected behaviour ?

    upload_2019-7-5_17-17-17.png

    Best regards
     
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    67
    Custom attributes are being reworked for 2019.3 and they will be treated like any other built-in attributes and will be registered via a dedicated blackboard

    Next 2019.2 package has a distortion output yes
     
    garryjnewman and coldpizzapunk like this.
  3. bjedlowski97

    bjedlowski97

    Joined:
    Feb 13, 2018
    Posts:
    8
    https://vimeo.com/user92507283/review/346599589/3c66867555
    I am trying to spawn some particles in a flame thrower like effect but I noticed as the start of the spawning they look very choppy is there anything I can do to smooth this out. I tried lower the amount of particles but is does the same thing. I have a constan spawn rate so I am not sure what to do. Any help would be much appreciate
     
  4. thinksquirrel_lily

    thinksquirrel_lily

    Joined:
    Feb 8, 2011
    Posts:
    1,172
    I hope this means array attributes as well :)
     
  5. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    107
    Thx for the reply, really helped me, and this VFX tool is amazing. If in the future Unity will add Vertex and Pixel shaders to this, this tool will be an ultimate VFX workstation.

    So, it is not actually possible, for example, to make two different Particle Systems (inside one VEG of course) spawn on death particles from another third branch, like this:



    8. Also, maybe a really stupid question, but still. Is it possible to send messages/calls back from VEG, for example, if I want to trigger a sound effect on particle death? I need some trigger info from VEG back to C# script.

    9. About arrays, is it possible to pass the array of positions into VEG and loop through it? It is useful, for example, to make a radial mask (a position from each particle) to like 20-40 object in a scene.

    10. In some big VEG there is actually a delay, even after I press "Play" when the effect starts working. I think I've read about this, but I can't find it. This is probably one of the cons when using GPU driven particle system. And because of this delay/latency, big explosions made with VEG cannot be instantiated in a scene and immediately played, right?

    11. Can i trigger GPU events on particle collisions?
     
    Last edited: Jul 8, 2019
  6. Moferad

    Moferad

    Joined:
    Dec 16, 2015
    Posts:
    2

    Hey Vlad, or anyone else, Im attempting to parent my vfx to a characters bone and still have "world" simulation , but even with this example i cant seem to get what i want, I'm getting some seriously strange offesting when attempting any LocaltoWorld transformation via the node

    I've zero'd out my gameobject thats parented to my bone and then placed the vfx inside of that, ive done both transforming the game object and zeroing the vfx and vice versa, zeroing the game object and moving the vfx, cant seem to get the result im looking for.

    I want to basically emit a trail off a bone with some sphere conform on the vfx but not be in "local" space for sim
     
  7. sergiobd

    sergiobd

    Joined:
    May 14, 2014
    Posts:
    17
    Hi, I cant seem to find how to multiply a particle's position by a matrix ( M * v ) in order to apply a matrix transform to a particle. Is this possible?
     
  8. sergiobd

    sergiobd

    Joined:
    May 14, 2014
    Posts:
    17
    I'm trying to deploy a particle system generated with a kinect depth-map using in a not-so-performant GPU. I'm using roelkok's repository. I'm killing most of the depth-map's particles using the Kill(AABox) in inverted mode in the initialize block. I assume they get deleted and are not computed any further. Am I right?
     
  9. Sylifixx

    Sylifixx

    Joined:
    Jun 26, 2019
    Posts:
    2
    Hi ! I've imported an alembic (a man crawling) into unity, then used the point cache converter, and put it into my vfx graph, linked it in a set position from map in update but I can't see it crawls, I don't think it load my sequence. Is here someone who has an idea about the workflow (the problem probably comes from me x) ) ?

    Edit: Another question here: How can I send an event in vfx graph with a collider in my scene ? I try some things but doesn't work :(

    Edit02: Found the script for the event and the collider
     
    Last edited: Jul 15, 2019 at 10:23 AM
  10. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    38
    Nice catch, looks like Rectangular to Spherical is outputting theta and phi in radians, but Spherical to Rectangular is expecting degrees. We've logged this, in the meantime you can multiply the phi and theta results from the first node by 180/π to convert them from radians to degrees.

    The link is not working; can you repost?

    Glad to hear you are enjoying the VFX Graph! :)
    And Shader Graph support for VFX is coming up to allow custom outputs with more Vertex/Pixel shader goodness.

    To your other questions:
    You are correct, at the moment GPU events can only be triggered by one system. GPU events are still experimental and will have some refactoring done to them, so it is an interesting thing to look at, but I don 't know if it can be implemented.

    8. Afraid not, it is quite pricey to read per-particle data from the GPU and send it back to the CPU, especially considering that we could be looking upwards of millions of calls. Depending on what you want to accomplish, it might make sense to do the simulation on CPU and drive the visualization with the VFX Graph.

    9. We do not support arrays at the moment, but it has been discussed and everyone agrees that it would be quite useful to have them and be able to loop through them. The best thing to do now is store such data in a Texture2D and read it from there.

    10. As with anything, it's a matter of performance vs. desired effect. I'd assume a similar system of CPU particles would also have a lag when it's played. Thing which take a significant time to load should probably be pre-loaded in advance and hidden until needed to prevent a stall from trying to allocate resources for something which might be too resource-intensive.

    11. Not out of the box, but for the Unity 'Sherman' short for the water FX I was caching the previous velocity of a particle, and if its direction changed suddenly then I assumed it had collided with something and spawned a GPU event. Here's a pseudo-graph showing that:

    (*Previous Velocity in this example is a custom attribute, but you can really cache the original velocity to any Vector3 attribute)
     

    Attached Files:

    DuvE likes this.
  11. blackhawk_001

    blackhawk_001

    Joined:
    Jan 25, 2019
    Posts:
    2
    hi, can someone guide me on how to masking particle using VEG. using old particle system. we only change masking option
     

    Attached Files:

  12. neurograph

    neurograph

    Joined:
    Jun 8, 2010
    Posts:
    23
    Hi is LWRP+VFX supposed to work on iOS 12.3.1?

    I have a scene with the basic VFX swarming particles...
    The scene is working perfectly on an iPad with iOS12.1. The exact same scene in the App, built from the same Unity and XCode project does NOT show ANY particles on an iPad Pro with 12.3.1 installed...

    Looks like metal has some problems with Hidden/VFX/System 1/Quad Output

    XCode says:
    Metal: Error creating pipeline state (Hidden/VFX/System 1/Quad Output): Compiler encountered an internal error

    I'm using:
    Unity2019.1.1f1
    LWRP 5.13
    VFX 5.13

    And the same happens with
    Unity 2019.2.0B7
    LWRP 6.7.1
    VFX 6.7.1
     
    Last edited: Jul 12, 2019 at 8:14 PM
  13. bjedlowski97

    bjedlowski97

    Joined:
    Feb 13, 2018
    Posts:
    8
    Here is the proper link to the error I was having

    As i said before, I noticed as the start of the spawning they look very choppy is there anything I can do to smooth this out. I tried lower the amount of particles but is does the same thing. I have a constan spawn rate so I am not sure what to do. Any help would be much appreciate
     
  14. MHomde

    MHomde

    Joined:
    Jun 7, 2015
    Posts:
    3
    I'm not sure it's the same issue, and I'm still quite new using the VFX graph, but I had the same problem with trying to do a rocket trail. You simply couldn't emit particles fast and smoothly enough, whether you'd set fixed delta time, or delta time for the trail.

    I might be missing some flag or misunderstanding but It seems like there's a minimum interval on the spawn event, and it being "chunky" on that that event so it while the amount of the particles are increased they're not distanced out evenly

    Maybe that's too much to ask with a "continuos flow" and just how just how the system must work but it seems counterintuitive.

    I my case I could solve it by using Spawn over Distance and lerping between the the old and new position like in this answer (https://forum.unity.com/threads/vfx-graph-question.608356/)

    I'd really like to understand better though why it's not possible to simply increase spawn interval and have them by evenly spaced.
     
  15. kirilli

    kirilli

    Joined:
    Mar 5, 2019
    Posts:
    33
    upload_2019-7-15_7-46-44.png

    I loaded the ARRadar sample and I've noticed a different when between the Lit Quad Output node in the demo and the one I created on the right. The normal map options is not available, how can I enable this feature? Thank you.
     
  16. Sylifixx

    Sylifixx

    Joined:
    Jun 26, 2019
    Posts:
    2
    You have to go in the inspector of your particle systeme and then enable it ;)
    Edit: Miss one step: click on your lit quad output node and check the inspector
     
  17. kirilli

    kirilli

    Joined:
    Mar 5, 2019
    Posts:
    33
    Thank you for your help!
     
  18. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    38
    Hi @Moferad, you shouldn't need to do a custom sim space, you can parent your VFX to a character's bone, set the system to be in World space, but when you do your Set Position, ensure that is in local space:


    You can also not have the system parented at all, but instead add a VFX Binder Script (specifically the Multiple Position Binder) to the VFX component, select all bones, and expose a Texture2D in Blackboard and then use the Set Position from Map block to make the particles spawn on those positions:



    Here is how both of these look (blue particles are the nested VFX, yellow the ones using all bones and a position map):

    You could use Transform (Position)?


    Correct, setting alive to false in Initialize (or Update) will kill the particle off and it won't pay the simulation cost of an alive particle. Setting alive to false in Output will only kill it at the Vertex Shader level, but it will still be simulated so it can be turned back on at will (while it has any lifetime left).

    The point cache bake tool only works for regular meshes, but not for skinned mesh renderers. You won't be able to bake out a pcache with the animations of your model. We do have planned support for skinned mesh renderers in the future.

    Hm, don't think this is implemented.

    I'm afraid there are some know issues with iOS 12, you can track them on the issue tracker:
    https://issuetracker.unity3d.com/is...ometryindirect-when-using-vfx-graph-on-ios-12

    You are bumping into quantization issues since you are spawning lots of particles really fast. Changing the fixed time step in Edit/Project Settings/VFX can alleviate some of this. If you are calculating things using Total Time in your graph, replacing it with Total Time (per particle) can help a bit as well (as it adds a random per-particle value to the time). And, if all else fails, try adding more randomization to the velocity, lifetime, etc.
     

    Attached Files:

  19. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    107
    Thx for the detailed answers, still have some small questions :)

    8. OLD That's unfortunate, but maybe there is a way to read at least something from the whole VEG asset? For example a simple global float parameter, which can be set inside VEG. For example, if any of the particles have Y coordinate higher then 10, the float will be 1 or something like this. This is probably impossible because everything in VEG is per particle.

    10. OLD I did not put it correctly when I press "Play" and scene starts, usually, everything is loaded, every mesh, object or old PS. But VEG objects kinda start after 0.5 seconds after the scene starts, I didn't test this behavior in build, only in the editor. But I remember, when in VEG presentation video, there was something about "Latency" on GPU driven particles, so maybe it is. This is not really important, I can just preload effects as you said.

    12. I understand that VEG is constantly changing and this is awesome, but will the effects made with the current version of the VEG still work? Even when all of these awesome features will be presented, such as refactored variables/parameters and refactored(possibly) GPU events.

    13. There been said that "Custom attributes are being reworked for 2019.3", I kinda confused about versions, on the GitHub versions looks like 7.0.0 and 7.1.0, and not like 2019.3 or something.
     
  20. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    67
    Or you can also spawn in a small sphere instead of a point to remove the quantization artifacts. In the future we plan to have built in solutions to automatically remove those.

    You can use exposed parameters for that and then use a predicate and a branch to have a certain value for particles higher than a threshold and another one for those below

    No this is not expected, there's no latency with GPU particles. The only latency there is is if you want to readback particle data from GPU to CPU (But this is not implemented yet)

    Yes they will. There may be breaking changes sometimes but we try to avoid them as much as possible and rather automatically convert old graphs to new ones when some things change.

    7.x versions of GFX packages are the ones compatible with 2019.3, 6.x with 2019.2 and so on
     
    DuvE likes this.
  21. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    107
    Thx, but I can't set the exposed parameters inside VEG, right? I can change them in inspector like normal variables, but not inside VEG.
     
  22. MHomde

    MHomde

    Joined:
    Jun 7, 2015
    Posts:
    3
    Hey, is there any way to get the "birth" position of a particle, like for instance if I create a particle through "trigger on kill" gpu event and want to use it for the "Connect Target" block so it originates from where it was created...

    Edit: saw now that you can manually use "set target position", great, but seems little unintuitive perhaps :) Start position could be a great attribute
     
    Last edited: Jul 18, 2019 at 6:34 AM
  23. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    67
    Oh ok, I'm afraid you can't do this at the moment in VFX Graph then. But we have been discussing about possible solutions for that in the future.

    You can use a custom attribute named startPosition if you want. To use custom attributes you need to enable experimental features in VFX preferences.