[vtkusers] ContourFilter normal generation ?

Bill Lorensen wlorens1 at nycap.rr.com
Tue Sep 26 21:30:55 EDT 2000

Try vtkMarchingContourFilter

in 2.3, vtkContourFilter used vtkMarchingCubes internally if appropriate. Now you must use vtkMarchingContourFilter.


At 04:26 PM 9/26/00 -0400, Zsolt Zsoldos wrote:
>Hi All,
>I have recently upgraded my VTK from v2.3 to 3.1.2. My application
>contains a vtkContourFilter applied to a vtkStructuredPoints input.
>In version 2.3 the generated isosurface came up with smooth shading,
>i.e. the normal vectors and gradients were computed per vertex
>according to the value changes in the 3D volume. However, in version
>3.1.2 it comes up with flat-shaded polygons, which looks much worse.
>I tried to set explicitly SetComputeNormals and  SetComputeGradients
>on, but it did not make any difference. 
>Then I checked the VisQuad.cxx example which does come up with smooth 
>shading. I could not see any special calls made that would reveal the
>difference from my code. Then I tried to add 
>   contour->SetComputeNormals(0);
>   contour->SetComputeGradients(0);
>to the example code, and surprisingly, it still comes up with smooth
>Could someone help me find out what causes this change between v2.3
>and v3.1.2, please? Thanks in advance,

More information about the vtkusers mailing list