Download

Material Properties on a Per Object Basis ?

How do you set up material properties on a per object basis ?

To be clearer, let’s say I have a material with a doze nodes, with diffuse/specular/normal textures and for base color I also multiplied it with a color. This color property should theoretically be applied per object while the material should be the same (same number of textures and lighting model). How do I go about doing this in Unreal since Material Param collections cannot vary between Material Instances for some reason ? The only option I see now is to duplicate the entire material and change the referenced parameter from a Material Param Collection.

I’m interested in doing this in either C++ or blueprints. I’d prefer C++.

Look into Material Instance Dynamic/Constance. The dynamic option allows you to create an instance of the material at runtime and change parameters. The constant option allows you to create instances of materials in the content browser where you can adjust parameters but not change at runtime. At any point if you need to change the master material, all instances of that material will receive the updates

I solved my issue using UMaterialInstanceDynamic