Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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. shadewing23

    shadewing23

    Joined:
    Jan 30, 2019
    Posts:
    6
    Can VFX Graph set the flipbook animation to be random and single row like in shuriken?
     

    Attached Files:

  2. nttLIVE

    nttLIVE

    Joined:
    Sep 13, 2018
    Posts:
    80
    Any plans on making Point Cache a parameter that could be exposed?
     
    mngmra and coldpizzapunk like this.
  3. coldpizzapunk

    coldpizzapunk

    Joined:
    Aug 20, 2014
    Posts:
    23
    I was wondering the same thing. Also if there are any ways/plans to use Animated Point Caches (Like Alembic)?
     
  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    You can use position maps (i.e. a Texture2D with RGB encoding XYX to do this. Pass in a new texture per frame and you're away. I've done this to bring animated point clouds in to the VFX graph.
     
    coldpizzapunk likes this.
  5. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    I'm trying to use force which is tethered to a game object's vector 3 transform and in doing so be able to interact with the VFX in the world, but it only works if the VFX is at 0, 0, 0 in the world. All other instances of that VFX react as if they are also at 0, 0, 0. I'm wondering whether there is a way to properly update each instance of the VFX to factor in it's own location in the world space.

    I've been using this particular tutorial as a guide:
     
  6. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    So I was looking further back in the thread and luckily mb28 solved this issue for me, although she/he plugged the 'localtoworld' node into a 'set position' block in Initialize. Instead I used 'localtoworld' in the force calculation like this:
     
  7. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    36
    I'm in trouble. I was using the VFX Graph for the first time. I'm happy with the results but can't produce a build which I would need in the very near future.
    I'm getting this error and have no idea what this is about, any hint highly appreciated:


    KeyNotFoundException: The given key was not present in the dictionary.
    System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    UnityEngine.Experimental.Rendering.HDPipeline.FrameSettingsHistory.GetPersistantDebugDataCopy (UnityEngine.Camera camera) (at Library/PackageCache/com.unity.render-pipelines.high-definition@5.10.0-preview/Runtime/RenderPipeline/Settings/FrameSettingsHistory.cs:280)
    UnityEngine.Experimental.Rendering.HDPipeline.DebugDisplaySettings.UnRegisterCamera (UnityEngine.Camera camera, UnityEngine.Experimental.Rendering.HDPipeline.HDAdditionalCameraData additionalData) (at Library/PackageCache/com.unity.render-pipelines.high-definition@5.10.0-preview/Runtime/Debug/DebugDisplay.cs:768)
    UnityEngine.Experimental.Rendering.HDPipeline.HDAdditionalCameraData.UnRegisterDebug () (at Library/PackageCache/com.unity.render-pipelines.high-definition@5.10.0-preview/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs:245)
    UnityEngine.Experimental.Rendering.HDPipeline.HDAdditionalCameraData.OnDisable () (at Library/PackageCache/com.unity.render-pipelines.high-definition@5.10.0-preview/Runtime/RenderPipeline/Camera/HDAdditionalCameraData.cs:282)

     
  8. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    Nice to see stereo instancing support being worked on for VFX on github. May I ask how far this one will be backported? 2019.3, 2019.2 or 2019.1?
     
  9. keeps

    keeps

    Joined:
    Mar 24, 2015
    Posts:
    7
    Hi, I have an issue with calling SendEvent multiple times in one frame.



    There is one VEG instance here that handles all the bullet ricochet sparks (not the actual bullets, they are handled in c# with line renderers).
    The sparks are created with SendEvent with the collision point being sent in the VFXEventAttribute as follows:

    Code (CSharp):
    1.                 // if ricochet
    2.                 VFXEventAttribute vfxea = VFXSystem._.spark.CreateVFXEventAttribute();
    3.                 vfxea.SetVector3("position", rch.point);
    4.                 VFXSystem._.spark.SendEvent("SparkEmit", vfxea);
    upload_2019-5-28_5-28-53.png

    The problem is that if you look in the video, when multiple bullets ricochet in a single frame, only one spark appears on that frame.

    I assume this is because the "position" attribute is being overrode by consecutive richochets before the VEG gets to read it.

    Any suggestions?
     
    Last edited: May 28, 2019
  10. Freaking-Pingo

    Freaking-Pingo

    Joined:
    Aug 1, 2012
    Posts:
    307
    Is there no option of exposing a Point Cache Asset as a parameter in the VFX Graph ?
     
  11. EvgenFree

    EvgenFree

    Joined:
    Sep 7, 2014
    Posts:
    93
    Hello!
    I read all the posts (almost) but did not find exact answers to some questions. Suggested answers don't work for me.

    1) What about culling? I use particles to simulate fog, my camera is always inside the spawning volume (Position (AABox)), and at some moments all particles disappear. Recommendations to increase the spawning volume limits do not work for me.

    2) How to set the color value of particles from C #. I have not found the SetColor () method, the only thing I can use at the moment is SetVector4 ().

    color.PNG

    Code (CSharp):
    1.  
    2. VisualEffect visualEffect = system.GetComponent<VisualEffect>();
    3. visualEffect.SetVector4("Base Color", new Vector4(normalParticlesColor.r, normalParticlesColor.g, normalParticlesColor.b, normalParticlesColor.a));
    4.  
    Are there any other ways?

    3) It has been reported that since version 2019.1, collisions with the depth buffer will be available. At the moment I am using version 2019.1.4f1 and there is such a block here and in it you can select the main camera. But the particles do not interact with anything else. Maybe I'm doing something wrong, but there is no detailed documentation on this issue either.

    update.PNG

    Well, I would like to share a solution for VR users. Since I have not found information about the option that prevents particles from rotating with the camera (roll). I made my decision (it does not claim to be perfect and I will be happy if someone tells me how this can be done better)

    orient.PNG

    This forces the particles to look at the camera, but it does not rotate around its axes when rotating and rolling the camera.

    P.S. Sorry for my english.
     
  12. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    Just to make a side point - why are the forum mods encouraging 10, 20 page threads? It's completely crazy. This post should have been a locked announcement post with instructions to post further questions individually either to a specific sub-forum - or at the very least as tag them "vfx graph" inside the Graphics Experimental Previews forum.

    I see lots of these huge threads throughout the Unity forums. It's a terrible way to organise things and the mods should try and give a bit of guidance. Forums need managing - they don't self-organise.
     
    mhazani likes this.
  13. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    My understanding is thus: If your particles "bounds" (set under the Emit context) are outside of your camera's view frustrum then by default Unity will cull the whole particle system. Make sure you set the bounds appropriately. The spawning volume has no effect on this culling
     
  14. EvgenFree

    EvgenFree

    Joined:
    Sep 7, 2014
    Posts:
    93
    Spawning of particles occurs in the box (AABox). The camera is inside this box.
     
  15. zedarus

    zedarus

    Joined:
    Mar 2, 2012
    Posts:
    7
    Hey guys.
    First of all -- FANTASTIC work on the VFX Graph! Having a lot of fun playing with it and absolutely love it.

    I was wondering if it's possible to make it work when
    Time.timeScale 
    is set to zero? I was able to work around it in some cases by just feeding delta time and total time values via parameters, however some of the nodes (like Turbulance) use built-in delta time parameters and I can't seem to find a way to override those :-( This becomes a problem if game uses
    Time.timeScale
    when entering pause menu and you want to have a VFX Graph effect in the pause menu.

    Thanks in advance for any tips!
     
  16. LukeDJ

    LukeDJ

    Joined:
    Oct 2, 2017
    Posts:
    6
    I was surprised to see that this isn't an option too
     
  17. nttLIVE

    nttLIVE

    Joined:
    Sep 13, 2018
    Posts:
    80
    It's been a while since a Unity Dev replied to this thread, and there's been quite a bit of posts about the Point Cache, can we be expecting this any time soon? @VladVNeykov
     
  18. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    Just to be clear I'm talking about the green and not the red:
     

    Attached Files:

  19. Deusald

    Deusald

    Joined:
    Feb 11, 2014
    Posts:
    30
    @JulienF_Unity
    Is there any predicted time when the integration with shader graph will be available? To be able to put shader in VEG particle like material in shuriken.
     
  20. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,375
    Yes. This is needed. I am working on an editor system that will produce point caches that will all use the same common shader graph. Setting this from code is important.

    It could be possible to do this with data baked in textures but the point cache is much cleaner.
     
  21. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    114
    We don't have access to the Vertex or pixel shader at this time. The plan is to support some form of ShaderGraph integration to allow for more pixel/vertex manipulation control.

    We don't have it integrated in the Flipbook player block (might be nice to do so, will jot it down), but it can be implemented manually by assigning a value to the Tex Index attribute. In this case, I'm just picking a random range and setting it over lifetime, but you can math it any way you want:


    @nttLIVE , @coldpizzapunk , @Freaking-Pingo , @LukeDJ , @LennartJohansen
    Heya, apologies for the delayed reply. It's tricky the way it's implemented; it's being thought of, but I'm afraid I don't have any more info on an implementation. As others have pointed out, passing some of the data via textures is feasible, there's a VFX "Point Cache" Binder for things like multiple positions which can work for some cases (it's basically baking position data into a texture), but I assume most people are asking about just exposing and swapping/modifying the point cache asset in the inspector and that's something we do not support right now.

    I believe this is HDRP-specific issue with disabling a camera twice (did some internal searching, a fix was pushed 12 days ago for FrameSettingsHistory. I'm afraid I don't have more info than this, except that it looks fixed and it's probably on its way to a public package :) If you are grabbing the latest SRP directly from the Unity git, it should be already resolved on master).

    I encountered something similar in the Heretic, but when setting the position directly. Sending multiple events within the same frame however should work, just tried something quick and dirty like this and I'm getting multiple particles per frame in different locations:

    Code (CSharp):
    1.  
    2.     void Update()
    3.     {
    4.         if (Input.GetKey((KeyCode.Space)))
    5.         {
    6.                 VFXEventAttribute vfxea = vf.CreateVFXEventAttribute();
    7.                 vfxea.SetVector3("position", Random.onUnitSphere);
    8.                 vf.SendEvent("Boom", vfxea);
    9.         }
    10.     }
    11.    
    It's getting late, I'll try to respond to the other posts tomorrow, thanks for being patient and keep making awesome stuff! :)
     

    Attached Files:

  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    Anyone know why sometimes the VFX object just won't render at all unless I apply the prefab overrides then it does. But then when I hit save all, it dissapears again.

    It's so janky, similar to bashing the side of a faulty piece of equipment in the 80s to get it working...

    I'm thinking it's some kind of prefab issue.
     
  23. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,375
    To bad there is no easy solution for this. For setting up a single effect opening the graph and assigning a point cache is no problem but when you are creating 100s from code based on scene data the position++ info needs to be passed to multiple instances of the same VFX graph.
     
  24. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    Because it's not mainstream in Unity yet, it's still WIP very early days. Having big exposure too soon really harms development and this isn't guess, but something quite well understood.

    This approach funnels more knowledgeable users who don't mind a bit of research. That's the right pace for the current place in development (experimental, subject to change). When Unity is ready they will (and have in the past) make a dedicated area.
     
  25. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    One question I have is... will the SG have optimised nodes? Simple Lit is much more optimised and I would hate to lose it, while tweaking a few little things. Could it be added to graph as a baseline output?
     
  26. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    That makes sense - but I'm not sure how you get from that to the conclusion "20 page threads are fine". 20 page threads should surely be strongly discouraged for obvious reasons.
     
  27. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    Because developers have signalled they want this and we've tested it for years -it's better at these stages, to have everything in 1 easily searchable megathread. I know it seems counter intuitive but knowing you only have to check one thread every day is best for staff. This experimental forum is for staff, not users so it's as you can imagine, trivial for a staff member to go through the new posts of the day.

    Hop onto discord for a more live-chat approach or orienting if you like : https://discord.gg/yjd3bx
     
    Olmi likes this.
  28. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    114
    The spawning volume just controls where particles are spawning, the bounds are the area which is used to determine whether the system is visible by the camera. To confirm, did you increase your bounds? (you can also visualize them if your VFX instance is attached to the graph):


    We don't have SetColor, so yes, you can use SetVector4. Do you need the color space conversion of SetColor?

    Depth should work in 19.1 (I remember using depth spawning a day ago); is your camera providing the depth texture tagged "Main Camera"?

    Thanks for sharing! Yes, we need to implement an option to disable roll in VR.

    Thanks for the kind words! :) Yes, unfortunately some of the blocks are assuming a steady flow of time. Pausing / deeper Timeline integration is something we are looking into. In the meantime, depending on your situation, the noise nodes can come in handy as a substitute for Turbulence:
     

    Attached Files:

  29. zedarus

    zedarus

    Joined:
    Mar 2, 2012
    Posts:
    7
    Thanks Vlad! :)

    It would be awesome if sometime in future it would be possible to pick between scaled/unscaled detlatime mode on VFX graph asset itself (kind of like it is right now for regular / fixed delta time).

    I ended up implementing a small hacky solution that injects unscaled delta time and total time into shader code generated by VFX Graph. In case some is interested, I made this changes to make it work:

    Attention! This is super hacky solution, so use at your own risk!

    1. Add these two constants to VFXBuiltInExpression.cs:
    Code (CSharp):
    1. public const string DeltaTimeUnscaled = "vfxDeltaTimeUnscaled";
    2. public const string TotalTimeUnscaled = "vfxTotalTimeUnscaled";
    2. Use these constants in VFXCodeGenerator.cs in Build()method after line 360 (just before globalDeclaration.WriteCBuffer) call:
    Code (CSharp):
    1. globalDeclaration.WriteLine("float " + VFXBuiltInExpression.DeltaTimeUnscaled + ";");
    2. globalDeclaration.WriteLine("float " + VFXBuiltInExpression.TotalTimeUnscaled + ";");
    3. Add this code in VFXUniformMapper.cs in expressionToCode getter right after switch block (around line 106):
    Code (CSharp):
    1. if (s.Key.operation == VFXExpressionOperation.DeltaTime)
    2. {
    3.    code = "(" + code + " + " + VFXBuiltInExpression.DeltaTimeUnscaled + ")";
    4. }
    5. else if (s.Key.operation == VFXExpressionOperation.TotalTime)
    6. {
    7.    code = "(" + code + " + " + VFXBuiltInExpression.TotalTimeUnscaled + ")";
    8. }
    4. Create custom particles spawner that uses unscaled delta time and put it into Runtime/CustomSpawners folder in VFX Graph code. Here's an example of such spawner with constant spawn rate:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.Experimental.VFX;
    3.  
    4. namespace UnityEditor.VFX
    5. {
    6.     public class SpawnConstantRateUnscaledTime : VFXSpawnerCallbacks
    7.     {
    8.         private static readonly int UseUnscaledTimeID = Shader.PropertyToID("UseUnscaledTime");
    9.         private static readonly int RateID = Shader.PropertyToID("Rate");
    10.        
    11.         public class InputProperties
    12.         {
    13.             public bool UseUnscaledTime = false;
    14.             [Min(0), Tooltip("Spawn Rate (in number per seconds)")]
    15.             public float Rate = 10;
    16.         }
    17.  
    18.         public override void OnPlay(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent)
    19.         {
    20.         }
    21.  
    22.         public override void OnUpdate(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent)
    23.         {
    24.             bool useUnscaledTime = vfxValues.GetBool(UseUnscaledTimeID);
    25.            
    26.             if (useUnscaledTime && Time.timeScale <= 0)
    27.             {
    28.                 state.deltaTime = Time.unscaledDeltaTime;
    29.             }
    30.  
    31.             state.spawnCount = vfxValues.GetFloat(RateID) * state.deltaTime;
    32.         }
    33.  
    34.         public override void OnStop(VFXSpawnerState state, VFXExpressionValues vfxValues, VisualEffect vfxComponent)
    35.         {
    36.         }
    37.     }
    38. }
    39.  
    40.  
    5. Add this script to your scene:
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. namespace VFXGraphCustom
    5. {
    6.     public class VFXGraphTimeSimulation : MonoBehaviour
    7.     {
    8.         [SerializeField]
    9.         private bool _testInEditor;
    10.        
    11.         private readonly int deltaTimeID = Shader.PropertyToID("vfxDeltaTimeUnscaled");
    12.         private readonly int totalTimeID = Shader.PropertyToID("vfxTotalTimeUnscaled");
    13.  
    14.         #if UNITY_EDITOR
    15.         private bool _paused;
    16.         #endif
    17.        
    18.         private void Update()
    19.         {
    20.             Shader.SetGlobalFloat(deltaTimeID, UnityEngine.Time.timeScale > 0 ? 0 : UnityEngine.Time.unscaledDeltaTime);
    21.             Shader.SetGlobalFloat(totalTimeID, UnityEngine.Time.timeScale > 0 ? 0 : UnityEngine.Time.unscaledTime);
    22.  
    23.             if (_testInEditor)
    24.             {
    25. #if UNITY_EDITOR
    26.                 if (Input.GetKeyDown(KeyCode.Space))
    27.                 {
    28.                     _paused = !_paused;
    29.                     UnityEngine.Time.timeScale = _paused ? 0 : 1;
    30.                 }
    31. #endif
    32.             }
    33.         }
    34.  
    35.         private void OnDestroy()
    36.         {
    37.             Shader.SetGlobalFloat(deltaTimeID, 0);
    38.             Shader.SetGlobalFloat(totalTimeID, 0);
    39.         }
    40.     }
    41. }
    42.  
    43.  
    6. In your VFX Graph asset, replace your spawners with your custom ones and that's it, your graph will now work when time scale is set to zero!
     
  30. ScottMease

    ScottMease

    Joined:
    Apr 2, 2019
    Posts:
    3
    I'm having trouble getting the VFX Graph working on the PS4. Is that platform supported or are there any plans to support it in the future? Thanks!
     
    DavidJamesIVE likes this.
  31. bjedlowski97

    bjedlowski97

    Joined:
    Feb 13, 2018
    Posts:
    42
    Could anyone help me, so I want to create a tornado vfx. I have a modelled mesh that I want to use as a base to have the particle reference for a shape to follow and form into. Is it possible to get them to move along the surface, or restrain there movement to the generall shape of the mesh.
     
  32. golemsmk

    golemsmk

    Joined:
    Oct 18, 2013
    Posts:
    3
    1. I think we should have a post or log somewhere to collect all the issues/requests made. Go through 12 pages to looking for someone have the same feedback with me is exhausted :(.

    2. A custom node system where I can create my node and reuse it in other VFX graph would be great :D.

    3. The spawner shapes don't support the shape's transform information. I think having that feature will help a lot :D.

    4. Can we use the mesh/ animated mesh to spawn the particles? They both on the GPU so I think that should be possible (correct me if I'm wrong).

    5. How about layer order, system's duration like the current shuriken system?

    6. I really love having something like a node to look for closest particles (for plesus or some similar effect).

    7. Can we have some kind of custom trigger event when a condition is match? Using only on update or when die is really affect some effect I need to archive.

    Encountered some bugs with math node, will report them when I know how to reproduce them again :D.
     
  33. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    https://github.com/keijiro/Smrvfx
     
    coldpizzapunk likes this.
  34. turboturboturbo

    turboturboturbo

    Joined:
    Dec 2, 2018
    Posts:
    20
    I'm trying to create a lifetime gradient effect, however I need to pass in the colors as a parameter.

    Is this possible?

    Thanks!

     
    Last edited: Jun 9, 2019
  35. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    Pasting in my reply from Reddit in case you didn't spot it:

    Suggestions
    1. How are you interpolating between start and end? Rather than using gradients could you just blend between two colors? (which you pass in as individual parameters)
    2. Could you use a gray scale gradient that modifies an underlying flat color (via "multiply" or similar)?

    Another thought - generate a gradient on the fly with C# and pass that in: https://docs.unity3d.com/ScriptReference/Gradient.html
     
    VladVNeykov likes this.
  36. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    384
    There is a Camera Fade block, particles disappear near the camera. But how can I do the opposite? Hide particles if the distance is, say, 5 or more?
     
  37. timpernagel

    timpernagel

    Joined:
    Feb 5, 2016
    Posts:
    3
    I'd like to built a flocking simluation setup based on the VEG. Did this before with HLSL based compute shaders in another engine and thought it's a good excercise to start with in Unity / VEG. But I'm stucked with this pretty basic question: If there are no nodes / blocks yet to do iterate over all particles to check for distances directly in the graph. And if not: What is the best practice to extend the set of nodes or to feed in results of CS? Are there any tutorials / ressources about this already?
     
  38. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    168
    PS4 is one of the platforms we currently fully support yes. What kind of trouble are you having and which version are you using?

    Just use a Camera Fade block with a Faded distance higher than the visible distance

    Fetching other particle data, neighbor search and built in space partitionning is planned for the 2020 cycle. In the meantime FluvioFX implements a solution that allows to fetch neighbors, so you can probably perform some flocking using it.
     
    id0 and timpernagel like this.
  39. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    Does the lightweight render pipeline currently support VFX graph's lit mesh outputs? Because in my current project it can't find the shaders for them.
     
  40. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    Unlit only for now, as far as I know. I've seen lit output for LWRP on the roadmap but I dont know how far along they are with it yet.
     
    VladVNeykov and JackDDeane like this.
  41. Vaspra

    Vaspra

    Joined:
    Apr 15, 2018
    Posts:
    29
    Hey,

    I'd like to request (or learn about if it exists) and option to disable the rendering of all VFXs in the scene I am working on in the editor/camera display. When I am working on things unrelated to VFX in the same scene as some graphs, they are constantly rendering, and I'd prefer not to disable/hide those gameObjects.

    This is obviously not damaging to anyone's workflow, but I have live feedback on my c/gpu temps and a great deal of heat/power/money is being expended over the hours I am creating content in my scene on intensive effects that are being rendered for no benefit.

    Thanks!
     
  42. potterdai

    potterdai

    Joined:
    Apr 23, 2014
    Posts:
    9
    Hello, wondering if the screen space fluid output is ready? Thank you very much!
     
  43. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    207
    Oh my, where's the atan2() node?
     
  44. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    207
    I'm having fun with the VFX Graphs, but I could not achieve some things because this is missing...
    * atan, atan2, asin, acos nodes
    * Custom Node
    * Sub-Graphs
    * Current camera's matrices (model, view, modelview, projection)
     
  45. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,423
    Subgraphs are listed as a new feature in version 6.8.0 (for 2019.2) according to the changelog. That version had a release date of a few days ago, although I havent tried it myself yet, and when I do I often grab things from github so I'm not aware of what any package manager release delays are like for that version.

    https://github.com/Unity-Technologi...19.2/com.unity.visualeffectgraph/CHANGELOG.md
     
  46. Moferad

    Moferad

    Joined:
    Dec 16, 2015
    Posts:
    5
    Any update on Ribbons / Trails?
     
  47. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    You can get custom blocks (but sadly not custom nodes) via https://github.com/peeweek/net.peeweek.vfxgraph-extras

    It would probably be not too hard to write your own custom expression nodes though add them via the asmdef hack in the above repo. That should solve your missing trig function issues.

    Custom nodes are available in master on Github now so will probably be released fairly soon.
     
    rsodre likes this.
  48. protoben

    protoben

    Joined:
    Nov 11, 2013
    Posts:
    39
    has anyone gotten the Probability Sampling or Switch to feed a Mesh into the Mesh Output?

    upload_2019-6-15_17-43-29.png

    If I connect that mesh directly it works, but if it feeds through either Operator/Logic block I get the error:

    Exception while compiling expression graph: System.InvalidOperationException: Unable to compute CPU expression for mapping : mesh

    at UnityEditor.VFX.VFXDataParticle.FillDescs (System.Collections.Generic.List`1[T] outBufferDescs, System.Collections.Generic.List`1[T] outSystemDescs, UnityEditor.VFX.VFXExpressionGraph expressionGraph, System.Collections.Generic.Dictionary`2[TKey,TValue] contextToCompiledData, System.Collections.Generic.Dictionary`2[TKey,TValue] contextSpawnToBufferIndex, System.Collections.Generic.Dictionary`2[TKey,TValue] attributeBuffer, System.Collections.Generic.Dictionary`2[TKey,TValue] eventBuffer) [0x0084e] in D:\Sourcetree3\rsvfx\midijack_LASP_VfxGraph_realsense\Library\PackageCache\com.unity.visualeffectgraph@5.13.0-preview\Editor\Data\VFXDataParticle.cs:599

    at UnityEditor.VFX.VFXGraphCompiledData.Compile (UnityEditor.VFX.VFXCompilationMode compilationMode, System.Boolean forceShaderValidation) [0x005ee] in D:\Sourcetree3\rsvfx\midijack_LASP_VfxGraph_realsense\Library\PackageCache\com.unity.visualeffectgraph@5.13.0-preview\Editor\Compiler\VFXGraphCompiledData.cs:714 : at UnityEditor.VFX.VFXDataParticle.FillDescs (System.Collections.Generic.List`1[T] outBufferDescs, System.Collections.Generic.List`1[T] outSystemDescs, UnityEditor.VFX.VFXExpressionGraph expressionGraph, System.Collections.Generic.Dictionary`2[TKey,TValue] contextToCompiledData, System.Collections.Generic.Dictionary`2[TKey,TValue] contextSpawnToBufferIndex, System.Collections.Generic.Dictionary`2[TKey,TValue] attributeBuffer, System.Collections.Generic.Dictionary`2[TKey,TValue] eventBuffer) [0x0084e] in D:\Sourcetree3\rsvfx\midijack_LASP_VfxGraph_realsense\Library\PackageCache\com.unity.visualeffectgraph@5.13.0-preview\Editor\Data\VFXDataParticle.cs:599

    at UnityEditor.VFX.VFXGraphCompiledData.Compile (UnityEditor.VFX.VFXCompilationMode compilationMode, System.Boolean forceShaderValidation) [0x005ee] in D:\Sourcetree3\rsvfx\midijack_LASP_VfxGraph_realsense\Library\PackageCache\com.unity.visualeffectgraph@5.13.0-preview\Editor\Compiler\VFXGraphCompiledData.cs:714
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    At which point the whole graph stops rendering and my console gets flooded with errors from all the scripts trying to talk to the VFX Graph.



    My Goal is to have each particle spawned be a different Mesh. If there is another way to do that Id also be all ears.

    thanks
     
    Last edited: Jun 16, 2019
  49. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    207
    Right, I haven't thought about doing it in a custom block.
    That actually solved all my problems in the cleanest way possible.
    Thanks a lot for pointing me this!
     
  50. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    357
    From what I can tell from a few experiments, there's no way to dynamically assign a mesh to a slot per particle. An output context will always render using the same mesh and if you chance it then all particles using that output will switch to the new mesh.

    I think this limitation is baked into the system - the only workaround is to have multiple outputs for each mesh you want to use and switch them on and off with conditionals.
     
Thread Status:
Not open for further replies.
unityunity