From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Feb 23 2006 - 12:39:51 CST

Hi Vlad,
  I'd been hoping to have time to write a nice text renderer for Tachyon,
but this hasn't happened yet. In general, text rendering is a task that's
ill suited to renderers based on ray tracing, since text is typically
rendered with constant thickness lines. Ray tracing only directly
deals with rendering of objects with finite surface area and volume
such as cylinders, triangles, etc. The usual way to render text in
a ray tracer is to draw cylinders in place of lines, using some guess
or heuristic to set a cylinder radius that yields a projected thickness
similar to what would have resulted from a line rasterizer. While this
can be made to work, it's subject to failure whenever text (such as VMD
atom labels) is drawn at varying distance from the eye, due to perspective
projection making the simple cylinder radius guess or heuristic fail.

In the short term, about the only think I can really do is to implement
the simple cylinder lines-to-cylinders conversion I describe above in
the VMD FileRenderer class, which will allow text to show up in all of
the external renderers, with the problems and limitations I describe above.

A better solution would be to add a line/text rasterization engine to Tachyon
and composite the rasterized text with the resulting ray traced image.
That's much trickier and would require a lot of new code, but the
results would be better and it would look much more like what VMD does.

I always suggest that people use full fledged image editing or
illustration packages such as GIMP, Photoshop, or Illustrator for adding
nice looking text to VMD images, but I agree that it would be better if
VMD did more to export the text just for the sake of convenience even with
the limitations I described above. I'll see what I can do with the time
I've got.

  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Feb 23, 2006 at 04:07:54PM +0100, Vlad Cojocaru wrote:
> Dear John, vmd users,
>
> I noticed that when rendering images with Tachyon, all text that was
> drawn onto the vmd window (either labels or drawn with "draw" or
> "graphics") is not rendered.
>
> If I choose snapshot for rendering, the text is rendered ...
>
> Is there any way to make Tachyon render the text?
>
> Best wishes
> vlad
>
> --
> Dr. Vlad Cojocaru
> EML Research gGmbH
> Molecular and Cellular Modeling Group
> Schloss-Wolfsbrunnenweg 33
> 69118 Heidelberg, Germany
> Phone: +49-6221-533266
> Fax: +49-6221-533298
> e-mail: Vlad.Cojocaru_at_eml-r.villa-bosch.de
> http://projects.villa-bosch.de/mcm/people/cojocaru/
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078