How to Control Override Materials in a Niagara System Mesh Renderer?

I want to use the material at index 1. Can you help me?

Hi @Figix,

Can you elaborate more on the issue you’re having? It looks to me like you are using the material overrides correctly. All you have to do is assign the material you would like to the area you have highlighted. If the material isn’t previewing (like shown in photo) this is likely becuase of some logic within the material- the override is still indeed happening.

By default, the material at index 0 is used, but I want to randomly use either index 0 or 1. However, I don’t know how to specify and change the material index.

@Figix Ah, okay! Material indexes are used to set specific material slots on meshes, they don’t work quite like traditional array indexes, so you’ll need a different solution instead. Unfortunately, there aren’t a lot of options to procedurally alter the renderer itself, so we’re going to have to work around that a little bit.

First, you’re going to have to duplicate your mesh in the content browser, and assign it’s default material as the material you are trying to put in slot 1.

Then, in your mesh renderer, add this new mesh as a second mesh index.

Then, you can go up to your Initialize Particle, and set the “Mesh Renderer Array…” to Random.

Then, you should be able to see your new mesh/material populating your particle system.

Good luck, and let me know if you need any more help!

wow~! thanks. that’s cool.