How can I take advantage of " Mesh Renderer Array Visibility Mode" UE 5 Niagara

Hello guys/girls

I am in a situation where I am trying to use around 10 meshes in the mesh render. But inside the “Initialize Particle” under the “Mesh Attributes” I see “Mesh Renderer Array Visibility Mode” - I did not know how to use this one.

What I am looking for is, to tell the Niagara system, which one of the 10 meshes from the Mesh Renderer to use based on input given by a “User parameter” to select one specific mesh among the 10. Is " Mesh Renderer Array Visibility Mode" a useful one for this case? or is there another way to do this? Please let me know. Thank you.

You are in the right direction. You should set an int32 user parameter and assign it to the “Mesh Renderer Mesh Index” after choosing “Direct Set” of the Array Visibility Mode. So the int32 user parameter value determines exactly which index of the static mesh in the mesh array to be chosen. You are really just setting the Particles.MeshIndex attribute and you can modify it willy-nilly even in Particle Update stage.

image

image

2 Likes

I think I may have framed my question wrong. Yes I am using a “Int32” in “Mesh Renderer Mesh Index”

However inside the Mesh Renderer - I am using “Material Override” and using multiple meshes inside one single “Mesh Renderer” when that is the case, how do you select which mesh to render from the Array of meshes and Array of Materials ?

I think @ifurkend already explained that you are in the right direction. Selecting which mesh to render from the Array of meshes and Array of Materials is what the int32 user parameter value is supposed to do. But you also have to assign a render visibility number to each mesh renderer in your emitter beginning with 0 (if you haven’t done that already).

But this is not working with “Material Override” , in the case of using “Material Override” what will you do? It only picks the top material from the Material Override.

But this is not working with “Material Override” , in the case of using “Material Override” what will you do? It only picks the top material from the Material Override.

AFAIC the material override is not meant to be switchable and its array is more or less for mesh which requires more than 1 material (e.g. an automobile with steel and glass materials). In your case it would be better to modify your material so that it can be manipulated via Dynamic Material Parameters.

1 Like