vtkCylinderSource and Gouraud Shading

Bill Lorensen wlorens1 at nycap.rr.com
Tue Dec 14 21:44:16 EST 1999


Try
pNormals->SetFeatureAngle (37);

Any angloe > 36 should work for your example.

The default FeatureAngle is 10

360/10 = 36

Bill

At 02:23 PM 12/14/99 +0100, Patric Weis wrote:
>Hi vtkUsers!
>
>I would like to render a smoothly shaded cylinder and tried the
>following:
>
>...
>vtkCylinderSource *pCylinder = vtkCylinderSource::New();
>pCylinder->SetRadius(1.0);
>pCylinder->SetResolution(10);
>
>vtkPolyDataNormals *pNormals = vtkPolyDataNormals::New();
>pNormals->SetInput(pCylinder->GetOutput());
>
>vtkPolyDataMapper *pMapper = vtkPolyDataMapper::New();
>pMapper->SetInput(pNormals->GetOutput());
>
>vtkActor *pActor = vtkActor::New();
>pActor->SetMapper(pMapper);
>pActor->GetProperty()->SetInterpolationToGouraud();
>...
>
>
>What I get is a flat shaded cylinder. With polydata readers I do not
>have such problems.
>What do I do wrong? Maybe I do not exactly understand the concept of vtk
>sources.
>
>Thanks,
>
>Patric Weis
>MYCRONA




-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list