[vtkusers] Antialiasing questions on 8.1.0.rc2

Ken Martin ken.martin at kitware.com
Fri Dec 8 15:52:07 EST 2017


I was just suggesting to look at the differences in code between the two.
To see if maybe there was something you were doing differently. Sort of
process of elimination.

On Fri, Dec 8, 2017 at 3:44 PM, Langer, Stephen A. (Fed) <
stephen.langer at nist.gov> wrote:

> 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.)
>
>
>
> 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?
>
>
>
> Thanks.
>
>
>
> -- Steve
>
>
>
>
>
> *From: *Ken Martin <ken.martin at kitware.com>
> *Date: *Friday, December 8, 2017 at 2:11 PM
> *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
>
>
>
> Well what did render looks nice :-) The errors are unrelated I believe.
>
>
>
> 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.
>
>
>
> On Fri, Dec 8, 2017 at 1:58 PM, Langer, Stephen A. (Fed) <
> stephen.langer at nist.gov> wrote:
>
> 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> 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
> <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>
> 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.
>
>
>
>
>
> --
>
> Ken Martin PhD
>
> Distinguished Engineer
> Kitware Inc.
>
> 28 Corporate Drive
> <https://maps.google.com/?q=28+Corporate+Drive+%0D+Clifton+Park+NY+12065&entry=gmail&source=g>
> 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.
>



-- 
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/d9cc649e/attachment.html>


More information about the vtkusers mailing list