[chimerax-users] Exporting 3D models from ChimeraX?

Tom Goddard goddard at sonic.net
Tue Oct 6 18:20:14 PDT 2020


Hi Mikael,

  I tried putting a gltf model from ChimeraX 1.1 of PDB 2bna into PowerPoint (current Office 365 version: Version 2009 build 13231.20262) on Windows 10 and colors were faded as you saw due to completely wrong lighting.  There is no lighting info in the glTF produced by ChimeraX and apparently PowerPoint chooses ridiculous bright ambient light making the colors nearly white and offers no way to change it other than editing the saved PowerPoint as described in the link you found.  I edited the PowerPoint as described.  There was one ambient light source and 3 point light sources all too bright.  I turned down the brightness and added a black background using 3D Model Format options within PowerPoint and got better colors as shown below, but still not the saturated colors that are in the glTF file.

  Here are the powerpoint xml light settings I fiddled with.  The color r,g,b values are on a scale of 1000000.  Illuminance and intensity are given as a ratio n/d (who knows why, it is powerpoint).  I reduced ambient 10 fold and point lights 2-fold.  Also the point colors were all not white distorting the colors so I changed those (r,g,b).  How the PowerPoint defaults can be so messed up I don't know.  After changing those (I used emacs text editor) and reloading in powerpoint you need to rotate the model or it just shows the old lighting apparently having cached an image from before the changes.  Still the colors are pastel while the file colors are fully saturated red, blue, yellow and green.  Don't know why.

<am3d:ambientLight>
  <am3d:clr><a:scrgbClr r="500000" g="500000" b="500000"/></am3d:clr>
  <am3d:illuminance n="10000" d="1000000"/>
</am3d:ambientLight>

<am3d:ptLight rad="0">
  <am3d:clr><a:scrgbClr r="500000" g="500000" b="500000"/></am3d:clr>
  <am3d:intensity n="500000" d="1000000"/>
  <am3d:pos x="21959998" y="70920001" z="16344003"/>
</am3d:ptLight>

<am3d:ptLight rad="0">
  <am3d:clr><a:scrgbClr r="500000" g="500000" b="500000"/></am3d:clr>
  <am3d:intensity n="500000" d="1000000"/>
  <am3d:pos x="-37964106" y="51130435" z="57631972"/>
</am3d:ptLight>

<am3d:ptLight rad="0">
  <am3d:clr><a:scrgbClr r="500000" g="500000" b="500000"/></am3d:clr>
  <am3d:intensity n="500000" d="1000000"/>
  <am3d:pos x="-37739122" y="58056624" z="-34769649"/>
</am3d:ptLight>

	Tom

2bna in ChimeraX



ChimeraX glTF in PowerPoint

Changed to black background in powerpoint with 3D Model Format options.


Turned down lights and made the lights white.


> On Oct 6, 2020, at 12:40 PM, Karjalainen, Mikael <mikael.p.karjalainen at jyu.fi> wrote:
> 
> Hi!
>  
> I found this one: https://answers.microsoft.com/en-us/msoffice/forum/all/3d-model-lighting-inside-powerpoint/d0c0c316-8019-4c25-b0f6-86500e512f91 <https://answers.microsoft.com/en-us/msoffice/forum/all/3d-model-lighting-inside-powerpoint/d0c0c316-8019-4c25-b0f6-86500e512f91>
> 
> Problem can be lighting in powerpoint and you can remove it by editing .pptx file. I tried and I got first black 3D model and then slightly better (I didn’t remove "am3d:ambientLight"). For me this didn’t fix the colors. I tried with PyMol and it’s glTF file works. Maybe there is something which could be changed in ChimeraX.
>  
> Regards,
> Mikael
>  
>  
> Lähettäjä: ChimeraX-users <chimerax-users-bounces at cgl.ucsf.edu <mailto:chimerax-users-bounces at cgl.ucsf.edu>> Puolesta Karjalainen, Mikael
> Lähetetty: tiistai 6. lokakuuta 2020 21.25
> Vastaanottaja: Tom Goddard <goddard at sonic.net>; Oliver Clarke <olibclarke at gmail.com>
> Kopio: ChimeraX Users Help <chimerax-users at cgl.ucsf.edu>
> Aihe: Re: [chimerax-users] Exporting 3D models from ChimeraX?
>  
> Hi!
>  
> Thank you! It was too easy to save to glb format that I didn’t realize how to do it.
>  
> Colors are washed out and I didn’t find any fix to it. I tried some 3d software which come with Windows 10 and tried to save glb file with dimmer colors. Also, I noticed that labels are just flat sheets, if I have them in structure (Can I get floating 2D text which would always face to the viewer?). If someone has easy solution for this colors issue, I would be happy to hear it.
>  
> Regards,
> Mikael
>  
> Lähettäjä: ChimeraX-users <chimerax-users-bounces at cgl.ucsf.edu <mailto:chimerax-users-bounces at cgl.ucsf.edu>> Puolesta Tom Goddard
> Lähetetty: tiistai 6. lokakuuta 2020 20.29
> Vastaanottaja: Oliver Clarke <olibclarke at gmail.com <mailto:olibclarke at gmail.com>>
> Kopio: ChimeraX Users Help <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>>
> Aihe: Re: [chimerax-users] Exporting 3D models from ChimeraX?
>  
> Hi Oli,
>  
>   The core glTF format does not support lighting.  It also does not specify a background color as far as I can tell, here is the specification
>  
> https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md <https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md>
>  
> For the washed out colors, one problem we have seen before is that macOS uses a special Apple color profile which is not sRGB and if that is not preserved the colors are faded it.  glTF does not appear to have support for color profiles.  Another possibility is that the default material in glTF fades the colors.  ChimeraX does not export material information into the glTF file.  Also glTF can handle camera positions but ChimeraX does not include that.
>  
>   ChimeraX exports the shapes and vertex colors.  It is primarily used to get models into general 3D packages like Blender, Cinema4D, Maya, where the materials, camera angles, lighting model can all be set as needed for the end application.
>  
>   Despite the many limitations of the glTF format and what ChimeraX puts into it, other formats like OBJ and STL are much more severely limited, neither supports vertex colors that ChimeraX uses.  STL does not support any colors, just a list of triangles.
>  
>                              Tom
>  
>  
> 
> On Oct 6, 2020, at 8:02 AM, Oliver Clarke <olibclarke at gmail.com <mailto:olibclarke at gmail.com>> wrote:
>  
> Hi Elaine - I just tried this and it saves as glb, but importing into powerpoint gives washed out colors - it doesn't seem to preserve any lighting options - and the background color is not preserved. I guess this is an issue on Microsoft's end though?
> 
> Oli
> 
> 
> On Oct 6, 2020, at 10:52 AM, Elaine Meng <meng at cgl.ucsf.edu <mailto:meng at cgl.ucsf.edu>> wrote:
> 
> Hi Mikael,
> ChimeraX can save glb, stl, obj, etc. The save formats are listed in the User Guide help page for "save":
> 
> <http://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#formats <http://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#formats>>
> 
> ... or you can list them in the Log with command "save formats."  
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> 
> 
> On Oct 6, 2020, at 2:14 AM, Karjalainen, Mikael <mikael.p.karjalainen at jyu.fi <mailto:mikael.p.karjalainen at jyu.fi>> wrote:
> 
> Hi! 
> Is it possible to export 3D models from ChimeraX? Preferably in formats GLB (best for powerpoint), FBX, OBJ or 3MF? You can in old Chimera, but for powerpoint presentations it can only give STL files which do not have textures.
> 
> Here are supported file formats for Office products: https://support.microsoft.com/en-us/office/3d-content-guidelines-for-microsoft-03a7b493-d549-4f1a-9735-f2457adf6261 <https://support.microsoft.com/en-us/office/3d-content-guidelines-for-microsoft-03a7b493-d549-4f1a-9735-f2457adf6261>
> 
> Regards,
> Mikael
> 
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
> 
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>  
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201006/a34f1e96/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2bna_chimerax.png
Type: image/png
Size: 145062 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201006/a34f1e96/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2bna_gltf_ppt1.png
Type: image/png
Size: 96475 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201006/a34f1e96/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2bna_gltf_ppt2.png
Type: image/png
Size: 118270 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201006/a34f1e96/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2bna_gltf_ppt3.png
Type: image/png
Size: 128064 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201006/a34f1e96/attachment-0007.png>


More information about the ChimeraX-users mailing list