<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
h1
{mso-style-priority:9;
mso-style-link:"Heading 1 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:24.0pt;
font-family:"Times New Roman","serif";
font-weight:bold;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-priority:9;
mso-style-link:"Heading 1";
font-family:"Times New Roman","serif";
font-weight:bold;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:644508803;
mso-list-template-ids:1156119028;}
@list l0:level1
{mso-level-start-at:10;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:665524195;
mso-list-template-ids:1203916246;}
@list l2
{mso-list-id:1038580427;
mso-list-template-ids:976507748;}
@list l2:level1
{mso-level-start-at:6;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l3
{mso-list-id:1067455930;
mso-list-template-ids:1502791454;}
@list l3:level1
{mso-level-start-at:3;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l4
{mso-list-id:1073310722;
mso-list-template-ids:-1118513854;}
@list l4:level1
{mso-level-start-at:4;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l5
{mso-list-id:1235773647;
mso-list-template-ids:840979986;}
@list l5:level1
{mso-level-start-at:9;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l6
{mso-list-id:1260068173;
mso-list-template-ids:1920919062;}
@list l6:level1
{mso-level-start-at:2;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l7
{mso-list-id:1295216501;
mso-list-template-ids:1111800836;}
@list l7:level1
{mso-level-start-at:11;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l8
{mso-list-id:1367757690;
mso-list-template-ids:-1955158390;}
@list l8:level1
{mso-level-start-at:8;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l9
{mso-list-id:1416629257;
mso-list-template-ids:-1009892836;}
@list l9:level1
{mso-level-start-at:7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l10
{mso-list-id:2131241908;
mso-list-template-ids:-1208025510;}
@list l10:level1
{mso-level-start-at:5;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l6:level1 lfo2
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l3:level1 lfo3
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l4:level1 lfo4
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l10:level1 lfo5
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l2:level1 lfo6
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l9:level1 lfo7
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l8:level1 lfo8
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l5:level1 lfo9
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l0:level1 lfo10
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
@list l7:level1 lfo11
{mso-level-start-at:0;
mso-level-numbering:continue;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:0in;
text-indent:0in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style></head><body lang="EN-US" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Yes, that used to be a common problem in the early days of graphic libraries as they often would render quads differently depending on implementation. </span></a></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I added it to the running list of regressions/todos which is included below:</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal" style="margin-top:10.0pt"><span style="font-size:16.0pt;font-family:"Trebuchet MS","sans-serif";color:black">Changes/ToDos/Regressions</span><b><span style="font-size:24.0pt"></span></b></p><p class="MsoNormal"> </p><ol style="margin-top:0in" start="1" type="1"><li class="MsoNormal" style="color:black;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif"">Gouraud shading dropped, actors set to Gouraud now render using Phong shading</span></li></ol><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>2.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">Wireframe polygons without normals are now lighted differently than before. Previously VTK would generate vertex normals from the polygon and use those to light the wireframe line. The new code lights the lines in the fragment shader by generating a normal that is perpendicular to the line and maximally aligned with the camera view direction. That normal is then used for lighting calcs. This results in different images but arguably just as intuitive as the prior approach.</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>3.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">currently when picking, only 16,777,215 primitives per mapper are supported, could extend this up to 2^31 without too much grief, beyond that gl_PrimitiveID will not work and we would just have to loop in the mapper rendering a batch of prims at a time</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>4.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">SetZBuffer data function in RenderWindow is currently not working, have to take the same approach as SetRGBA functions and have a shader do this.</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>5.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">ImageSliceMapper and ImageMapper should be modified to directly use TextureObject instead of vtkTexture, saving some pipeline overhead etc.</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>6.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">triangle cell data passed into strips via field data does not work, and I would say we do not support this odd case. Maybe modify stripper to complain if PassCellDataAsFieldData is turned on.</span></p><p class="MsoNormal"> </p><p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">vtkStripper stripper</span></p><p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">stripper PassCellDataAsFieldDataOn</span></p><p class="MsoNormal"> </p><p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">vtkPolyDataMapper sphereMapper</span></p><p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">sphereMapper SetColorModeToMapScalars</span></p><p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">sphereMapper SetScalarModeToUseFieldData</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>7.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">When no lights are on, the old backend would still apply lighting equations just with no lights (mostly, the valid image for NoLightGeneration is missing the line, seems wrong). The new backend does not apply lighting equations in that case, rather it treats it like the 2d mapper, rendering without a lighting model. The old approach can be achieved simply by having a light that has it’s intensity set to zero (as opposed to being turned off) if that is what you are after.</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>8.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">Need to cache VBOs, so that if multiple mappers are using the same VBO they share it. Related to that, right now we rebuild the VBO even if just the IBO is changing, a VBO cache would handle that case as well and is s step towards sharing gl buffers data between actors/mappers.</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>9.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">When a texture map modulates the color on a fragment, the old code limited the color to 1.0 before modulating against the texture. In the new code the color of a fragment may exceed 1.0 and then be modulated by a texture and finally truncated to 1.0. This can produce different results when the fragment is overlit (e.g. diffuse = 1.0 ambient = 1.0 and then modulated by a texture.)</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>10.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">Should try fixing the math in texture object, it is using texture size when it should be destination size when doing the 0.5 thing. Mostly is not caught as the texture is often the same size as the destination.</span></p><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-left:0in;text-indent:0in;vertical-align:baseline"><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black"><span style>11.<span style="font:7.0pt "Times New Roman""> </span></span></span><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:black">Quads and higher degree polygons are converted to triangles by the OpenGL backend prior to being sent to OpenGL. This can result in different interpolation versus the old backend.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Ken Martin PhD</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Chairman & CFO</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Kitware Inc.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">28 Corporate Drive</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Clifton Park NY 12065</span></p><p class="MsoNormal"><a href="mailto:ken.martin@kitware.com"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">ken.martin@kitware.com</span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">518 881-4901 (w)</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">518 371-4573 (f)</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> vtk-developers [mailto:<a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a>] <b>On Behalf Of </b>Joachim Pouderoux<br><b>Sent:</b> Tuesday, April 28, 2015 5:57 AM<br><b>To:</b> VTK Developers<br><b>Cc:</b> Mathieu Westphal<br><b>Subject:</b> [vtk-developers] OpenGL backend differences</span></p><p class="MsoNormal"> </p><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,</p></div><p class="MsoNormal">Mathieu and I were facing a tricky situation when adding a new VTK test.</p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>We basically tried to render a piece of a RTAnalyticSource. We generated the baseline image with the legacy backend and tests were failing with the OpenGL 2 backend. Attached are the images we obtained with the two backends - you can see that the color spots have not the same orientation.</p></div><div><p class="MsoNormal">We finally found the origin of the problem: as the grid is made of hexahedron, the geometry filter generates a surface made of quads.<br>For the legacy backend, rendering quads is not an issue as OpenGL allows to render (non-convex) polygons directly, so the legacy painter-mapper directly sends the quad to OpenGL for rendering.<br>With the new backend, only triangles are transferred to the graphic board and a triangulation is implicitly performed by the mapper (actually by vtkglVBOHelper.cxx:338 - vtkgl::AppendTriangleIndexBuffer function). Note that this function respects the order of the triangulation performed by vtkQuad::Triangulate() but it seems like it is not the one implicitly performed by OpenGL (or some OpenGL implementations at least) when you render quad primitives.</p></div><div><p class="MsoNormal">To fix the issue we inserted a vtkTriangleFilter between the GeometryFilter and the Mapper so that both mapper implementations end up with the same triangulated mesh to render.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I think this behaviour should be documented somewhere (may be it is already? anyway now at least it is here) as I am sure this should cause problems later.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Best,</p></div><div><div><div><p class="MsoNormal"><br clear="all"></p><div><div><div><div><div><div><p class="MsoNormal"><b>Joachim Pouderoux</b></p><p class="MsoNormal"><i><span style="font-size:7.5pt">PhD, Technical Expert</span></i><br><b><span style="font-size:7.5pt"><a href="http://www.kitware.fr" target="_blank">Kitware SAS</a></span></b></p></div></div></div></div></div></div></div></div></div></div></div></body></html>