[vtk-developers] vtkGL2PSExporter: need feedback.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Dec 31 23:06:22 EST 2002


Hi,

Thanks for the feedback.  I'm sorry if this post appears wrongly
threaded.  I'm replying off the web because my departmental machines
are in a bit of a mess and its vacation time till the 2nd.

>>>>> "JL" == Jeff Lee <jeff at cdnorthamerica.com> writes:

    JL> In my experience, converting directly to postscript produces
    JL> notoriously bad images, and is generally not a huge benefit
    JL> (except for very simple scenes).  One reason is that the
[snip]
    JL> there are many sacrifices.  For example, transparency doesn't
    JL> work (well if at all).  The overall idea is nice, but in
    JL> practice doesn't work well in all situations.  That being

I beg to differ.  Very few classes are used in every situation.  If
vtkXYPlotActor belongs in VTK, a gl2ps writer would also make a good
addition.  I've seen a recent PhD thesis full of 2d contour plots made
with VTK.  All the pictures were made using PNG's but a proper
postscript generator would have made things much nicer.  The point is
there certainly are situations where generating vector PS files make a
lot of sense.  Especially if the plot is 2D.  The output in this case
is definitely nice and the file size is small.  I also tried a
reasonbly complex 3D case.  I tried the lox example (page 304, plate
61 in the 2nd edition -- flow past a cylinder placed on a flat
surface) and the vector PS file generated was about 6.5 MB.  By todays
standards I'm not sure I'd call that *huge*.  It is large I agree.
However, if you did generate a bitmapped PS file (at about 1024x768)
via WindowToImageFilter you'd get a file size thats about 2.6MB and
the quality is nothing that can be compared with the vector PS output.
I'll admit that transparent actors will cause problems and so will
volume rendering.  However, I think there is enough use for a gl2ps
writer in VTK.  Besides we have seen that over the years quite a few
folks have built their own gl2ps writers.  Even as recently as October
2002 Goodwin Lawlor mentioned the need for a proper eps writer.

Also, note that if gl2ps works nicely with text we can generate TeX
output for the text which means that you can print complex math stuff
relatively easily.  So even if the image generated is not suitable for
PS output, the TeX output can be used with the png/jpeg/bmp'd ps
output.

    JL> said, I don't think it is a good addition to vtk.  I am not on
    JL> the ARB, but I would not like to see vtk polluted with
    JL> external libraries without a really good reason.  I think that
    JL> vtkWindowToImageFilter serves this need the best right now.

I think there is some misunderstanding.  I am not planning on adding
the gl2ps library itself to VTK.  I asked about that in an earlier
email but no one responded.  I am planing to do the following:

 1. Add vtkGL2PSExporter to Rendering.

 2. Modify CMakeLists.txt to provide the user with options so that
 they can *optionally* link to gl2ps at build time.

 3. If the user choses gl2ps, compile the exporter and also add hooks
 (via ifdefs etc.) to the text mappers so that text output works well
 with gl2ps.


I know how to get up to step 2.  Step 3 will require some work but is
worth doing only if the vtkGL2PSExporter does get into VTK.  So I'd
really appreciate if the ARB or whoever decides these things lets me
know if this is OK?


[snip]
    JL> But I do appreciate your constant improvements to vtk and I am

Thanks.

I'd appreciate if you can CC me on my reply-to address
(prabhu_r at hathway.com).

regards,
prabhu

p.s. Wishing you all a happy and prosperous new year!



More information about the vtk-developers mailing list