Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback on new subgraph functionality in the VFX Graph

Discussion in 'Graphics Experimental Previews' started by andybak, Jun 4, 2019.

  1. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    561
    Hi,

    I tried out the recent subgraph branch ( vfx/2019.2/feature/subgraphs ) as I've been desperate for this feature to streamline my own experiments.

    In general it seems great but I've got one concern - the workflow around taking an existing complex graph and converting it to a subgraph is fairly suboptimal because of one factor.

    If you select a group of nodes that have multiple inputs coming from the same (non-included) node then it creates new inputs for each connection. So if there's a node called "color" that feeds into 4 nodes in the new subgraph you end up with 4 color inputs. A similar problem happens for outputs.

    This makes refactoring complex graphs quite time consuming as you need to delete the duplicates and remember how they were wired up. I resorted to keeping a copy of the original graph open in a separate instance of the Unity Editor so I could refer to it.

    I can't imagine a scenario where this is the preferred behaviour. Is there a reason it was chosen or is it a case of "it was easier to implement this way"?
     
    Last edited: Jun 4, 2019
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,875
    Second this observation, without this current behaviour the system would be an absolute dream, instead its a bit fiddly right now having to keep everything in my mind so I can reconnect as meant to be.
     
    andybak likes this.
  3. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @andybak and @GameDevCouple_I
    If you have the same input used multiple times, you can then include it in the selection for the operator subgraph. I believe it will do what you are asking - you will have only 1 input of that type. It will also not remove the input from the graph where you created the subgraph from, thus preserving your connection:
     

    Attached Files:

  4. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    561
    Hi.

    I'm talking about another eariler node having multiple outputs.

    For example:

    Capture.PNG

    Everything to the right of the blue line belongs in a subgraph.

    I expected a single output from each of the two "Sample Texture2D" nodes. I.e. The resulting subgraph would have two Vector4 inputs wired up exactly as the originals were.

    What actually happened is that I get 8 inputs - 2 Vector4's for the pink lines and 6 float inputs for the green lines.
     
  5. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    306
    Yes it's a choice on our side. But this is a first implementations and we may improve it. We're always looking for feedbacks :)

    In the meantime, probably inserting an inline parameter in between can do the trick.
     
    MadeFromPolygons likes this.
  6. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    561
    OK. So I presume a really common workflow is "take a complex graph and split it into subgraphs".

    The example I posted above is probably a moderately realistic real world example. As mentioned I had similar problems with both inputs and outputs.

    The current functionality creates a lot of work when I want to refactor a complex graph. Am I doing something wrong in my original design? Is the example I posted unusual?

    If so then it would be useful to get an idea of how I can improve my workflow.

    If not - then surely there's a flaw in the current design?

    I guess another way of putting this is "how have you handled this yourselves when you're using the new functionality of something moderately complex?" Did you hit similar problems?
     
  7. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    306
    We're still in preview, there are rough edges in the UX everywhere. Plus the subgraph branch is not merged, you can expect some issues on the branch, it's not even yet part of the preview package. We still need to test it deeper ourselves, especially in a production like environment.

    This is our initial design, nothing is carved in stone and if there are some flaws in it, be sure we'll address them. Subgraphs are a big addition to VFX Graph we're very excited about, we're sure it will improve the workflows a lot. But it's a huge feature, it will get better and better over time.
     
  8. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    561
    @JulienF_Unity Thanks. I just wanted to draw attention to this particular flaw as I felt it was pretty central to most common workflows (but hey - doesn't everyone thing that about their issues?)
     
  9. doomquake

    doomquake

    Joined:
    Sep 2, 2019
    Posts:
    13
    Hi - just evolved to this topic. Is there a way to expand subgraphs or is this operation by design un-expandable? Could be cool to save frequently used groups as presets without having to manually create .vfx libraries of gadgets.