Extra cost for Exposed properties on VFX Graphs

Hey folks,

I’m fairly new to VFX Graph and do VR development. I’m trying to be mindful of memory costs and keep my VFX as optimized as I can.

One of our Tech Artists showed me the cost of write vs read/write in the System Attribute Summary and I’m wondering if there is a appreciable cost to exposed properties. As a house keeping rule, I’ve only been exposing the properties that might need to be accessed outside of the graph. I’ve noticed some of the VFX authored before I joined have almost everything exposed.

Cheers!

Hi!

Regarding attribute payload, it has a direct impact on memory footprint yes. In VFX Graph attribute payload per particle is derived at compile time for a given graph (depending on which attributes are used, and read/write where). The payload can be directly looked at per system using the new profiling overlay.

For exposed properties, it can have a bit of memory cost but this will be neglectable in general (as it is per graph instance not per particle). Basically for each exposed properties we have to keep an override per instance. It also potentially disables some optimization we perform at graph compilation for runtime (like constant folding the branches of the graph that can be statically evaluated. As soon as there’s an exposed properties as input to a branch, it cannot be evaluated at compile time anymore).

But all this should not really drive how you define your set of exposed properties for a given graph. You should more focus on building a clean and understandable interface with exposing what is needed to customize the effect based on the desired modularity. So the consideration should be more about design, authoring pipe and integration with FX artist (who create the FX) and Level Designers (who intantiate and tweak the FX in scene) rather than underlying implementation details.

2 Likes