Page 1 of 1
OBJ importing too many materials.
Posted: Sat May 12, 2018 11:07 pm
by Renart
Hello!
Quick question!
In Maya or Blender, I have 2 separate cubes, one with a red material, one with a blue material.
If I export the red cube only and import it in Octane, there will be 2 material inputs, one red and one blue.
But if I re-import the same obj to Maya or another software, the blue material is not showing. So it's only a Octane thing.
It's very problematic when I have a huge scene and I want to export only one small object. All the others materials of the scene will also be imported, creating a very long node full of useless inputs in Octane.
What would be the best solution to avoid that?
Please do not say I should use other formats, I'm just asking about obj here
Thanks!
Re: OBJ importing too many materials.
Posted: Sun May 13, 2018 9:34 am
by Phantom107
Octane only deals with the data it's given. It s possible the exporter is including materials in the MTL that are not present in the OBJ's geometry (reference:
https://en.wikipedia.org/wiki/Wavefront_.obj_file). Try simply deleting the MTL file and then import the OBJ in Octane.
Re: OBJ importing too many materials.
Posted: Mon May 14, 2018 4:09 am
by Renart
Thanks! It works.
I'm wondering if there is a way for Octane to avoid reading useless information like this from the files..
But it's a good work around, thanks.
Re: OBJ importing too many materials.
Posted: Mon May 14, 2018 1:06 pm
by Zay
Hide/remove what you don't need before you export. I do it all the time in Modo and Poser.
Re: OBJ importing too many materials.
Posted: Thu Oct 18, 2018 7:18 am
by m0th
I'm running into this as well in 3.08.3 Standalone when exporting an .obj from Maya.
I've tried deleting the unnecessary materials from the .mtl text file.
Tried deleting the entire .mtl file
Tried deleting all of the extraneous materials in my Maya scene
Tried exporting with materials unchecked
Tried exporting with just face sets
None of which worked for me.
I have come across something odd. If I export the obj with all options set to off, no Groups, no Point Groups, no Materials, no Smoothing, no Normals and overwrite or leave the name exactly the same as the original obj with unnecessary materials, it still exports with all of the unneeded materials, or the .mtl file isn't being overwritten.
Now, if I change the file name to something like test.obj on export with all of the same options listed above, the obj will import into Octane with only one input (none of my materials). If I turn materials on during export and overwrite the same file (test.obj), still only one input... it's just called Diffuse Material.
Next, I exported another obj called test2.obj with only Materials enabled during export. All of the materials including the unnecessary materials show up again in Octane.
Finally I deleted all of the extra materials in my Maya scene and called the obj test3.obj. It then imported with the correct materials, kind of. It still brought in the initialShading group node, which Maya won't let me delete.
Needless to say, this is far from an ideal workflow.
I've only recently started using octane over the past few months and I was hoping this was just an isolated incident or two, but it's starting to do my head in. I've kind of just been putting up with it, chalking it up to lack of experience with the software. Alternately I've tried alembic, but Maya won't let me overwrite the .abc file while it's open in Octane. I'm also getting weird scale issues with Alembic, even with World Space option on during export. Obj is usually the tried and true method, so it would be nice to get that working smoothly.
I hope that makes sense. Any help would be much appreciated. Thanks!