How convert a .obj file to .mesh file in Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 1MochaChan1

I am very new to Godot and trying to figure how to import .obj file to .mesh file.

So I made a grass in TreeIt Software that I would like to use in the Wojtek Pe’s tool for creating a pretty biome

I have imported the .obj file but when I re-import it as a mesh the debugger says it couldn’t find grass001.mtl

And I do have a .mtl file present.

:bust_in_silhouette: Reply From: cascas

You probably have given different names to your obj and mtl files. Makes sure that anything before the *.obj and *.mtl is exactly the same for both. Then you should be able to use the obj file as a mesh as they get converted to a mesh. If you still can’t use the obj then: drag the obj in a scene and right click on the mesh property. Click make unique and right click again and click save. Then save as “(insert name here).mesh”.

Hey thanks for the help and Sorry for the late reply.

I did follow your advice, your second method worked for me. Here’s what I did :

  1. Created new scene
  2. Added Meshinstance as a node
  3. Used my .obj file in its mesh property
  4. Followed what you suggested

Now I have the file.mesh with me. Do I still need to keep the .mtl and obj file in the scene or is it okay to get rid of them for now?

1MochaChan1 | 2021-01-26 15:02

I would recommend to keep some kind of backup because there is a small chance the .mesh file might not work in some later version of Godot.

cascas | 2021-01-26 15:41