[vtkusers] Gouraud Shading on combined actor

Affolter Martin martin.affolter at ntb.ch
Wed Aug 8 08:47:53 EDT 2012


Hi vtkusers,

I combine vtkPolydata (meshes including normals, tessellated edges, vertices)  with the vtkAppendPolyDataFilter and use one single actor to visualize it. Unfortunately vtkAppendPolyDataFilter removes the meshes' normals, beause the edges and vertices do not come with normals. This is a problem, since Gouraud-shading needs normals at the meshes' points in order to work.


-          One solution would be to visualize meshes and edges/vertices separately (one actor for the meshes, one for edges/vertices), but I'd really like to stick with the single actor.

-          I tried providing the missing normals to the edges and vertices so that the vtkAppendPolyDataFilter wouldn't remove the meshes' normals. It worked, but then I have Gouraud-shading on the edges and vertices too, which is not what I wanted (flat shading for edges and vertices gives much better contrast for CAD-tools).

What I'm looking for is Gouraud-shading for meshes only while still being able to combine them with edges and vertices into one single actor. Is this possible? Any ideas how to accomplish that?

Thanks.
Martin Affolter
Dipl. Ing FH
Wissenschaftlicher Mitarbeiter
___________________________________________
NTB Interstaatliche Hochschule für Technik Buchs
Institut für Ingenieurinformatik
Schönauweg 4
CH-9013 St. Gallen

Tel:  +41 81 755 32 49
Web: http://www.ntb.ch<http://www.ntb.ch/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120808/c6c32303/attachment.htm>


More information about the vtkusers mailing list