Separate two different types of material with blending mask

I have a massive space ship with hundreds of UDIMs that I need to convert to Unreal Engine.
The ship is rendered in VRay with two different types of material, one is car-paint and one is standard metal-rough PBR. The materials are split by using a blending mask from Substance Painter.

My question is is there a way to do this in Unreal Engine 4? I can do split same type materials using Material Attributes Expressions node, but the master material would still be same type. I would instead need ability to mix two very different types of mats.

I would need to be able to create two unique materials with very different characteristics and assign it by using the blending mask.

the resulting material will be heavier though.

Create Material A and Material B via MakeMaterialAttributes.

Blend them via BlendMaterialAttributes at Material C.

Thanks! However I still can’t understand how to actually map this to the model. I can create the function with BlendMaterialAttibutes and apply it to the Material C.
However the Material C can only have one Shading Model at once. So we can’t blend glass with metal for example, right?

Looks like you are right. The material compiler only takes in as a certain type at the final material. So for that case, it would have to be two different materials.

a mixed metal material should work just fine.
metalness can be a texture of 0s and 1s