[Chimera-users] Resolution of .stl file of ribbon representatiom
Hurt, Darrell (NIH/NIAID) [E]
darrellh at niaid.nih.gov
Thu Apr 3 13:06:15 PDT 2014
The differences in file size in my testing associated with ribbon scaling are likely just because of my imprecise zooming back and forth. But there certainly are file size reductions to be realized by zooming out and by simplifying the cross section. I can totally use this!
Darrell Hurt, Ph.D.
Section Head, Computational Biology
Bioinformatics and Computational Biosciences Branch (BCBB)
OCICB/OSMO/OD/NIAID/NIH
31 Center Drive, Room 3B62B, MSC 2135
Bethesda, MD 20892-2135
Office 301-402-0095
Mobile 301-758-3559
http://bioinformatics.niaid.nih.gov (Within NIH)
http://exon.niaid.nih.gov (Public)
Disclaimer: The information in this e-mail and any of its attachments is confidential and may contain sensitive information. It should not be used by anyone who is not the original intended recipient. If you have received this e-mail in error please inform the sender and delete it from your mailbox or any other storage devices. National Institute of Allergy and Infectious Diseases shall not accept liability for any statements made that are sender's own and not expressly made on behalf of the NIAID by one of its representatives.
----- Original Message -----
From: Tom Goddard [mailto:goddard at sonic.net]
Sent: Thursday, April 03, 2014 02:32 PM
To: Hurt, Darrell (NIH/NIAID) [E]
Cc: Gavin Whittaker <g.whittaker at ed.ac.uk>; chimera-users at cgl.ucsf.edu BB <chimera-users at cgl.ucsf.edu>
Subject: Re: [Chimera-users] Resolution of .stl file of ribbon representatiom
Hi Darrell,
Thanks for the test results!
The scaling of the ribbon cross-section done by the Scaling tab of the Ribbon Style Editor (menu Tools / Depiction) should not change the size of the exported STL file at all. It only moves the vertices of the triangles, but you still get the same number of triangles.
The STL file uses 48 bytes for each triangle (x,y,z coords for 3 vertices, plus nx,ny,nz normal vector for triangle, giving 12 floating point values each taking 4 bytes). That is rather inefficient. Chimera uses only 24 bytes per triangle in memory, and for 3d printing you don't need the normal vectors and 18 bytes per triangle would be possible. And if 16-bit precision on coordinates were adequate you could drop that to 9 bytes per triangle, about 5x smaller than STL files. But without a standard file format that can handle that format it doesn't help. Also the 3d printing software is probably not struggling with the size of the file, it is the large number of triangles that it has trouble with. The Catalyst 4.3 uPrint 3d printer software we use is very bad, usually crashing, sometimes just extremely slow (hours to process), with large files (100 Mbytes). I believe the job done by that software could be done 100 times more efficiently, but the 3d printer vendors probably aren't doing it because common uses don't produce such large files.
Tom
On Apr 3, 2014, at 9:18 AM, "Hurt, Darrell (NIH/NIAID) [E]" <darrellh at niaid.nih.gov> wrote:
> Hi guys,
>
> I think both of you have it. Gavin is right that simplifying the cross-section of the ribbon will reduce the triangle count. Tom is right that simply zooming out reduces the subdivisions along the ribbon (and therefore the triangle count). I'm using the "large_octagon" cross section preset and applying the "for3Dprint1round" scaling preset. Here's what I find:
>
> Load up a PDB and hide any atoms that show up (so I'm considering only the ribbon)
>
> File > Export without zooming: 4.2 MB X3D or 6.0 MB STL
> File > Export with zoom-out: 2.0 MB X3D or 2.3 MB STL
> File > Export without zooming but with scaling only: 4.7 MB X3D or 6.8 MB STL
> File > Export with zoom-out and scaling only: 1.6 MB X3D or 1.6 MB STL
> File > Export without zooming but with scaling and simple cross-section: 1.9 MB X3D or 2.7 MB STL
> File > Export with zoom-out and scaling and simple cross-section: 898 KB X3D or 928 KB STL
>
> When I view the meshes, it is apparent that zooming out does indeed reduce the subdivision frequency along the ribbon length and simplifying the ribbon cross section reduces the subdivision around the ribbon. It can be at least an 85% savings in triangle count!
>
> Great tip!
>
> Thanks,
> Darrell
>
> --
> Darrell Hurt, Ph.D.
> Section Head, Computational Biology
> Bioinformatics and Computational Biosciences Branch (BCBB)
> OCICB/OSMO/OD/NIAID/NIH
>
> 31 Center Drive, Room 3B62B, MSC 2135
> Bethesda, MD 20892-2135
> Office: 301-402-0095
> Mobile: 301-758-3559
> Web: BCBB Home Page<http://www.niaid.nih.gov/about/organization/odoffices/omo/ocicb/Pages/bcbb.aspx#niaid_inlineNav_Anchor>
> Twitter: @niaidbioit<https://twitter.com/niaidbioit>
>
> Disclaimer: The information in this e-mail and any of its attachments is confidential and may contain sensitive information. It should not be used by anyone who is not the original intended recipient. If you have received this e-mail in error please inform the sender and delete it from your mailbox or any other storage devices. National Institute of Allergy and Infectious Diseases shall not accept liability for any statements made that are sender's own and not expressly made on behalf of the NIAID by one of its representatives.
>
> From: Tom Goddard <goddard at sonic.net<mailto:goddard at sonic.net>>
> Date: Thursday, April 3, 2014 11:31 AM
> To: Gavin Whittaker <g.whittaker at ed.ac.uk<mailto:g.whittaker at ed.ac.uk>>
> Cc: "chimera-users at cgl.ucsf.edu<mailto:chimera-users at cgl.ucsf.edu> BB" <chimera-users at cgl.ucsf.edu<mailto:chimera-users at cgl.ucsf.edu>>
> Subject: Re: [Chimera-users] Resolution of .stl file of ribbon representatiom
>
> Hi Gavin,
>
> The “subdivision” setting under “graphics quality” in the Effects dialog (menu Tools / Viewing Controls / Effects) controls the fineness of the ribbon mesh. Actually it only controls the subdivisions along the ribbon. I believe the standard round (oval) cross-section always has 20 subdivisions around the circumference no matter what the subdivision setting is. So you may still need to use an external program to reduce the fineness.
>
> The default subdivision is I believe 1.5, and a lower value like 0.5 or 0.1 should reduce the ribbon stl file substantially.
>
> Aha, there is more to it. The level of subdivision is intended to maintain good quality appearance on your display. So when you zoom in the ribbon gets finer, and when you zoom out it gets coarser. I just did a ltest, and when I export a ribbon where I am zoomed out so the protein only is an inch wide on my display the STL file is 3 Mbytes, but when I zoom in so the protein is 10 inches wide, the exported file is 18 Mbytes! So siimply zooming out before you export will control fineness. Again I believe that it only controls fineness along the length, with subdivisions around the circumference fixed. When you export using different zoom levels the coordinates of the ribbon will not be shifted since zooming is just moving the camera closer or further away while the protein stays in the same place.
>
> Tom
>
>
> On Apr 3, 2014, at 2:48 AM, Gavin Whittaker wrote:
>
> Dear all,
>
> I'm in the process of 3d printing a large protein in ribbon format; I've generated the .stl file, but the resolution of the mesh that Chimera creates means that the resulting file is too large to use easily. I've managed to use other software to reduce the resolution of the mesh, so I can now get around the problem, but can anyone tell me if it's possible to reduce the resolution of the mesh in Chimera to save me a step for future models?
>
> I know how to reduce the resolution of a surface mesh, but files of ribbon representations remain obstinately large. One method I've used that gives limited results is to simplify the cross-sectional form of the ribbon, but I wonder, am I missing something obvious and more effective?
>
> thanks!
>
> Gavin
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu<mailto:Chimera-users at cgl.ucsf.edu>
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>
>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>
More information about the Chimera-users
mailing list