Forum

Author Topic: OBJ Texture Names Chunk Specific  (Read 7707 times)

David Cockey

  • Full Member
  • ***
  • Posts: 207
    • View Profile
OBJ Texture Names Chunk Specific
« 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.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14003
    • View Profile
Re: OBJ Texture Names Chunk Specific
« Reply #1 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?
Best regards,
Alexey Pasumansky,
Agisoft LLC

David Cockey

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: OBJ Texture Names Chunk Specific
« Reply #2 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.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14003
    • View Profile
Re: OBJ Texture Names Chunk Specific
« Reply #3 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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

David Cockey

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: OBJ Texture Names Chunk Specific
« Reply #4 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!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14003
    • View Profile
Re: OBJ Texture Names Chunk Specific
« Reply #5 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).
Best regards,
Alexey Pasumansky,
Agisoft LLC

David Cockey

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: OBJ Texture Names Chunk Specific
« Reply #6 on: October 29, 2013, 12:03:30 PM »
Thanks!