How to create a unique dynamic material instances for multiple mesh instances?

In my existing (working by the skin of its teeth) BluePrint I have been able to create multiple instances of the same mesh and drive their individual x,y,z location and a,b,x rotation from a csv sheet

I now want to control the colour of each mesh instance individually, and also drive this from a csv sheet (all location, rotation and colour data is being generated in rhino+grasshopper as this project will end up having 1000+ mesh & colour instances)

I’ve been able to get the colours to change but all the mesh instances change to the same colour instead of mesh 1 changing to colour 1, mesh 2 to colour 2 etc

I’ll put screenshots below of the Material Graph, MaterialParameterCollection, CSV & Blueprint






Any and all help is greatly appreciated
Cheers

2 Likes

You’re creating a dynamic material instance for each mesh, but then not using it ( see output pin ). It would work, if you did this and set the color on each instance as a vector parameter.

Problem with a material parameter collection will talk to all of them at once, that’s the point of it :slight_smile: Even if you got the instancing working, they will still all set the same way.

Another, easier maybe, way to do it, is to have the same material on them all and use custom primitive data

1 Like

Yeah, I’m seeing the creation of the DMI, but no usage of it.

1 Like

Work with a testing actor to get familiar with DMI’s and Parameters

Create a simple Material class

Then create a Material Instance from it.


Simple Actor class

Construction Script… create a DMI and set a reference variable.

Begin Play…

2 Likes