How to find out the actual memory size/footprint per particle of a VFX system?

Hi!

While optimising the capacities of my VFX systems, I’m trying to figure out the actual memory footprint per particle. In other words: the size of the particle data as it is in the compute shaders underlying the VFX graph system.

I’m fairly sure I have to look at the “Current Attribute Layout” for this (see image below ), but I’m not entirely sure how to read this in terms of its actual memory footprint in bytes.

What is unclear about this to me is:

  • What do the numbered rows mean?,
  • Sometimes, a row seems to get complemented with empty memory blocks to make sets of 4
    • Why does this happen? And why does this happen inconsistently?
    • Do those count towards the reserved memory?

Clarification would be greatly appreciated :slight_smile:

Hi,

To check memory footprint of a VFX asset instance, within the VFX window toolbat, you can click on the profiling toggle when attached to an effect (see screenshot)

There’s also a scripting API to get current memory information of VFX.See VFXBatchedEffectInfo that you can retrieve from VFXManager

Memory footprint for a given system is indeed function of the stored attributes per particle and capacity of the system.

Hope this helps.

Hi,

Thank you for your answer!

However, this shows me the total memory for the entire graph, whereas I’m looking for the memory per particle, and how to read/understand the attribute memory layout per particle.

I assume there’s more that contributes to the total memory than just the particle data, which - if true - means I can’t just calculate the per particle data by dividing the total memory by the particle capacity.

You have access to the per system payload for particle attributes when clicking on an Init context with the profiling overlay enabled:

If you divide this value by the capacity, it’ll give you the payload per particle. Note that it’s not necessarily a perfect match : The current allocation scheme allocate particle 4 by 4 foir instance.