Importing OBJ won't use MTL [Solved]
Importing OBJ won't use MTL
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?
0 x
Re: Importing OBJ won't use MTL
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.
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.
0 x
Re: Importing OBJ won't use MTL
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.
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 400 times
0 x
Re: Importing OBJ won't use MTL
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!
0 x
Re: Importing OBJ won't use MTL
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 391 times
0 x
Re: Importing OBJ won't use MTL [Solved]
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.
0 x
Re: Importing OBJ won't use MTL
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.
0 x