[vtkusers] Antialiasing questions on 8.1.0.rc2

Langer, Stephen A. (Fed) stephen.langer at nist.gov
Fri Dec 8 13:58:27 EST 2017


Hi Ken --

Thanks.  That helps a lot.

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:

ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 59
vtkSSAAPass (0x7fc596326370): FrameBufferObject should have been deleted in ReleaseGraphicsResources().

ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 63
vtkSSAAPass (0x7fc596326370): Pass1 should have been deleted in ReleaseGraphicsResources().

ERROR: In /Users/langer/UTIL/VTK/VTK-8.1.0.rc2/Rendering/OpenGL2/vtkSSAAPass.cxx, line 67
vtkSSAAPass (0x7fc596326370): Pass2 should have been deleted in ReleaseGraphicsResources().

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.

-- Steve


From: Ken Martin <ken.martin at kitware.com>
Date: Friday, December 8, 2017 at 8:54 AM
To: "Langer, Stephen A. (Fed)" <stephen.langer at nist.gov>
Cc: VTK Users <vtkusers at vtk.org>
Subject: Re: [vtkusers] Antialiasing questions on 8.1.0.rc2

See this post

https://blog.kitware.com/new-fxaa-anti-aliasing-option-in-paraviewvtk/<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>

which talks about using FXAA in Paraview, but the support is built into VTK via

https://www.vtk.org/doc/nightly/html/classvtkRenderer.html#a3f46ed85e17e5e297e6c3b02be07ebba<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>

Other options include SSAA an example of which is shown here

https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/Testing/Cxx/TestSSAAPass.cxx<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>

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.

Thanks!
Ken


On Thu, Dec 7, 2017 at 4:51 PM, Langer, Stephen A. (Fed) <stephen.langer at nist.gov<mailto:stephen.langer at nist.gov>> wrote:
Hi --

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.

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?

Thanks.

 -- Steve



_______________________________________________
Powered by www.kitware.com<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>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<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>

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<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>

Search the list archives at: http://markmail.org/search/?q=vtkusers<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>

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers<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>



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171208/af1693d4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noaa.png
Type: image/png
Size: 18612 bytes
Desc: noaa.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171208/af1693d4/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssaa.png
Type: image/png
Size: 51054 bytes
Desc: ssaa.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171208/af1693d4/attachment-0001.png>


More information about the vtkusers mailing list