[Paraview] sources: why redundant number of points needed?

B.W.H. van Beest bwvb at xs4all.nl
Sat Oct 11 13:00:05 EDT 2014


Got it. Thanks for the ref.
Bw
On 10/11/2014 05:34 PM, Cory Quammen wrote:
> Bertwim,
>
> In fact, with Gouraud shading enabled (the default in ParaView when
> point normals are available), normals are defined only per point - no
> face normal is needed. If you change the Interpolation to Flat under
> the "Lighting" section in the Properties panel, only the face normal
> will be computed and used for lighting, but objects with smooth
> surfaces, such as spheres, won't be rendered very nicely - edges
> between adjacent faces will be sharp.
>
> For a general overview of Gouraud shading and some background on what
> is needed for getting sharp edges, please see
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/bb324491(v=vs.85).aspx
>
> It is geared towards Direct3D, but the same concepts apply to OpenGL
> and in turn VTK and ParaView.
>
> Cory
>
>
> On Sat, Oct 11, 2014 at 11:13 AM, B.W.H. van Beest <bwvb at xs4all.nl> wrote:
>> Cory,
>>
>> So indeed there has to be a normal *per point and per face*, and not
>> *per face*?
>> And, likewise, points are not shared between adjacent faces.
>> I had overlooked that detail in the documentation, tacitly assuming that
>> "of course"
>> the normals are  *per face*.
>>
>> Regards,
>> Bertwim
>>
>> On 10/11/2014 04:48 PM, Cory Quammen wrote:
>>> Bertwim,
>>>
>>> You are right that there is a redundancy in points. That stems from
>>> the need for defining different normals at the corner points for each
>>> face. In theory, you could define more than one normal for the same
>>> point and associate it with a face, but that complicates the data
>>> structure. It is much simpler to duplicate points and associate
>>> exactly one normal per point.
>>>
>>> In most polygonal data, you won't see duplicated points at most
>>> places. But for anything that should be displayed with a sharp edge,
>>> duplicate points will be present.
>>>
>>> - Cory
>>>
>>> On Sat, Oct 11, 2014 at 10:23 AM, B.W.H. van Beest <bwvb at xs4all.nl> wrote:
>>>> Hi,
>>>>
>>>> When I look into the source code of vtkCubeSource.cpp,
>>>> I noticed that, although  a (rectangular) 3D box can be described by
>>>> 8 3D points and 6 2D faces (hence also 6 3D normal vectors),
>>>> in the actual code of vtkCubeBoxSource:RequestData() there are 24 3D
>>>> points generated,
>>>> with for every point a normal (???), and indeed 6 faces (polys).
>>>> Why is there this redundancy?
>>>>
>>>> I bumped on this when I applied the "HiddenLineRemoval" representation to
>>>> my own handcrafted box (with 8 points, 6 faces and 6 normals). It yielded
>>>> an incorrect view whereas the box with the redundant numbers of data
>>>> gave the correct one. But I don't get the logic.
>>>>
>>>> Regards,
>>>> Bertwim
>>>> _______________________________________________
>>>> 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/paraview
>



More information about the ParaView mailing list