[vtkusers] Gouraud Shading on combined actor

Affolter Martin martin.affolter at ntb.ch
Tue Aug 21 02:48:21 EDT 2012


It seems like there is no way to do that, at least I didn't find one and I got no response so far. So I'll create two actors: one for meshes with surface-normals (gouraud shading) and one for edges without normals (flat shading).

Von: Affolter Martin
Gesendet: Mittwoch, 8. August 2012 14:48
An: VTK Users (vtkusers at vtk.org)
Betreff: Gouraud Shading on combined actor

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/20120821/23ff15c9/attachment.htm>


More information about the vtkusers mailing list