[vtkusers] Questions about vtkPolyData

Patrick Bergeron pbergeron at spiria.com
Fri Jun 8 16:43:21 EDT 2018


Yep, I got that.

My question “Do these values make it into vertex shaders?“ was meant so that I’d like to know that, if they DO get into shaders, how would they be names, and what would the shader script look like, because I need to do custom GLSL shading stuff with scalar/vector attributes that are sent on a per-vertex basis.

(in fact, I want data to be sent on a per-vertex basis to the VTK vertex shader, so that I can make them a varying variable in the fragment shader).

Thanks!
Patrick

From: Jonathan Borduas <jonathan.borduas at caboma.com>
Date: Friday, June 8, 2018 at 2:03 PM
To: Patrick Bergeron <pbergeron at spiria.com>, "vtkusers at vtk.org" <vtkusers at vtk.org>
Subject: RE: [vtkusers] Questions about vtkPolyData

Hi Patrick,

You can do per-vertex and per-cell coloring.
https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints
https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCellsWithRGB

For UV texture shading:
https://www.vtk.org/Wiki/VTK/Examples/Cxx/Texture/TexturedSphere
http://scylardor.fr/2013/05/06/making-multi-texturing-work-with-vtk/

To try some of the possibilities of VTK, you want to use ParaView. This application is heavily based on VTK and can give you a good sense of what is feasible with VTK.
https://www.paraview.org/download/

Best

Jonathan

From: Patrick Bergeron <pbergeron at spiria.com>
Sent: Friday, June 08, 2018 12:58 PM
To: Jonathan Borduas <jonathan.borduas at caboma.com>; vtkusers at vtk.org
Subject: Re: [vtkusers] Questions about vtkPolyData

Thanks. Do these values make it into vertex shaders?

From: Jonathan Borduas <jonathan.borduas at caboma.com<mailto:jonathan.borduas at caboma.com>>
Date: Thursday, June 7, 2018 at 7:18 PM
To: Patrick Bergeron <pbergeron at spiria.com<mailto:pbergeron at spiria.com>>, "vtkusers at vtk.org<mailto:vtkusers at vtk.org>" <vtkusers at vtk.org<mailto:vtkusers at vtk.org>>
Subject: Re: [vtkusers] Questions about vtkPolyData

Hey

All these examples may help.

https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ColoredPoints

https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData

https://www.vtk.org/Wiki/VTK/Examples/Cxx/VTKConcepts/Scalars

Best,

Jonathan Borduas


Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: vtkusers <vtkusers-bounces at public.kitware.com<mailto:vtkusers-bounces at public.kitware.com>> on behalf of Patrick Bergeron <pbergeron at spiria.com<mailto:pbergeron at spiria.com>>
Sent: Thursday, June 7, 2018 7:08:43 PM
To: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: [vtkusers] Questions about vtkPolyData

Hi everyone.

How would I go about specifying multiple sets of user attributes on a per-vertex basis on a polydata?

For example, hlet’s say I would like multiple sets of uv coordinates, normal, colors, int attributes, etc?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180608/5e86fa70/attachment.html>


More information about the vtkusers mailing list