[vtkusers] Questions about vtkPolyData
David E DeMarle
dave.demarle at kitware.com
Fri Jun 8 17:26:25 EDT 2018
You can use mapper->MapDataArrayToVertexAttribute() to hand over specific
data arrays of your choice to your custom shaders.
David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Fri, Jun 8, 2018 at 5:14 PM, Jonathan Borduas <
jonathan.borduas at caboma.com> wrote:
> Never play with that, but you specify “user” shader like this:
>
> https://gitlab.kitware.com/vtk/vtk/blob/v7.0.0.rc2/
> Rendering/OpenGL2/Testing/Cxx/TestUserShader.cxx
>
> Jonathan Borduas
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
> ------------------------------
> *From:* Patrick Bergeron <pbergeron at spiria.com>
> *Sent:* Friday, June 8, 2018 4:43:21 PM
> *To:* Jonathan Borduas; vtkusers at vtk.org
>
> *Subject:* Re: [vtkusers] Questions about vtkPolyData
>
>
> 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>
> *Date: *Thursday, June 7, 2018 at 7:18 PM
> *To: *Patrick Bergeron <pbergeron at spiria.com>, "vtkusers at vtk.org" <
> 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> on behalf of
> Patrick Bergeron <pbergeron at spiria.com>
> *Sent:* Thursday, June 7, 2018 7:08:43 PM
> *To:* 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
>
> _______________________________________________
> 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:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180608/d6832989/attachment.html>
More information about the vtkusers
mailing list