Combining textures from Substance Painter?


I am new to gltf and are a bit confused how things work. The sample model Damage Helmet used Substance Painter for texturing and materials. From what I understand it has several materials that share the same textures. How do I do that? When exporting gltf from Substance Painter I get a texture set of basecolor, normal and orm for every material that I have on the model. I want to keep each material but I want them to share texture set like the model Damage Helmet. Can someone please help me?

@Friidilinen, this comes down to UVing your model to share textures. You will typically want to split your materials based on your target texel density (how much of your texture each UV island uses) and if you need any specific settings for a material. By this I mean if you have parts of your model that need transparency of any type, you need to set the blend mode of the material to the appropriate method (i.e. blend or mask) but you don’t want parts of the model that have no transparency to share that blend mode but want those materials set to opaque blend mode. This helps with sorting issues where you don’t have access to the depth buffer when drawing transparent meshes without extra cost in the shader.

Most often textures are shared between parts of models or between different models to help with optimizing the scene due to fewer texture loads. For example, if you have a tiling wood texture, you can use that same texture for every mesh that needs the same wood material and the UVs for the mesh will determine how the textures will be rendered on the mesh surface.

There is a good tutorial series about trim sheets if you search " Planning & Creating Trim Sheets For Games - Trim Texture Tutorial Part 1" on YouTube (I can’t post a link yet). This is not exactly the question you are asking, but it introduces the concepts and planning necessary to reuse textures across many materials. It doesn’t matter where the textures are created, it could be Substance Painter, Quixel Studio, Mari, Photoshop, GIMP, or any other package… the process will be the same because the major planning is done in how you UV your models. Hope this helps.


Agreed with all of Patrick’s comments!

Searching for the term “texture atlas” and your software package of choice will probably give other tutorials and ways to set this up. Here’s a relevant thread for Substance Painter:

1 Like

Thank you so much for the answers! I still don’t really understand. I have one UV but two materials from maya because I need to have opacity blend mode on one of the layers. The textures are not tiling since they are made for one mesh only. So they share textures but are divided due to the two materials. But I want them to share textures in the engine but still with two materials.

For an example, when I open this one in substance painter it has several materials (texture set in substance painter) but there are only one set of textures in the folder.

Do you think I will be able to do that if the textures are tiling?

Thank you for your answer! I will absolutely look into texture atlas and see if it can help me.

@Friidilinen, I’m not sure if I am completely following the context here… screen captures are always helpful to help understand the context. However, from what you are describing it sounds like you are splitting materials due to blending modes needing to be different on specific parts of the mesh. From that standpoint, you can create the two different materials based on what needs transparency and assign the same textures to both materials in Maya.

The exporter should take care of realizing that both materials are using the same texture and only write one set of textures in your export location. If you are exporting as a glTF and not a glb, you will be able to easily see that there should only be one set of textures. It doesn’t matter how many materials point to the same textures, you will only need to load them once.

For this, it doesn’t matter if the textures are tiling or not. Simply pointing the Maya materials at the same textures will allow the exporter to know that you only need one set. You can also manually open the glTF file and change any links you want if you need to, but you shouldn’t have to worry about that as the exporter should take care of only writing one set of shared textures.

Oh yes of course, screen captures! Will attach that!

I export the file from substance in gltf so I get the gltf file, and textures. But I get two set ups of textures Frame and Net.

How can I point the maya materials to the same textures?
How can I open the glTF file? (I am only an artist so not so good at programming).

1 Like

Don’t know if you see the text well but the blue is one material which will have the opacity and the red dots is for the material without opacity.
In the bottom I attached the textures I get from substance, one basecolor, normal and orm for Frame and one basecolor, normal map and orm for Net.

@Friidilinen, I understand what you are going for now. Thanks for the screen shots as they are very helpful.

What you want to do is separate the mesh that holds the net from the mesh that represents the frame. You also don’t need that much resolution in the net mesh… it could be a quad and work just as well. The reason for this is that glTF can assign materials based on mesh but not face. So only one material can be assigned to any mesh. This is a good way to think of your material breaks as they will be assigned to a different mesh in your outliner. In this case you will have two meshes and two materials in your scene.

I am going to assume that since you are using Maya that you are using the Babylon.js exporter for Maya: github[dot]com/BabylonJS/Exporters. so you will want to use Arnold materials for your meshes. Docs for this can be found at doc[dot]babylonjs[dot]com/extensions/Exporters/Maya_to_glTF. You will create two materials and just point the basecolor, metallic, roughness, normal, etc. to the same files on disk.

Once you have the file exported, you can then check the file in the Babylon.js sandbox at sandbox[dot]babylonjs[dot]com where you can just drag and drop your glTF files (if you export as a glb just drag that file, otherwise you will want to select the glTF file, the bin file, and all texture files and drag/drop the group of files in the sandbox window). You can also drag/drop an hdr equirectangular HDRI onto the sandbox to test out different lighting as well.

Sorry for the not-really-a-link-links. I haven’t posted enough on this forum to be able to post links yet. Let me know if you have more questions.

Thank you thank you thank you for all your help! I will definetly lower the resolution for the net mesh. I realized that I showed the mesh a bit bad since it already is two different meshes at the moment, one for the net and one for the frame. Does that make a difference?

And, do you mean that when I’m done in substance I go back to maya and put in the textures there and then export the model with textures with babylon and then I will have one gltf and one texture?

1 Like

@Friidilinen, yes, my workflow usually goes back into Maya for final export to glTF. Substance is great for simple glTF exports, but if you need things like animation or morph targets you will need to go back to a modeling DCC first. The Babylon exporter for Maya will do all of the optimization for you in your glTF file. so you should only need to worry about linking the same file in each material and the exporter will handle the rest.

Thank you so so so much for taking the time to help me! I will try it out right away and hope it work out as good for me too!

Again, thank youuuuuu!!!

1 Like

Just wanted to let you know that it work perfectly! Thank you so much for all your help!