0
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ 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. $\endgroup$ Sep 3 at 22:03
  • $\begingroup$ 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. $\endgroup$ Sep 4 at 8:14
0
$\begingroup$

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).

Regardelss Your steps should be:

  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.

$\endgroup$
6
  • $\begingroup$ you are very kind and fantastic! I will follow the steps carefully and let you know if I may? $\endgroup$ Sep 4 at 9:47
  • $\begingroup$ Sure. Let me know if you have any problems. $\endgroup$ Sep 4 at 10:01
  • $\begingroup$ It worked great! thank you thank you! but it didnt export the animation. Is there a way to do that? $\endgroup$ Sep 7 at 17:43
  • $\begingroup$ I uploaded it to blender-exchange too but no one seems to know $\endgroup$ Sep 10 at 11:18
  • $\begingroup$ 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. $\endgroup$ Sep 14 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.