<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Byrne,<div class=""><br class=""></div><div class=""> Thanks for the info about exporting models for iOS.</div><div class=""><br class=""></div><div class=""> Glad you found a way to export a virus model from ChimeraX suitable for use in iOS apps made with Xcode. The STL format is just a list of triangles, each with 3 vertex (x,y,z) coordinates, used mostly for 3D printing. It does not have vertex normal vectors which are used to give smoother lighting. In the future maybe ChimeraX will directly export Collada (*.dae) files and you will be able to export a usable model without running it through Blender. As I mentioned before we support GLTF but not Collada currently. Our ChimeraX efforts are mostly to help researchers analyze molecular structures so adding this does not have highest priority. Unfortunately there are hundreds of feature requests we do not have time to implement with our limited funding.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 18, 2021, at 9:34 AM, Byrne Pedit <<a href="mailto:bpedit@comcast.net" class="">bpedit@comcast.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello again Tom,<div class=""><br class=""><div class=""> A follow-up follow-up. After extensive testing I have found a useable workflow from ChimeraX to iOS. Of course iOS apps may utilize PDB viewers, this is for folks who may want to incorporate models, in customized ways, into SceneKit for manipulation.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ChimeraX ––> STL ––(graphics editor)––> DAE ––Xcode<span style="font-size: 14px;" class="">–</span>–> SCN</div><div class=""><br class=""></div><div class="">• In Chimera</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>– reduce polys as much as possible*</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>– export individual elements, e.g. chains, if you want individual control (materials, etc)</div><div class="">• In a graphics editor:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>– eliminate polygonal faceting of STL files</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- <span style="font-size: 14px;" class="">Blender, check Auto Smooth in addition to toggling on Smooth Shading</span></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>- Cinema 4D, add a phong tag </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>– recenter if desired, add additional elements</div><div class=""><br class=""></div><div class="">*You might want to add surfaces to your reducing file-size tutorial. In the model below, the spike's<font size="3" class=""> resolution was set to 7, gridSpacing 3. You also need to click Hide for Atoms and Cartoons; otherwise they will severely bloat the file even though not seen. The entire file size of this SARS-CoV-2 model, as used by iOS, is 1.2 Mb (all but one of the spikes are all clones).</font></div><div class=""> </div><div class="">Thanks again for the help,</div><div class=""><br class=""></div><div class="">Byrne</div><div class=""><br class=""></div><div class=""> <img apple-inline="yes" id="505E7436-D063-46D4-A615-7E9BA3C42DFA" class="" width="246" height="240" src="cid:AB3FFE9B-FF5F-4A73-A588-8AB27AE16169"></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 3, 2021, at 11:00 PM, Tom Goddard <<a href="mailto:goddard@sonic.net" class="">goddard@sonic.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Byrne,<div class=""><br class=""></div><div class=""> Thanks! So Blender can convert GLTF to Collada. The ChimeraX GLTF is binary and Collada is all text, so no surprise that the file size is much larger. If we add Collada support it would be produced directly from the ChimeraX scene, not converting from GLTF. But we have hundreds of new feature requests so I don't think Collada output is likely to be added soon, unless a funded project needs it.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 3, 2021, at 9:48 AM, Byrne Pedit <<a href="mailto:bpedit@comcast.net" class="">bpedit@comcast.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Tom,<div class=""><br class=""></div><div class="">A follow-up for future reference. Blender, the one recommendation I found on StackOverflow, is indeed capable of converting GLTF to DAE. But the conversion bloats the files by as much as 10x! In addition, the hierarchy is only partially preserved. I tried an on-line converter with even less satisfactory results. So I think this pathway is a bust. This might serve as a fair warning for ChimeraX developers to avoid an internal conversion from GLTF if introducing a DAE export option.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Byrne</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 2, 2021, at 2:22 PM, Tom Goddard <<a href="mailto:goddard@sonic.net" class="">goddard@sonic.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Byrne,<div class=""><br class=""></div><div class=""> I agree, OBJ and STL are very limited compared to Collada and GLTF. OBJ is supported by almost every 3D model program and STL is commonly used for 3D printing (single color) which is why they are in ChimeraX. GLTF is definitely the best option in ChimeraX for your case.</div><div class=""><br class=""></div><div class=""> There appear to be lots of programs that convert GLTF to Collada and the other direction too. But I have not tried any of them so don't have any recommendation. Let us know if you find one that works well -- other ChimeraX users may have the same need.</div><div class=""><br class=""></div><div class=""> A major stumbling block exporting 3D models from ChimeraX (or Chimera) is that they use vertex colors, while most of the non-biology 3D model world uses texture colors, and will simply ignore vertex colors losing all your color information. That example I linked to in the last email describes a relatively new ChimeraX feature to export texture colors (for limited cases, e.g. discrete colors only).</div><div class=""><br class=""></div><div class=""> Another common problem exporting molecular models for use in other software is that the file size and number of triangles is too large for the application that you want to use them in, often tens of millions of triangles or hundreds of Mbytes to Gbytes in size. The example also shows how to tell ChimeraX to limit the number of triangles.</div><div class=""><br class=""></div><div class=""> <a href="https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html" class="">https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html</a></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class="">Model from gltf export from linked ChimeraX example</div><div class=""><br class=""><div class=""><span id="cid:025C4A3B-FB65-4A13-8EF0-EDDE6627ED8D" class=""><spike.png></span></div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 2, 2021, at 2:04 PM, Byrne Pedit <<a href="mailto:bpedit@comcast.net" class="">bpedit@comcast.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello Tom,<div class=""><br class=""></div><div class="">Thanks for the response. I tried the GLTF export, not recognizable by Xcode (the development platform for iOS and Mac OS). The only ChimeraX file options I’ve found to be openable are OBJ and STL. These are, however, problematic and unusable.</div><div class=""><br class=""></div><div class="">But your hint of using GLTF as an intermediary offers an avenue for exploration, it’s not a format I’ve used. I see it supports scene graph hierarchy, absent with OBJ and STL( exported from ChimeraX anyway) so this is promising. Now to find a converter.</div><div class=""><br class=""></div><div class="">The GLTF export link is informative, it may help further refine my approach. Interestingly, the molecule you’ve chosen for demo purposes appears to be the one, or a variant thereof, I’ve been testing with! </div><div class=""><br class=""></div><div class="">Thanks again,</div><div class=""><br class=""></div><div class="">Byrne</div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 2, 2021, at 12:30 PM, Tom Goddard <<a href="mailto:goddard@sonic.net" class="">goddard@sonic.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Byrne,<div class=""><br class=""></div><div class=""> We have long been interested in adding Collada format export of scenes from ChimeraX. Here is the feature request for that</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/485" class="">https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/485</a></div><div class=""><br class=""></div><div class="">But our scene export in ChimeraX has focused on GLTF format, as that has been the most requested. Here is an example showing GLTF export from ChimeraX (including texture colors).</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html" class="">https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html</a></div><div class=""><br class=""></div><div class=""> ChimeraX also exports OBJ, STL, X3D, VTK as shown in the save command docs</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#formats" class="">https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#formats</a><br class=""><div class=""><br class=""></div><div class="">Can you make use of GLTF files? If not, a quick solution might be to convert ChimeraX GLTF files to Collada with third-party software.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 2, 2021, at 10:41 AM, Byrne Pedit via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">ChimeraX is awesome and definitely superior to the original but for the inability to export as .dae (Collada). Is that possibly on the to-do list? This is important for those of us (just me?) writing interactive molecular apps for devices. It is the only satisfactory path I’ve found between a PDB file and SCNNodes/Scenes in iOS. (See the iOS app ‘BioMole’, free, if interested in an application.)<br class="">_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></div></div></blockquote></div><br class=""></div></body></html>