[vtk-developers] [ARB?] Plans for the vtkGL2PSExporter class.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Jun 4 08:11:42 EDT 2003


Hi Goodwin,

Thanks for the reply and the link!  I've also peeked at some of your
code.

>>>>> "GL" == Goodwin Lawlor <goodwin.lawlor at ucd.ie> writes:

    GL> Hi, Sorry I'm joining this thread late... its was a public

No problem.

    GL> Like Prabhu's vtkGL2PSExporter it wraps the gl2ps0.8
    GL> library. I've also subclassed it from vtkExporter but have
    GL> stuck it in Hybrid (I reckon its an exporter/writer hybrid and
    GL> I think the VTK compilation goes more smoothly if its in
    GL> there). Its called vtkEPSWriter though...

I think it belongs in Rendering with the other exporters
(OOGLExporter, IVExporter etc.).

    GL> As Prabhu said earlier text doesn't make it into the opengl
    GL> feedback buffer... neither does point size and line
    GL> width. gl2ps does have methods to get round these problems
    GL> though. It means that each actor in a renderer must be
    GL> rendered separately into the feedback buffer setting its point
    GL> size and line width appropriately.

OK.  Ahh, so pointsize and line width need special attention.  I'll
look at that later.

    GL> When you render a vtkTextActor separately into the feedback
    GL> buffer the text doesn't make it there but the correct raster
    GL> position is set. So, you get the input text, its properties,
    GL> and use gl2psText... great BUT subclasses of vtkActor2D
    GL> encapsulate arrays of vtkActor2D's which vtkEPSWriter has to
    GL> be able to get at.

Indeed.  I've managed to get text support working well with some
simple code inside the TextMapper.  So I don't think there is a need
to befriend all these classes. :)

    GL> I could ramble on here for ages so I'll post the code,
    GL> examples etc. to a web site and send around the link. I have
    GL> modified vtkOpenGLProperty and vtkOpenGLPolyDataMapper classes
    GL> that allow backface culling in wireframe and points
    GL> representations.

Can you give me more information on this later on?  You might also
need to update your code to a more recent version of the classes from
CVS.

Quoting your message:

  "Here are the facilities of vtkEPSWriter at the moment:
  -All text from vtkActor2D subclasses and vtkLabeledDataMapper
  -Multiline text (that's why vtkTextMapper has to grant friendship)
  -All actors have the own point size and line width
  -Mixed raster/vector format where the 3D props are written as a
  raster image and 2D props are written as vector images
  -Turn on/off PS Level 3 shading of triangles... to enable
  translation of EPS to PDF
  -Change the sorting algorithms from BSP to simple to off.
  -Occlusion culling of actors completely occluded by other actors"


The features of GL2PSExporter are:
 1. Full text support.
 2. Ability to set the following GL2PS params:
    FileFormat (PS/EPS/TeX), Sorting, DrawBackground,
    SimpleLineOffset, Silent, BestRoot, Text, Landscape/Portrait,
    PS3Shading, and OcclusionCulling.
 3. Minimally intrusive on the rest of VTK.

AFAIK the only things missing in the GL2PS exporter are the following:

 1. Point size and line width settings wont work currently I gather (I
 haven't tested though).
 
 2. Mixed raster/vector format.  I have several questions regarding
 this which I'll mail later.

 3. Special backface culling.


I think we need to discuss the mixed raster vector stuff before I make
any changes.  The changes made towards this will also be useful for
the point/line sizes.  I've run out of time to do all this right now.
As soon as I get some spare time I'll mail you with more detailed
questions.

In the mean time I'd really appreciate it if you (Goodwin) can try out
the GL2PSExporter and see if it works ok.

Thanks!

regards,
prabhu



More information about the vtk-developers mailing list