Agisoft Metashape

Agisoft Metashape => Feature Requests => Topic started by: David Cockey on July 07, 2013, 05:23:58 AM

Title: OBJ Texture Names Chunk Specific
Post by: David Cockey on July 07, 2013, 05:23:58 AM
When OBJ meshes are exported use the chunk name instead of "Textured" for the "material" in the associated .mtl and .obj files.
.mtl file: "newmtl Textured" becomes "newmtl ChunkName"
.obj file: "usemtl Textured" becomes "usemtl ChunkName"

I export multiple chunks as OBJ meshes from a single project. I then have to go in and manually edit the sets of .mtl and .obj files so that the names of the "materials" are different for each mesh.
Title: Re: OBJ Texture Names Chunk Specific
Post by: Alexey Pasumansky on July 10, 2013, 05:13:19 PM
Hello David,

And what application requires that?
Material and texture files have the corresponded naming with OBJ. Isn't it sufficient for most applications? Or there is another reason for renaming material name inside .mtl file?
Title: Re: OBJ Texture Names Chunk Specific
Post by: David Cockey on July 11, 2013, 04:45:40 AM
Not sufficient for importing multiple OBJ meshes into Rhino3D.

I'm importing the OBJ meshes into Rhino3D. If I import a single OBJ file into Rhino3D it picks up the corresponding .mtl and .jpg files. Everything works okay.

But if I import another OBJ file with the same material names in the .obj and .mtl files into Rhino3D then the second OBJ file is displayed with the wrong texture. (Geometry is okay). Renaming the material names before import solves the problem.

I'm modeling historic boats and need to be able to import multiple chunks into Rhino3D. This evening I'll be editing the material names in 29 sets of files.
Title: Re: OBJ Texture Names Chunk Specific
Post by: Alexey Pasumansky on July 11, 2013, 03:59:17 PM
Hello David,

OK, we'll try to change that. Probably, by placing filename as material name, otherwise I assume there could be problems with non-latin characters in chunk labels.
Title: Re: OBJ Texture Names Chunk Specific
Post by: David Cockey on July 11, 2013, 07:04:12 PM
Using the file name for the material name is a good idea. The file name needs to be unique so that makes the material name also unique. Thanks!
Title: Re: OBJ Texture Names Chunk Specific
Post by: Alexey Pasumansky on September 02, 2013, 05:42:13 PM
Hello David,

In the version 1.0.0 (pre-release) material name is the same as texture filename (without extension).
Title: Re: OBJ Texture Names Chunk Specific
Post by: David Cockey on October 29, 2013, 12:03:30 PM
Thanks!