Opened 23 months ago

Last modified 23 months ago

#10281 assigned enhancement

Output colors in OBJ format using a .mtl file

Reported by: zberndsen@… Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

From: "Berndsen, Zachary via ChimeraX-users" <chimerax-users@…>
Subject: [chimerax-users] Exporting scene with .obj and .mtl file
Date: December 3, 2023 at 6:08:56 AM PST
To: "chimerax-users@…" <chimerax-users@…>
Reply-To: "Berndsen, Zachary"

Hello,

I need to export an obj file along with the associated mtl file, however, under the “file > save” option, there is only an option for saving as .obj, not .mtl. I read in the online documentation that there should be the capability to “export a scene” which saves an obj and mtl file, however I do not see this option when using v 1.6.1. Is this still supported?

Thanks,

Zack

Change History (2)

comment:1 by Tom Goddard, 23 months ago

ChimeraX does not use textures for coloring most models. Instead it uses vertex colors. The OBJ format does not support vertex colors. Elaine mentioned the web page which describes how you can get ChimeraX to produce texture colors in simple cases where you just have a discrete set of colors

https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html

That does not use a .mtl file. ChimeraX puts the texture coordinates into the .obj file and the instructions on the above web page tell you how to write out the texture image as a .png file. To use these in 3D modeling software you would have to open the .obj file and then assign the .png file as the texture image in that 3D modeling software.

I agree it would be helpful if ChimeraX output a .mtl file (material file) which includes color information, but currently it only outputs single color models, for example for 3D printing, unless you use the steps described in the above web page to output a texture.

comment:2 by zberndsen@…, 23 months ago

Hello,

I am new to this side of things but learning quickly. I am working with a team of graphic designers that was not at all familiar with Chimera and was used to using VMD to export protein structure scenes as .mtl files. After relaying this information to them we now have a plan to move forward with.

Thank you again for you help.

Best,

Zack

Zachary Berndsen, Ph.D.
Assistant Professor
Department of Biochemistry
University of Missouri Columbia


From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Date: Monday, December 4, 2023 at 2:39 PM
To: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>, Berndsen, Zachary <zberndsen@missouri.edu>
Subject: Re: [ChimeraX] #10281: Output colors in OBJ format using a .mtl file
WARNING: This message has originated from an External Source. This may be a phishing expedition that can result in unauthorized access to our IT System. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

#10281: Output colors in OBJ format using a .mtl file
-----------------------------------+-------------------------
          Reporter:  zberndsen@…   |      Owner:  Tom Goddard
              Type:  enhancement   |     Status:  assigned
          Priority:  moderate      |  Milestone:
         Component:  Input/Output  |    Version:
        Resolution:                |   Keywords:
        Blocked By:                |   Blocking:
Notify when closed:                |   Platform:  all
           Project:  ChimeraX      |
-----------------------------------+-------------------------
Comment (by Tom Goddard):

 ChimeraX does not use textures for coloring most models.  Instead it uses
 vertex colors.  The OBJ format does not support vertex colors.  Elaine
 mentioned the web page which describes how you can get ChimeraX to produce
 texture colors in simple cases where you just have a discrete set of
 colors

         https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2Fdata%2Ftexture-&data=05%7C01%7Czberndsen%40missouri.edu%7C5ae7c5f2ee944fe8966708dbf50921f1%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638373191791315758%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Tf5lM%2B%2FMZKzNdCezbgO%2B4pk5yCGaF7Wv8fmhu1lIRE0%3D&reserved=0<https://www.rbvi.ucsf.edu/chimerax/data/texture->
 may2021/export_3d.html

 That does not use a .mtl file.  ChimeraX puts the texture coordinates into
 the .obj file and the instructions on the above web page tell you how to
 write out the texture image as a .png file.  To use these in 3D modeling
 software you would have to open the .obj file and then assign the .png
 file as the texture image in that 3D modeling software.

 I agree it would be helpful if ChimeraX output a .mtl file (material file)
 which includes color information, but currently it only outputs single
 color models, for example for 3D printing, unless you use the steps
 described in the above web page to output a texture.
--
Ticket URL: <https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Ftrac%2FChimeraX%2Fticket%2F10281%23comment%3A1&data=05%7C01%7Czberndsen%40missouri.edu%7C5ae7c5f2ee944fe8966708dbf50921f1%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638373191791315758%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MMH%2FrL8QtE5ZV%2B3E2DAhYTcz3k2BZR4TuHTbKBUW7jk%3D&reserved=0<https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10281#comment:1>>
ChimeraX <https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2F&data=05%7C01%7Czberndsen%40missouri.edu%7C5ae7c5f2ee944fe8966708dbf50921f1%7Ce3fefdbef7e9401ba51a355e01b05a89%7C0%7C0%7C638373191791315758%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=p%2BwCrp625nTb84%2BLAS7ohxtxjHOO1sAj2NG8x3SMC44%3D&reserved=0<https://www.rbvi.ucsf.edu/chimerax/>>
ChimeraX Issue Tracker
Note: See TracTickets for help on using tickets.