<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Tony,<div><br></div><div> Thanks for showing those cool SVG graphics. Three dimensional surfaces are often composed of triangles. Although SVG can make the edges sharp, then you start seeing the individual triangles if the lighting across each triangle is not perfectly done. My previous explanation was over-simplified -- an SVG shape does not have to be a single color, you can put color gradients across it. In Avogadro output it probably puts a color gradient on each triangle interpolating the triangle corner colors. That kind of interpolation is called "per-vertex coloring". But in a 3D graphics app it often uses "per-pixel coloring" where the lighting is computed at each pixel instead of at each triangle vertex. That produces smoother looking lighting when the triangles are bigger than a few pixels. ChimeraX always uses per-pixel lighting.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div><br><div><br><blockquote type="cite"><div>On Feb 16, 2023, at 1:15 AM, Tony Schaefer via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Tom and Matthew,<br></div><div><br></div><div>Avogadro can technically export images in vector graphics format.</div><div><br></div><div>I don't know exactly how Avogadro makes SVGs, but it looks like they project the triangles that make up the objects onto a plane, and somehow determine how to color individual triangles. The lighting looks off - it's not quite what Avogadro shows in its GUI. Also, you can still see the triangles in the SVG image. I've attached a screenshot of an SVG as an example (the SVG is several megabytes). You'll have to take my word for it - if you zoom in on the SVG, those triangles stay crisp 🙃.<br></div><div><br></div><div>Avogadro can also export PDFs. The PDF does not have obvious triangles like the SVG, and you can zoom in as far as you like. In my opinion, the PDF looks better but the colors still differ from what Avogadro shows in its graphics window. It's probably difficult to get the lighting/shading to match. The PDF is much smaller than the SVG in terms of file size. <br></div><div><br></div><div>I think PNGs usually look pretty good, even if you can't zoom in on them infinitely. If you're zoomed in to a distance label to the point where it's too pixelated, you probably can't see the atoms you're measuring the distance between. Saving images with 3x supersampling in ChimeraX pretty much always looks fine to me, but opinions may vary.<br></div><div><br></div><div>Best,<br></div><div><br></div><div>Tony<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 15, 2023 at 11:03 PM Matthew Graneri via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu">chimerax-users@cgl.ucsf.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"></div><div dir="ltr">Hi Tom,</div><div dir="ltr"><br></div><div dir="ltr">Thanks for that - the tip about the label resolution fixed the issue.</div><div dir="ltr"><br></div><div dir="ltr">Ah, that makes sense! I assumed you could apply a colour gradient to the vectors, but the vector images I had in my head were of graphs (single coloured lines) and Avogadro molecules (where the colour gradient can look a little odd). Thanks for the info :)</div><div dir="ltr"><br></div><div dir="ltr">Regards,</div><div dir="ltr"><br></div><div dir="ltr">Matthew</div><div dir="ltr"><br><blockquote type="cite">On 16 Feb 2023, at 2:21 am, Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">Hi Matthew,<div><br></div><div> The distance text label in your image is pixelated because its quality does not automatically adjust when saving higher resolution images. This is a limitation of ChimeraX. But you can increase the quality of the text labels using the "size" option of the label command</div><div><br></div><div><span style="white-space:pre-wrap"> </span>label size 200</div><div><br></div><div>The value is the height in pixels of the rasterized label text. The default is 48 pixels.</div><div><br></div><div> Vector graphics are generally made up of single color shapes defined by equations (e.g. circles or splines). ChimeraX renders 3D graphics, so the shapes have no simple equations for the boundaries seen in a 2D image and also they are almost never single color because the 3D lighting varies the brightness even across a single atom. This is why you don't see any software producing vector graphics for 3D renderings. You are right vector graphics can produce small file sizes, but it only works for 2D single color shapes.</div><div><br></div><div><span style="white-space:pre-wrap"> </span>Tom</div><div><br><div><br><blockquote type="cite"><div>On Feb 15, 2023, at 12:20 AM, Matthew Graneri via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br><div><div><div dir="auto"><div dir="auto">Hi Elaine,<div><br></div><div>That’s fair enough. You’re absolutely right - journals always seem to want tiff files (I cannot figure out why, though).</div><div><br></div><div>I tried your suggestion, though, and while it <i>kind of</i> worked, there was a weird effect with the text in the saved image - for some reason, the text appears to be a significantly lower resolution to the rest of the image (I’ll attach a screenshot below). Do you have any idea why this might be happening?</div><div><br></div><div>Also, just an FYI, the reason I like PDFs is because they use vector graphics. The way it was explained to me is that vector graphics make an image out of a set of mathematical functions, which means you can expand them to whatever size you like and they will maintain their resolution (a circle is always going to be round), to a point, at least. PNGs, JPEGs and TIFFs are bitmap images, which means they are made of an array of pixels, so, when you enlarge an image, the pixels simply expand (circles become a series of squares). It also means that the higher the resolution, the larger the file (whereas the number of functions in a PDF file remains constant). While this might sound like a trivial difference, when you’re writing a thesis in word, or compiling one in LaTeX, it can mean the difference between a 30 MB file or a 150 MB file.</div><div><br></div><div>After a quick look, it seems like you can’t actually save images as vector graphics in ChimeraX. Is there a reason for that, or is it just chance? (Not criticising! Just curious.)</div><div><br></div><div>Regards,</div><div><br></div><div>Matthew</div><div><br></div><div><span id="m_8978595062626647235cid:B33BFCEA-CF1E-4741-AD94-6700653B82CD"><Screenshot 2023-02-15 at 4.07.27 pm.png></span></div><div><div><br><blockquote type="cite"><div>On 15 Feb 2023, at 12:45 am, Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" target="_blank">meng@cgl.ucsf.edu</a>> wrote:</div><br><div><div>Hi Matthew,<br>There is no option in distance units like inches/centimers but you can specify a high resolution by specifying a high number of pixels. E.g. if you want the image to be 2 inches wide at 600 dpi then you need the image to be 1200 pixels wide. The file would not be marked with the 2 inches width, but you could set that in some separate image-editing application.<br><br>There is no option to save PDF of the graphics window. It will not really save you in file size anyway when the contents include an image like a photo or molecular graphics. The PDF will be just as big as the resolution of the image requires. <br><br>The filesize/resolution tradeoff is different for different image formats, and there are various types of compression available, and some formats are "lossless" and others are not. I'm not an expert on the details. I use TIFF and PNG when I want lossless (and those are the ones journals usually want), JPG if I'm willing to lower the quality.<br><br>I hope this helps,<br>Elaine<br>-----<br>Elaine C. Meng, Ph.D. <br>UCSF Chimera(X) team<br>Department of Pharmaceutical Chemistry<br>University of California, San Francisco<br><br><br><blockquote type="cite">On Feb 13, 2023, at 8:15 PM, Matthew Graneri via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" target="_blank">chimerax-users@cgl.ucsf.edu</a>> wrote:<br><br>Hi there,<br>I was wondering if there was an option to set the resolution of an image you want to export? In the older Chimera application, there were many more options open to you when you wanted to save an image (I’ve attached a screenshot of the old and new image saving screens for comparison). If not, is there any chance of implementing a resolution specification option sometime in the future?<br><br>I was also wondering if it was possible to save images from ChimeraX as PDF files? I find that they usually maintain a high resolution without being particularly big, in terms of memory.<br><br>Apart from that, really enjoying ChimeraX!<br><br>Regards,<br><br>Matthew<br></blockquote><br></div></div></blockquote></div><br></div></div></div></div>_______________________________________________<br>ChimeraX-users mailing list<br><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>Manage subscription:<br><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br></div></blockquote></div><br></div></div></blockquote></div>_______________________________________________<br>
ChimeraX-users mailing list<br>
<a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>
Manage subscription:<br>
<a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" rel="noreferrer" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br>
</blockquote></div>
<span id="cid:f_le6t446m0"><Screenshot 2023-02-16 005332.png></span><span id="cid:f_le6twe541"><test_methane.pdf></span>_______________________________________________<br>ChimeraX-users mailing list<br>ChimeraX-users@cgl.ucsf.edu<br>Manage subscription:<br>https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br></div></blockquote></div><br></div></body></html>