Re: Use of Tessellation Shader in VTK

David E DeMarle <[email protected]> Thu, 20 Jun 2019 14:47:39 -0400
Newsgroups gmane.comp.lib.vtk.user
Message-ID <CANjZAi-16iPKCmab5TUK1mqfOFHacpUKL+RujfjCdsYhUQzh9w@mail.gmail.com>
--===============1041471109==
Content-Type: multipart/alternative; boundary="0000000000006f557d058bc5c88c"

--0000000000006f557d058bc5c88c
Content-Type: text/plain; charset="UTF-8"

I do not think that tesselation shaders are exposed anywhere yet in VTK.
See vtkShader, vtkShaderProgram and vtkOpenGLPolyData's support for Vertex,
Geometry and Fragment shaders in comparison.

Note, you should re-ask on discourse.vtk.org. The vtk mailing lists are
about to be shut down, and you might have more luck there.

David E DeMarle
Kitware, Inc.
Principal Engineer


On Wed, Jun 19, 2019 at 6:32 AM Tharun <[email protected]> wrote:

> I have a triangular mesh(polygons as cells in vtkPolyData). Each point has
> different color field data. On using Point Color data as scalars, triangles
> have graded color. But, what I want is like in the image below
>
> <http://vtk.1045678.n5.nabble.com/file/t341373/test.png> .
>
> I know that subdividing the triangular mesh into triangles having  same
> color data vertices can give result like this by using Cell data as
> scalars.
>
> Now, our workflow is similar to  example
> <
> https://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/VisualizationAlgorithms/Cxx/FilledContours.cxx>
>
> and I have the desired output. Meshes we deal with have 10s of millions of
> triangles and the process is quite slow.
>
> I recenlty read about Tessellation Shaders at  here
> <http://ogldev.atspace.co.uk/www/tutorial30/tutorial30.html>  , and they
> mentioned about "Primitive Generator" part of Tessellation where we can
> just
> mention the tessellation levels of each triangle by gl_TessLevelOuter and
> gl_TessLevelInner. I believe, specifying gl_TessLevelOuter for every
> triangle of original mesh based on Vertices Color Data for each edge of
> triangles solves my problem with performance.
>
> Can anybody please let me know how to do this in VTK?
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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://vtk.org/mailman/listinfo/vtkusers
>

--0000000000006f557d058bc5c88c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I do not think that tesselation shaders are exposed anywhe=
re yet in VTK. See vtkShader, vtkShaderProgram and vtkOpenGLPolyData&#39;s =
support for Vertex, Geometry and Fragment shaders in comparison.<div><br></=
div><div>Note, you should re-ask on <a href=3D"http://discourse.vtk.org">di=
scourse.vtk.org</a>. The vtk mailing lists are about to be shut down, and y=
ou might have more luck there.</div><div><br></div><div><div><div dir=3D"lt=
r" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D=
"ltr"><div><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div>David E =
DeMarle<br>Kitware, Inc.<br>Principal Engineer</div></div></div></div></div=
></div></div></div><br></div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">On Wed, Jun 19, 2019 at 6:32 AM Tharun &lt;<a=
 href=3D"mailto:[email protected]">[email protected]</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a tria=
ngular mesh(polygons as cells in vtkPolyData). Each point has<br>
different color field data. On using Point Color data as scalars, triangles=
<br>
have graded color. But, what I want is like in the image below<br>
<br>
&lt;<a href=3D"http://vtk.1045678.n5.nabble.com/file/t341373/test.png" rel=
=3D"noreferrer" target=3D"_blank">http://vtk.1045678.n5.nabble.com/file/t34=
1373/test.png</a>&gt; . <br>
<br>
I know that subdividing the triangular mesh into triangles having=C2=A0 sam=
e<br>
color data vertices can give result like this by using Cell data as scalars=
.<br>
<br>
Now, our workflow is similar to=C2=A0 example<br>
&lt;<a href=3D"https://vtk.org/gitweb?p=3DVTK.git;a=3Dblob;f=3DExamples/Vis=
ualizationAlgorithms/Cxx/FilledContours.cxx" rel=3D"noreferrer" target=3D"_=
blank">https://vtk.org/gitweb?p=3DVTK.git;a=3Dblob;f=3DExamples/Visualizati=
onAlgorithms/Cxx/FilledContours.cxx</a>&gt;=C2=A0 <br>
and I have the desired output. Meshes we deal with have 10s of millions of<=
br>
triangles and the process is quite slow.<br>
<br>
I recenlty read about Tessellation Shaders at=C2=A0 here<br>
&lt;<a href=3D"http://ogldev.atspace.co.uk/www/tutorial30/tutorial30.html" =
rel=3D"noreferrer" target=3D"_blank">http://ogldev.atspace.co.uk/www/tutori=
al30/tutorial30.html</a>&gt;=C2=A0 , and they<br>
mentioned about &quot;Primitive Generator&quot; part of Tessellation where =
we can just<br>
mention the tessellation levels of each triangle by gl_TessLevelOuter and<b=
r>
gl_TessLevelInner. I believe, specifying gl_TessLevelOuter for every<br>
triangle of original mesh based on Vertices Color Data for each edge of<br>
triangles solves my problem with performance.<br>
<br>
Can anybody please let me know how to do this in VTK?<br>
<br>
<br>
<br>
--<br>
Sent from: <a href=3D"http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.h=
tml" rel=3D"noreferrer" target=3D"_blank">http://vtk.1045678.n5.nabble.com/=
VTK-Users-f1224199.html</a><br>
_______________________________________________<br>
Powered by <a href=3D"http://www.kitware.com" rel=3D"noreferrer" target=3D"=
_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" rel=3D"noreferrer" target=3D"_blank">http://=
www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href=3D"http://w=
ww.vtk.org/Wiki/VTK_FAQ" rel=3D"noreferrer" target=3D"_blank">http://www.vt=
k.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href=3D"http://markmail.org/search/?q=3Dvtk=
users" rel=3D"noreferrer" target=3D"_blank">http://markmail.org/search/?q=
=3Dvtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"https://vtk.org/mailman/listinfo/vtkusers" rel=3D"noreferrer" ta=
rget=3D"_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div>

--0000000000006f557d058bc5c88c--

--===============1041471109==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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://vtk.org/mailman/listinfo/vtkusers

--===============1041471109==--