I am struggling to retrieve a Niagara Int Array from a Blueprint. While researching this topic, I came across the "Niagara Get Int32 Array" Node, but it is not working as expected. For some reason, I only get a valid Array returned when I try and retrieve a User exposed Parameter, but when I try and get a System or Emitter Array, it does not return a valid array.
This returns Length 0 (4 is expected)
This returns Length 4 ( as expected)
My Question is it possible to retrieve System or Emitter Arrays from Niagara Systems and pass them to a blueprint? Am I using this Node correctly? Or should I be doing this with a 2D grid and a Texture which is interpreted in a shader later?
Any help is appreciated
Export Particle Data interface is super limited and also does not deliver persistent particle indices over multiple frames. Additionally, it only allows to output two vectors and a scalar parameter, not an array or list of values.
It turns out that it is not possible to retrieve an array from a Niagara GPU emitter. The solution was to use Grid Collections instead of arrays and output those as Render Target Textures that would encode the desired information. These textures can then be interpreted by a custom compute shader or via a blueprint ( this is only advisable if you are going to code your own ReadRenderTargetPixel function, since the native one blocks the render thread)