Search Unity

No visuals if Bounds is off screen. Should I be manually settings a large bounds?

Discussion in 'Visual Effect Graph' started by dgoyette, May 21, 2020.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I'm making an explosion VFX effect. I noticed that if I glance away from the explosion's center, it stops rendering. I realized it's because the VFX graph is only rendered if some portion of its Bounds is on-screen.

    This is easy addressed simply by manually setting a Bounds in the VFX graph that I feel is probably sufficient to fully contain all of the effect. But I wanted to know if that's the recommended approach? It feels fragile. If I end up making the explosion a little bigger, I might forget I need to update the bounds as well.

    Anyway, is there anything like Always show effect, even if the bounds aren't in the camera frustrum? Or do people manually set a large bounds, or perhaps compute a bounds based on various parameters to the VFX graph?
     
    florianhanke likes this.
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Hi, Bounds are set in initiliaze context and have ports, so you can make the size of the box function of the force of emission of you explosion in the graph for instance.

    There's no "always show" an effect, there are always culled regarding to bounds. However you can specify the update behaviour (but not the rendering) in the asset inspector. You can for instance set your fx to be updated even when culled (for punctual explosion this is probably the behaviour you want)
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Thanks for the confirmation. I'm currently just using a large Bounds, manually set. I was surprised that VFX don't have a dynamic bounding box, like a Shuriken particle system, but maybe that's just one of the trade-offs of doing things on the GPU?