Search Unity

Define Layer in Output Context

Discussion in 'Visual Effect Graph' started by texone, Feb 6, 2020.

  1. texone

    texone

    Joined:
    Jan 26, 2018
    Posts:
    12
    Would it be possible to allow to route different outputs to different layers. I would like to use this to draw a density map that I would feed back into the vfx graph.

    Any other ideas to achieve this are also welcome.
     
  2. VladVNeykov

    VladVNeykov

    Unity Technologies

    Joined:
    Sep 16, 2016
    Posts:
    550
    Hi @texone , can you provide a bit more information, I'm afraid I don't full understand what you'd like to accomplish.

    Would you like different VFX outputs within the same effect (e.g. three different Quad Particle Outputs) to render on different Unity layers? (i.e. Default, TransparentFX, etc.) If so, that is not possible and these should be separate effects.

    If you are more interested in the render order of outputs within the same effect, then yes, you can select the VFX Asset in the project window reorder the outputs:


    If you want to simulate layers in the VFX Graph and turn things on/off, you can use a Set Alive block in your Outputs and then via logic decide which output should be rendered and which one not. Doing this in Output only stops the particles from rendering while Set Alive is false, and doesn't permanently kill the particles, so you can at any point toggle a particular output back on.


    And if it's something else, please let us know!
     

    Attached Files:

  3. texone

    texone

    Joined:
    Jan 26, 2018
    Posts:
    12
    yes this is what I would like to do, I would like to create a 2d particle system and render the particles into a rendertexture using one output assigned to one layer. This texture I would like to feedback into the system and read the values to create a kind of density based force.

    In general I think vfx graph is really such a cool tool how ever I would love to use it in a more generic way as a replacement for compute shaders.