How to set specular of all materials to 0 easy ?


Is it possible to set the specular of all materials to 0 in an easier way than opening every each material ?
I have a lot of materials and opening every each material is very inefficient and time consuming.

Thank you !

Material parameter collections:

That’s not what I meant.

I have many objects imported from another program. Every object has many textures. When these objects are imported in Unreal there are many materials created. By default every material has specular 0.5. I need to set the specular to 0 to all these materials and leave it to 0. I don’t need to change the specular afterwards (i.e. at runtime). So what I need is a way to set the specular to 0 without opening all these materials manually. Is this possible ?

One alternative would be to make the default specular to 0 at import. Is this possible ?

Thank you !

I think there is some way to set all your materials to Full rough.

But editing BasePassPixelShader is probably easiest way.

Just add these lines there.

GBuffer.SpecularColor = 0;
GBuffer.Roughness = 1;

Generally, for adherence to PBR standards, you actually want to set your specular to 0.5 universally.

Import them with materials and choose a material in the Base Material Name during import (under materials) that you want to copy the settings from. If the name of the material of the model is the same as the one you choose here they will use that material, if they are different a new one will be created. You can try creating a master material and an instance from that and choose the instance as the Base Material Name.

Also material parameter collections are not only used for runtime things.

Thanks Kalle_H and cyaoeu. Both methods worked.

One more question: is it possible to define a parent material for an object after it has been imported ? I want to avoid a reimport.

Thank you !

Actually I checked more closely and the Base Material Method doesn’t change anything.

How does it not change anything? You should get new material instances with the values you want.

You can test this by exporting some meshes (a cube/sphere with a material) from your modeling software. Create a new material in the editor and create parameters for color/roughness/specular and set the defaults to whatever you like (specular 0). Import the meshes and set the material you created to be the Base Material. You don’t need to change the dropdown values, they can be blank. If you click import all new material instances will be created with the names you chose in your modeling software and applied to the meshes. This is a new feature added in 4.14.

Sorry to bump an old thread, but I have the same problem.

The solution suggested by cyaoeu does not work for me. Is there another way to accomplish this?

Bump, would also love to know if there is a way to do this.