[vtkusers] The order of indexes in tetrahedrons defined in VTK files

Will Schroeder will.schroeder at kitware.com
Mon May 28 01:32:34 EDT 2001


>
>     PP> My question is: is there any rule about the ordering of the
>     PP> indices such that there will be no artificial planes?

and

>with opacity set to 0.65).


The artifacts that you are seeing are due to the fact that you are 
rendering translucent primitives. In OpenGL (and most hardware-assisted 
rendering engines), you typically render from back to front. VTK is not 
ordering the faces of the tetrahedron when you render, so you get the 
blending artifacts. Changing the indices around just changes the order in 
which the faces are rendered, but not necessarily to the right order. The 
filter vtkDepthSortPolyData helps in some cases, but it's a dirty 
implementations that works best when you have lots of primitives, it won't 
work very well with such a few tetrahedron.

To do it right: create a BSP tree, or order the facets yourself. You can 
also use a RenderMan compatible renderer to sort the polygons for you 
during rendering.

Will





William J. Schroeder, Ph.D.
Kitware, Inc.
VTK-Based Visualization Solutions
469 Clifton Corporate Parkway
Clifton Park, NY 12065 USA
will.schroeder at kitware.com
http://www.kitware.com
1-518-371-3971 x102





More information about the vtkusers mailing list