Importing OBJ won't use MTL  [Solved]

Get help and support for using Cubik Studio.

Importing OBJ won't use MTL

Post by RootPC » 02 Nov 2016, 11:42

Hello again. I can't seem to get Cubik Studio to use the included MTL file generated by Metasequioa. I've tried several different ways, but can't get it to work. Can anyone help me please?
x
User avatar
RootPC
Early Adopter
Posts: 14
Joined: 15 Mar 2015, 03:26

Re: Importing OBJ won't use MTL

Post by epicskymi » 02 Nov 2016, 15:18

is this even possible if so id like to know as well
x
User avatar
epicskymi
Early Adopter
Posts: 17
Joined: 02 Nov 2016, 02:30

Re: Importing OBJ won't use MTL

Post by Zorigami » 02 Nov 2016, 15:56

I'm having this issue as well.
x
User avatar
Zorigami
Early Adopter
Posts: 13
Joined: 27 Mar 2015, 17:29

Re: Importing OBJ won't use MTL

Post by Sphax » 02 Nov 2016, 18:29

When you import a OBJ, Cubik also imports MTL and PNG(s).

To proceed, Cubik needs to know where to look for MTL and PNG(s) files. Most of the time, MTL and PNG files are aside OBJ file or in a folder aside with valid paths indicated in the OBJ file (on top) but some 3D software do not create OBJ files with valid relative paths...

Please, post your OBJ+MTL+PNG files (in a ZIP) or open your OBJ file (with a text editor) and verify the line beginning with "mtllib" followed by the name of the MTL file. If this line is missing or name or path is invalid, Cubik can't import MTL.

Several times, the problem can also happen because texture paths are invalid in the MTL file itself. To be sure that texture paths are valid, open MTL file (with text editor) and look for lines beginning with "map_Ka" and "map_Kd". Both should be followed by your texture name. MTL file can contain several lines like that. Be sure to verify validity of each one.

:3d:
x
For support, use forum (not DM or PM or email) and create your own topic :3d:
User avatar
Sphax
Admin
Posts: 1311
Joined: 10 Nov 2011, 10:44

Re: Importing OBJ won't use MTL

Post by WizardCM » 03 Nov 2016, 00:11

Hi Sphax, the files we're working with have been attached below.

From what I can gather, our models mostly use material colours rather than texture files. Let me know what we could be doing differently to fix this.
Attachments
Testing.zip
(199.86 KiB) Downloaded 100 times
x
User avatar
WizardCM
Early Adopter
Posts: 10
Joined: 03 Jan 2015, 08:30

Re: Importing OBJ won't use MTL

Post by Sphax » 03 Nov 2016, 07:39

Material colors is not supported currently
x
For support, use forum (not DM or PM or email) and create your own topic :3d:
User avatar
Sphax
Admin
Posts: 1311
Joined: 10 Nov 2011, 10:44

Re: Importing OBJ won't use MTL

Post by WizardCM » 03 Nov 2016, 08:46

Sphax wrote:
03 Nov 2016, 07:39
Material colors is not supported currently
That explains it. As long as it's on the to do list.

In the meantime, we'll find a way to make ourselves a temporary bypass. Thanks!
x
User avatar
WizardCM
Early Adopter
Posts: 10
Joined: 03 Jan 2015, 08:30

Re: Importing OBJ won't use MTL

Post by WizardCM » 03 Nov 2016, 11:52



I put together a python script to read mtl files and convert the material to a texture. Huzzah!

But I've run into a new issue - it seems the correct textures are displayed, but aren't actually loaded. When any edit is made, or when trying to convert the file to voxels, it resets to one colour. Any suggestions?
Attachments
tree_test_2.zip
(20.44 KiB) Downloaded 98 times
x
User avatar
WizardCM
Early Adopter
Posts: 10
Joined: 03 Jan 2015, 08:30

Re: Importing OBJ won't use MTL  [Solved]

Post by Sphax » 03 Nov 2016, 18:59

Currently Cubik only fully supports meshes with one texture. Multiple textures on one mesh will cause some issues like the one you have. To avoid that, use only one texture or use multiple meshes with one texture per mesh in your model.
x
For support, use forum (not DM or PM or email) and create your own topic :3d:
User avatar
Sphax
Admin
Posts: 1311
Joined: 10 Nov 2011, 10:44

Re: Importing OBJ won't use MTL

Post by RootPC » 03 Nov 2016, 22:28

We have the model and colours working perfect now. Bit of a workaround, but it works and gets us going forward with our project. Thanks Sphax for the continued support, very helpful. I do hope in the near future the process will be simplified, but doing it this way has taught us a lot about the programs we use.

Image
x
User avatar
RootPC
Early Adopter
Posts: 14
Joined: 15 Mar 2015, 03:26

Post Reply

Return to “Help Centre”