# how to combine png,mtl and obj files and then export them as a gltf

totallly new to CG and havent a clue! :slight_smile: Please would someone tell me how to combine (simply) a png, mtl and a obj to create a gltf? Please bare in mind I have PTSD and am only beggining. You will have to spell it out. any help would be greatly appreciated as I have struggled with this for months now. thank you in advance

• Well, to clarify things for you (I think). Objects are textured with materials which are either made of procedural textures or bitmap texture maps. Many bitmap textures are in .png format. Separately - obj is an export format, akin (but slightly different) to GLTF. Often when you export an object in .obj format, you have the option to include materials which are then exported as an .mtl file (a companion to the .obj). GLTF is a different format - You cannot export an obj to gltf, but you can export a blender object (possibly with attached png materials) directly to GLTF. Sep 3 at 22:03
• thank you but how? what do i do. I have a png, obj and mtl file. what is the procedure to export as gltf? sorry for ignorance. trying to learn blender is very difficult for me. your patience will be greatly appreciated. Sep 4 at 8:14

It's hard to tell without knowing what your objects and textures are and what their relation to each other happens to be for your specific object. However, I would assume that someone exported an object from blender as an .obj file and selected "export materials" so it generated a .mtl file. This mtl (material) file should be imported when you import your object, but in case it doesn't, I suppose, the person also included the texture as a .png file (unless the .png is just a preview of what the model looks like).

1. Open a new (empty) project in blender

2. Choose File > Import > Wavefront(obj) from the top and pick your object file.

3. The import should have imported the material file as well so long as it is in the same folder as your.obj (model). To check, press Z in the 3D viewport and select either "Material Preview" or "Rendered" from the pie menu. If the materials loaded you should see them.

4. With your object selected, choose File > Export > glTF2.0 from the top. In the export setings (right side of the window that pops up), under Include, check the "Selected objects" box and check under Geometry to make sure Materials are set to Export. Don't forget to name your file and pick an export location. Once this is done, click Export glTF2.0 in the bottom right.

5. Last step - pray everything worked. I have had success and failures exporting to glTF in the past (exporting to Godot game engine). Sometimes some tweaking needs to be done. Frustrating nights, but a good opportunity to learn the "quirks" of blender exports as well.

If this doesn't work, and you're comfortable sharing your file, you can upload it at this link and then edit your question to post the link they give you - https://blend-exchange.com/. Letting users access your file is a quick way to get answers, but we understand not everyone wants to share their private (or purchased) products.

• you are very kind and fantastic! I will follow the steps carefully and let you know if I may? Sep 4 at 9:47
• Sure. Let me know if you have any problems. Sep 4 at 10:01
• It worked great! thank you thank you! but it didnt export the animation. Is there a way to do that? Sep 7 at 17:43
• I uploaded it to blender-exchange too but no one seems to know Sep 10 at 11:18
• OBJ files cannot store animation – are you sure the animation is visible in Blender? If so, and it still isn't exporting, you may need to share a link to the .blend file on blend-exchange. Sep 14 at 5:56