[vtkusers] STLWriter producing pixelated images?

Cory Quammen cory.quammen at kitware.com
Tue Jun 14 08:03:19 EDT 2016


I think you mean that the surface from the STL file appears to not be
smooth. This is because STL does not store surface normal information
at the vertices, so your geometry is being rendered with flat shading
of the triangles.

To get a smoother appearance, generate surface normals with the
vtkPolyDataNormals filter. See, for example,

http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals

HTH,
Cory


On Tue, Jun 14, 2016 at 1:30 PM, Hp07 <hinesh_88 at hotmail.co.uk> wrote:
> Hi all,
>
> I am using CT image scans rendered into a 3d graphic. When the image is
> displayed in OpenGL the 3d image is smooth and clear - im happy with the
> image. When i however try to read the saved .stl file in wxpython, the image
> is more pixelated compared to the orignally displayed image in vtk.
> Is there paramters that i may need to inlcude to reproduce a similar image
> to the orginal?
>
> any advice will be much appreciated.
>
> Many thanks in advance.
>
> The code i used to open a .STL files using 3d rendered images from vtk is
> found on:
>
> https://sukhbinder.wordpress.com/2013/12/24/lights-cameras-action-a-simple-example-to-embed-vtk-with-wxpython/
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/STLWriter-producing-pixelated-images-tp5738653.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list