One material from multiple

Hello, comunity. I have a static mesh (attached image), with different materials made in substance painter. I want to optimize it a bit. So I have a few materials like u see, its wood on base inner part of the mesh, painted wood on outer part and other. For now all of that use different texture set and different slot in unreal so i have extra draw calls. I want to bake it in one texture set and one material slot.
The problem is, a didn know how to use photoshop or gimp. So first what i got in mind, did anybody know how to bake all texture sets in one in substance painter or do the same in maya? If you look on image again you will see an artifact on blue wood in top left corner, thats becose i used material with texture from different part of the mesh. Also all parts in one UV set.

Sounds like something you could use layered materials for: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums
You just need to paint the alpha texture that you use for blending the material functions.

Hey, jonimake, thx for reply. What i want is improt in unreal one texture, but in substance painter i have different sets, and i cant combine it in photoshop becose of infinity padding of textures. So im looking like way around. Im thinking about ID_map and one material exported from maya in SP. But i can get how do i asigne different colour to faces in one material, so SP can create one material and i will have one texture set. Im looking an pipeline for mesh with one texture.

You could use the render to texture blueprint in UE4. It has a mode to unwrap a static mesh and then capture the material as unwrapped for the various G-buffers that you select. You will have to add the material function “UnwrapUVsforRender” to your worldpositionoffset input in the material.

https://docs.unrealengine.com/latest/INT/Engine/Content/Tools/RenderToTextureTools/2/index.html

In the latest engine versions you shouldn’t have to hook up any scalar parameters, but depending on which engine version you may have to hook them up and name them like the guide suggests. To know for sure you can see if the function “unwrapUVsforRender” has scalar parameters inside it. If it does already, you are good to go.

One note: the editor has some various issues with srgb exporting depending on your vesrion as well. If your textures are looking too bright they are likely being exported in linear space. I can help fix that if so. You just need a pow(0.4545) in the “BaseColor” material under engine.

Thank you, RyanB. Im defenetly need to test those on my meshes!
BTW on Alegorithmic forum i find that Substance Painter will have “merge all layers to one” functionality like mudbox have in nearest future. But that “material to texture” looks a lot more intresting.
Thank you again!