[Paraview] Gauraud shading when reading from HDF5 file.

David E DeMarle dave.demarle at kitware.com
Wed Mar 18 12:06:18 EDT 2015


XDMF does not have a defined way to mark an array as being "the shading
normals". Even for its attribute types scalar, vector tensor etc, vtk's
DataSetAttributes active attribute concept is not a 1:1 match so losing
semantic information like this in translation there happens.

The work around is to apply a filter that tells ParaView that you want this
specific array to be used in that way.

For example: apply calculator filter with expression "Normals" and check
off the "Result Normals" control.

Note, if speed/memory is a concern you do the same thing by shallow copying
and directly setting the attribute flag in the python programmable filter.


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Fri, Mar 13, 2015 at 11:29 AM, Feijoo, Gonzalo <
gonzalo.feijoo at siemens.com> wrote:

>  Hello, Everyone,
>
>
>
> How can I use normals defined at each node to visualize a triangulation
> using Gouraud shading? If I write my data in the .vtk format, then this is
> automatically done by Paraview by saving the normals in the NORMALS field
> within the POINT_DATA field. But how can I do this from data saved in an
> XDMF/HDF5 file? I mean, how would I need to specify the normals in the XDMF
> file for the shader to use these vectors?
>
>
>
> Thank you in advance for any help.
>
>
>
> Best regards,
>
>
>
> Gonzalo R. Feijóo
>
> Advanced projects and architecture
>
> Specialized Engineering
>
>
>
> Siemens Industry Sector
>
> Siemens Product Lifecycle Management Software Inc.
>
> 200 Fifth Avenue
>
> Waltham, MA  02451 United States
>
> Tel.      :+1 (781) 907-9751
>
> Fax      :+1 (781) 907-9880
>
> gonzalo.feijoo at siemens.com
>
> www.siemens.com/plm
>
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150318/c40bc9cf/attachment.html>


More information about the ParaView mailing list