[vtk-developers] Writing an Exporter

Michail Vidiassov master at iaas.msu.ru
Wed May 27 02:52:27 EDT 2009


Dear Developers,

I am considering writing an exporter to a VRML-like format and
thus try to use the most modern of VTK exporters of that type,
X3D exporter. But I have got a bunch of questions of
"why is it done in this way" and some of "how to do that properly" type. 
The last type has unswers in C++ in OpenGL rendering part of 
VTK, but I am not sure if I can always understand it correcly.

Some questions (in no particular order):

1) When reducing data to polygons vtkGeomeryFiler is used, why not vtkDataSetSurfaceFilter?

2) If I have cell colors and I have to define different materials for cells 
of different colors - what colors to define? Diffuse color has to be equal 
to cell color, that is clear. But do I have to set specular 
color the same for all cells and take it from Actor proprties or it has
to be equal to cell color? What about emissive?

3) In X3D all scalars are mapped to per-vertex or per-cell colors, while 
in OpenGL renderer 1D (and 2D?) scalars become texture coords, while 
texture encodes the mapping from scalars to colors. That later approach is 
also possible in X3D, but that route was not taken. Why?

4) If a mesh has color properties, per-vertex (or per-cell) scalars/colors 
and a texture applied - what the resulting color should be like?

5) In X3D exporter the alpha component of per-cell or per-vertex colors is 
ignored. Does it mean that VTK never uses it?

6) Is it possible to precompute lighting effects in VTK (calculate 
resulting vertex colors) instead of exporting information about lights and 
their positions? How?

7) Assembiles are not translated into groups of X3D objects. What are the 
reasons? Why Assembiles did not map well?

       Sincerely, Michail

PS. I am (again) playing with the idea to produce 3D PDF files from VTK.



More information about the vtk-developers mailing list