[Ves] Shading
Pat Marion
pat.marion at kitware.com
Thu Jul 19 15:08:37 EDT 2012
Hi Chris,
By default, Kiwi uses the gouraud shading model, which uses per-vertex
normal vectors. When Kiwi loads a data file, and the data does not define
any normals, then normals are automatically computed. This can cause less
than ideal results for models that contain sharp edges, like the edges
around the hole in the center of your model.
You can solve the problem by opening your data in ParaView and applying the
Generate Surface Normals filter. This filter will add new vertices along
sharp edges so that you can have multiple normal vectors defined at the
edges, this produces much better visuals. The Generate Surface Normals
filter allows you to specify the angle at which sharp edges are split.
After applying the filter, re-save the data. This time, Kiwi will use the
normal vectors computed in ParaView and the visualization should look
better.
In the future, we plan to add a flat shader (non gouraud), so you can
render models with sharp edges without adding new vertices. If you decide
to implement this type of shader yourself, and want to contribute it back,
we'd be happy to have it.
Pat
On Thu, Jul 19, 2012 at 10:38 AM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:
> I can have a look at it later. Thanks for attaching the STL file.
>
>
> On Thu, Jul 19, 2012 at 12:02 PM, Chris Vaught <cvaught at cmv-tech.com>
> wrote:
> > The attached image shows a very simply plate with a hole in the center.
> > This is a simple stl file with no contour data. The stl file is also
> > attached. The resulting shading appears to be messed up. Any thoughts
> on
> > why this is and how to fix it? Also, I am working with the example ios
> > application. How do you change the background color? I changed the
> > background color of the GLView in MainWindow.xib and that did not work.
> >
> > Thanks
> > Chris
> >
> >
> > _______________________________________________
> > Ves mailing list
> > Ves at public.kitware.com
> > http://public.kitware.com/cgi-bin/mailman/listinfo/ves
> >
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20120719/05a7d9d7/attachment-0001.html>
More information about the Ves
mailing list