Godot: .obj material surfaces aren't imported.

Created on 29 Jun 2017  Â·  17Comments  Â·  Source: godotengine/godot

Operating system or device - Godot version:
LMDE - Godot master branch.

Issue description:
Godot ignore surfaces included in "Wavefront" .obj files. Whatever the amount of materials in the model there is always one material in MeshInstance inspector.

Steps to reproduce:
-Create a mesh with several materials in your favorite modeling software and export the model as a .obj file.
-Include this file in a MeshInstance.
-Check the number of materials in the inspector.

bug editor plugin

Most helpful comment

This ability has been restored. Rejoice.

All 17 comments

(tagging as 3.0 since the original report is for that version. I guess it also applies to 2.1 though)

There's something new today.
I import the obj file into Wings3D and create materials inside, then export the model again.
In Blender that new file are split into several objects.

capture du 2017-07-02 19-42-17

I export the model a last time and Godot displays all the materials slots.

capture du 2017-07-02 19-53-35

I'm not experienced in 3D modeling so I can't say if it's an acceptable workflow or simply a cumbersome workaround.

Obj import as a single mesh, for scenes you have to use collada

On Jul 2, 2017 2:57 PM, "DriNeo" notifications@github.com wrote:

There's something new today.
I import the obj file into Wings3D and create materials inside, then
export the model again.
In Blender that new file are split into several objects.

[image: capture du 2017-07-02 19-42-17]
https://user-images.githubusercontent.com/12350741/27772258-a387c234-5f5e-11e7-8550-df9a552e3b69.png

I export the model a last time and Godot display all the materials slots.

[image: capture du 2017-07-02 19-53-35]
https://user-images.githubusercontent.com/12350741/27772328-35c4c8c6-5f60-11e7-85b3-2bdd368b2e62.png

I'm not experienced in 3D modeling so I can't say if it's an acceptable
workflow or simply a cumbersome workaround.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/9445#issuecomment-312506842,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z23wH7tAgNZGkAOd8XG0CbgzQl5wHks5sJ9oDgaJpZM4OJGY1
.

Yes but .obj files allows several material surfaces in a single mesh, I noticed this in Blender, and this format is simple and can be opened everywhere.
Are you OK to not support fully this format ?
If it is the case feel free to close.

No.. they should be added

On Jul 2, 2017 3:27 PM, "DriNeo" notifications@github.com wrote:

Yes but .obj files allows several material surfaces in a single mesh, I
noticed this in Blender, and this format is simple and can be opened
everywhere.
Are you OK to ignore the surfaces stored in .obj file ?
If it is the case feel free to close.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/9445#issuecomment-312508487,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z29_8OHYNSFd5D26lVe7p8c0jKwZVks5sJ-ESgaJpZM4OJGY1
.

No problem ! This is not an emergency, it was just to clarify.
Thanks for your posts.

Something has changed. I try to understand how to manage .obj files now. The import dock stays empty and I can't select the file for the meshinstance.

@DriNeo Godot now imports the obj as scene, try to open it (double click) and create a new inherited scene like with dae files.

@eon-s The MeshInstance node still exists, how to load a mesh ?

The problem is that generally OBJ files may come with many objects, so this
workflow was a bit broken.
The idea, if you want individual meshes, is to import the scene, then ask
to save the meshes separatedly. At the end it should be about the same.
Will do some work today to make this clearer.

On Sun, Jul 23, 2017 at 1:43 PM, eon-s notifications@github.com wrote:

@DriNeo https://github.com/drineo Godot now imports the obj as scene,
try to open it (double click) and create a new inherited scene like with
dae files.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/9445#issuecomment-317265715,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z224kz4dix8FqeIfZIPu1Y0po8YABks5sQ3hAgaJpZM4OJGY1
.

An option/plugin to save meshes on a scene as resources could be handy, or an extra option in the mesh button (the one that allows to create collision shapes) as a shortcut.

I'm also adding an option to save children of root nodes as sub-scenes,
that should help to make multiple instantiable objects with collision easily

On Sun, Jul 23, 2017 at 2:17 PM, eon-s notifications@github.com wrote:

An option/plugin to save meshes on a scene as resources could be handy, or
an extra option in the mesh button (the one that allows to create collision
shapes) as a shortcut.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/9445#issuecomment-317267953,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2y3-rY4t7NnHP0QkYtQ-Q_L8SgBLks5sQ4AwgaJpZM4OJGY1
.

Done, added a few presets for this so you can choose your best workflow:
image

Since this update the import dock displays nothing on my machine if I select an .obj file (works fine for other resources). I have these import options for .dae.
Did I miss something ?

I think probably the OBJ importer code should be isolated and made to work
for both scenes and meshes then

On Mon, Jul 31, 2017 at 2:20 PM, DriNeo notifications@github.com wrote:

Since this update the import dock displays nothing on my machine if I
select an .obj file (works fine for other resources). Did I miss something ?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/9445#issuecomment-319134732,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2_-_Msq6dKB40BsKg9Y8d6ExftX5ks5sTgzvgaJpZM4OJGY1
.

the original issue is fixed, will leave this open to remind me to fix old obj workflow

This ability has been restored. Rejoice.

Was this page helpful?
0 / 5 - 0 ratings