[Chimera-users] .dae export for ChimeraX
Tom Goddard
goddard at sonic.net
Thu Dec 2 14:22:50 PST 2021
Hi Byrne,
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.
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.
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).
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.
https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html
Tom
Model from gltf export from linked ChimeraX example
> On Dec 2, 2021, at 2:04 PM, Byrne Pedit <bpedit at comcast.net> wrote:
>
> Hello Tom,
>
> 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.
>
> 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.
>
> 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!
>
> Thanks again,
>
> Byrne
>
>
>> On Dec 2, 2021, at 12:30 PM, Tom Goddard <goddard at sonic.net <mailto:goddard at sonic.net>> wrote:
>>
>> Hi Byrne,
>>
>> We have long been interested in adding Collada format export of scenes from ChimeraX. Here is the feature request for that
>>
>> https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/485 <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/485>
>>
>> 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).
>>
>> https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html <https://www.rbvi.ucsf.edu/chimerax/data/texture-may2021/export_3d.html>
>>
>> ChimeraX also exports OBJ, STL, X3D, VTK as shown in the save command docs
>>
>> https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#formats <https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#formats>
>>
>> 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.
>>
>> Tom
>>
>>> On Dec 2, 2021, at 10:41 AM, Byrne Pedit via Chimera-users <chimera-users at cgl.ucsf.edu <mailto:chimera-users at cgl.ucsf.edu>> wrote:
>>>
>>> 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.)
>>> _______________________________________________
>>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
>>> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20211202/042ec27b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spike.png
Type: image/png
Size: 532355 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20211202/042ec27b/attachment-0001.png>
More information about the Chimera-users
mailing list