Questions about vtkPolyData

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions about vtkPolyData

drjustice

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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

jbor
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



From: vtkusers <[hidden email]> on behalf of Patrick Bergeron <[hidden email]>
Sent: Thursday, June 7, 2018 7:08:43 PM
To: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

drjustice

Thanks. Do these values make it into vertex shaders?

 

From: Jonathan Borduas <[hidden email]>
Date: Thursday, June 7, 2018 at 7:18 PM
To: Patrick Bergeron <[hidden email]>, "[hidden email]" <[hidden email]>
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

 

 


From: vtkusers <[hidden email]> on behalf of Patrick Bergeron <[hidden email]>
Sent: Thursday, June 7, 2018 7:08:43 PM
To: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

jbor

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 <[hidden email]>
Sent: Friday, June 08, 2018 12:58 PM
To: Jonathan Borduas <[hidden email]>; [hidden email]
Subject: Re: [vtkusers] Questions about vtkPolyData

 

Thanks. Do these values make it into vertex shaders?

 

From: Jonathan Borduas <[hidden email]>
Date: Thursday, June 7, 2018 at 7:18 PM
To: Patrick Bergeron <
[hidden email]>, "[hidden email]" <[hidden email]>
Subject: Re: [vtkusers] Questions about vtkPolyData

 


From: vtkusers <[hidden email]> on behalf of Patrick Bergeron <[hidden email]>
Sent: Thursday, June 7, 2018 7:08:43 PM
To:
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

drjustice

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 <[hidden email]>
Date: Friday, June 8, 2018 at 2:03 PM
To: Patrick Bergeron <[hidden email]>, "[hidden email]" <[hidden email]>
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 <[hidden email]>
Sent: Friday, June 08, 2018 12:58 PM
To: Jonathan Borduas <[hidden email]>; [hidden email]
Subject: Re: [vtkusers] Questions about vtkPolyData

 

Thanks. Do these values make it into vertex shaders?

 

From: Jonathan Borduas <[hidden email]>
Date: Thursday, June 7, 2018 at 7:18 PM
To: Patrick Bergeron <
[hidden email]>, "[hidden email]" <[hidden email]>
Subject: Re: [vtkusers] Questions about vtkPolyData

 


From: vtkusers <[hidden email]> on behalf of Patrick Bergeron <[hidden email]>
Sent: Thursday, June 7, 2018 7:08:43 PM
To:
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

jbor
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


From: Patrick Bergeron <[hidden email]>
Sent: Friday, June 8, 2018 4:43:21 PM
To: Jonathan Borduas; [hidden email]
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 <[hidden email]>
Date: Friday, June 8, 2018 at 2:03 PM
To: Patrick Bergeron <[hidden email]>, "[hidden email]" <[hidden email]>
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 <[hidden email]>
Sent: Friday, June 08, 2018 12:58 PM
To: Jonathan Borduas <[hidden email]>; [hidden email]
Subject: Re: [vtkusers] Questions about vtkPolyData

 

Thanks. Do these values make it into vertex shaders?

 

From: Jonathan Borduas <[hidden email]>
Date: Thursday, June 7, 2018 at 7:18 PM
To: Patrick Bergeron <
[hidden email]>, "[hidden email]" <[hidden email]>
Subject: Re: [vtkusers] Questions about vtkPolyData

 


From: vtkusers <[hidden email]> on behalf of Patrick Bergeron <[hidden email]>
Sent: Thursday, June 7, 2018 7:08:43 PM
To:
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

David E DeMarle
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 <[hidden email]> wrote:
Never play with that, but you specify “user” shader like this:


Jonathan Borduas


From: Patrick Bergeron <[hidden email]>
Sent: Friday, June 8, 2018 4:43:21 PM
To: Jonathan Borduas; [hidden email]

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 <[hidden email]>
Date: Friday, June 8, 2018 at 2:03 PM
To: Patrick Bergeron <[hidden email]>, "[hidden email]" <[hidden email]>
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 <[hidden email]>
Sent: Friday, June 08, 2018 12:58 PM
To: Jonathan Borduas <[hidden email]>; [hidden email]
Subject: Re: [vtkusers] Questions about vtkPolyData

 

Thanks. Do these values make it into vertex shaders?

 

From: Jonathan Borduas <[hidden email]>
Date: Thursday, June 7, 2018 at 7:18 PM
To: Patrick Bergeron <
[hidden email]>, "[hidden email]" <[hidden email]>
Subject: Re: [vtkusers] Questions about vtkPolyData

 


From: vtkusers <[hidden email]> on behalf of Patrick Bergeron <[hidden email]>
Sent: Thursday, June 7, 2018 7:08:43 PM
To:
[hidden email]
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



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Questions about vtkPolyData

Bill Lorensen
In reply to this post by drjustice
First, please do not use the examples at https://www.vtk.org/Wiki/VTK/Examples
These are no longer updated and will eventually go away. Instead use
the site, https://lorensen.github.io/VTKExamples/site/ which contains
updated and expanded examples as well as copies of the textbook:
https://lorensen.github.io/VTKExamples/site/VTKBook/

There are a few shader examples here
https://lorensen.github.io/VTKExamples/site/Cxx/#shaders

You can also follow progress of the VTK Examples Project at :
https://www.researchgate.net/project/VTK-Examples
Here is as vertex shader:
https://lorensen.github.io/VTKExamples/site/Cxx/Shaders/BozoShader/

Bill

On Fri, Jun 8, 2018 at 1:43 PM, Patrick Bergeron <[hidden email]> wrote:

> 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 <[hidden email]>
> Date: Friday, June 8, 2018 at 2:03 PM
> To: Patrick Bergeron <[hidden email]>, "[hidden email]"
> <[hidden email]>
> 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 <[hidden email]>
> Sent: Friday, June 08, 2018 12:58 PM
> To: Jonathan Borduas <[hidden email]>; [hidden email]
> Subject: Re: [vtkusers] Questions about vtkPolyData
>
>
>
> Thanks. Do these values make it into vertex shaders?
>
>
>
> From: Jonathan Borduas <[hidden email]>
> Date: Thursday, June 7, 2018 at 7:18 PM
> To: Patrick Bergeron <[hidden email]>, "[hidden email]"
> <[hidden email]>
> 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
>
> ________________________________
>
> From: vtkusers <[hidden email]> on behalf of Patrick
> Bergeron <[hidden email]>
> Sent: Thursday, June 7, 2018 7:08:43 PM
> To: [hidden email]
> 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
>



--
Unpaid intern in BillsParadise at noware dot com
_______________________________________________
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