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

Feature Request Ability to replace a subgraph

Discussion in 'Visual Effect Graph' started by DigitalChaotics, Jan 31, 2023.

  1. DigitalChaotics

    DigitalChaotics

    Joined:
    Dec 18, 2013
    Posts:
    25
    The true purpose of this request is a workaround to allow running different capacities on the same graph.

    I have a core graph that generates output particles. I have a set of wrapper graphs that manipulate the exposed properties of the core graph. However, that locks in the capacity for the wrapper graph.

    I want to be able to replace the implementation of a selected subgraph at runtime, where the implementations would have different capacity settings. The implementations are otherwise identical.

    Whew! Gotta love the static nature of GPU code, eh?

    (I tried pawing through the .vfx file to see if I could find the wiring. No joy. It's there, of course, but I can't see it.)
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,296
    I don't think replacing subgraph will be possible, because the whole graph with all subgraphs is compiled into single entity. From what I know "subgraph" does not exist as separate graph, it becomes part of the bigger one.
     
  3. DigitalChaotics

    DigitalChaotics

    Joined:
    Dec 18, 2013
    Posts:
    25
    You're probably right. However, I'm weird: I don't mind if a graph gets compiled at runtime. I use offline rendering, so real-time isn't a requirement. Desirable, yes. Required, no.

    Hoping for more... ...even if it comes with caveats like "If you do this at runtime, then the Visual Effects Graph compiler will activate immediately to generate the necessary shader variants. That may not be acceptable for your application."