<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">The errors are because I didn't understand that vtkNew<> is different from vtkSmartPointer<>::New, and tried to do things the way I've always done, with vtkSmartPointer.  (Is vtkNew documented anywhere?  It's not in the book.  The man page
 for it says how to use it, but doesn't discuss how it differs from vtkSmartPointer or how to choose which to use.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do I need to rebuild vtk with BUILD_TESTING and BUILD_EXAMPLES in order to run the test you linked without modification?  It looks like that will take a while…  Is there a short cut?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-- Steve<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Ken Martin <ken.martin@kitware.com><br>
<b>Date: </b>Friday, December 8, 2017 at 2:11 PM<br>
<b>To: </b>"Langer, Stephen A. (Fed)" <stephen.langer@nist.gov><br>
<b>Cc: </b>VTK Users <vtkusers@vtk.org><br>
<b>Subject: </b>Re: [vtkusers] Antialiasing questions on 8.1.0.rc2<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Well what did render looks nice :-) The errors are unrelated I believe. 
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I just ran the example test for SSAA and it looks fine so I suspect it is something different between the test and your code. I would guess that something has turned depth testing off and SSAAPass or related is not turning them on at the
 right time. Maybe try looking at the difference between the test I linked and your code and see if changing one of them makes the difference.<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Dec 8, 2017 at 1:58 PM, Langer, Stephen A. (Fed) <<a href="mailto:stephen.langer@nist.gov" target="_blank">stephen.langer@nist.gov</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Ken --<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks.  That helps a lot.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">FXAA seems to work, but SSAA is giving me strange results for the surface representation of grids of tetrahedral or hexahedra.  Some surfaces aren't drawn, some are drawn at the
 wrong depth, and there are error messages from vtkSSAAPass:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
 <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 59<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
vtkSSAAPass (0x7fc596326370): FrameBufferObject should have been deleted in ReleaseGraphicsResources().<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
 <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 63<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
vtkSSAAPass (0x7fc596326370): Pass1 should have been deleted in ReleaseGraphicsResources().<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
 <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 67<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
vtkSSAAPass (0x7fc596326370): Pass2 should have been deleted in ReleaseGraphicsResources().<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I've attached two screenshots, with and without SSAA.  The displayed object is the output from a vtkRectlinearGridAlgorithm subclass that I've defined to take data from a vtkImage
 and display the voxels as rectangular prisms instead of points.  I don't think that that subclass is the problem, since it displays correctly with no antialiasing, and also with FXAA or the old AA frames.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-- Steve<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Ken Martin <<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>><br>
<b>Date: </b>Friday, December 8, 2017 at 8:54 AM<br>
<b>To: </b>"Langer, Stephen A. (Fed)" <<a href="mailto:stephen.langer@nist.gov" target="_blank">stephen.langer@nist.gov</a>><br>
<b>Cc: </b>VTK Users <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
<b>Subject: </b>Re: [vtkusers] Antialiasing questions on 8.1.0.rc2</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">See this post
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog.kitware.com%2Fnew-fxaa-anti-aliasing-option-in-paraviewvtk%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=Qd9llJG%2B287hmUMlQ3u8%2FL0sffswGvkAEl7i9ocPQ9I%3D&reserved=0" target="_blank">https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">which talks about using FXAA in Paraview, but the support is built into VTK via <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.vtk.org%2Fdoc%2Fnightly%2Fhtml%2FclassvtkRenderer.html%23a3f46ed85e17e5e297e6c3b02be07ebba&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=RFV5AUlwNJbfJjelCsjhdZouBB%2FJCLMrZ0pmTFIOHVc%3D&reserved=0" target="_blank">https://www.vtk.org/doc/nightly/html/classvtkRenderer.html#a3f46ed85e17e5e297e6c3b02be07ebba</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Other options include SSAA an example of which is shown here<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKitware%2FVTK%2Fblob%2Fmaster%2FRendering%2FOpenGL2%2FTesting%2FCxx%2FTestSSAAPass.cxx&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=oTJ%2FBzRzoC6ruS0hqBFh1rj8MNommlBWk%2B7NqJMXk8o%3D&reserved=0" target="_blank">https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/TestSSAAPass.cxx</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Both should be faster than the old AAFrames approach. FXAA will be very fast, almost free, SSAA will be slower than FXAA and depends on its settings, as it is a more brute force
 approach,. But even SSAA should be faster than the old AA frames approach.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ken<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) <<a href="mailto:stephen.langer@nist.gov" target="_blank">stephen.langer@nist.gov</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi --<br>
<br>
I'm trying out 8.1.0.rc2 and it says that antialiasing with vtkRenderWindow::SetAAFrames is deprecated, so I tried using SetMultiSamples instead.   If I set a non-trivial number of samples before the first call to Render, it works, but if I change the the number
 of samples and call Render again, it has no effect.  Is this expected?  Do I have to do something else to get the sampling to change?  This is using vtkCocoaRenderWindow.<br>
<br>
Is there a different substitute for SetAAFrames?  SetMultiSamples also has no effect on a Linux VM where I'm using vtkXOpenGLRenderWindow.  I'm guessing that's because the VM has no hardware graphics acceleration.  Is there a non-deprecated replacement for
 SetAAFrames that doesn't rely on hardware?<br>
<br>
Thanks.<br>
<br>
 -- Steve<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=5%2B6HqMBdqJSnOpUbMHZ70EIlk%2FThW7EHwTUsIfhU61Y%3D&reserved=0" target="_blank">
www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=DtMlpjtCOYQ9v7c%2FUX4M4%2BH4WlkvT%2FP9m3q%2FZIE782I%3D&reserved=0" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=coDwzcVCE%2FE9Nr8aCg2Av%2FN9TGft%2B1iEFWLbn3D8EKA%3D&reserved=0" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=riXB1hTtziGERoNyn1g8Jrht6MlmZPKmWL%2FdN63LiGM%3D&reserved=0" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C4091306cc92141960d2f08d53e433c3b%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483380855721972&sdata=%2FeGSsq3ppX91mFI8svV5LtolJ9z3Opz08pkV%2Bag67jI%3D&reserved=0" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">--
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ken Martin PhD
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Distinguished Engineer<br>
<span style="font-size:9.5pt">Kitware Inc.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmaps.google.com%2F%3Fq%3D28%2BCorporate%2BDrive%2B%250D%2BClifton%2BPark%2BNY%2B12065%26entry%3Dgmail%26source%3Dg&data=02%7C01%7Cstephen.langer%40nist.gov%7Cf203fb623f154381048a08d53e6f7a82%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636483570873734128&sdata=SGpN9CC2NP5%2B%2F%2FCU4m2rwmKS8949Sn%2BFHDJqvMuN338%3D&reserved=0">28
 Corporate Drive</a><br>
Clifton Park NY 12065<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">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><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Ken Martin PhD <o:p></o:p></p>
<div>
<p class="MsoNormal">Distinguished Engineer<br>
<span style="font-size:9.5pt">Kitware Inc.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">28 Corporate Drive<br>
Clifton Park NY 12065<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">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><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>