[vtkusers] ContourFilter normal generation ?

Zsolt Zsoldos zsolt at simbiosys.ca
Tue Sep 26 16:26:47 EDT 2000


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
shading...

Could someone help me find out what causes this change between v2.3
and v3.1.2, please? Thanks in advance,

Zsolt




More information about the vtkusers mailing list