[vtkusers] anti-aliasing

Mohamed Amine Mzoughi aminemzoughi at febus-optics.com
Wed Dec 26 10:38:19 EST 2018


Hello again,

If I do that, the chart is not visible anymore (the Qt widget is all 
black), if I change the renderer of the vtkContextView also (the Qt 
widget is all white) !

I give up for the moment !

ParaView is a such complex software, that I can't trace the stuff 
related to anti-alisaing in it (reverse engineering ParaView it is tough 
: a complex build system, many layers, proxies, in fact, it's an 
oriented object mix of a lasagna and spaghetti code !).

Thanks anyway.

Le 26/12/2018 à 16:02, Paulo Carvalho a écrit :
> Hi, Mohammed,
>
>    Strange indeed.  Did you create the vtkRender object yourself or 
> you just used the default one returned by GetRenderer()?   If the 
> latter is your case, I recommend creating your own vtkRender:
>
> m_renderer=vtkSmartPointer<vtkRenderer>::New();
> m_renderer->UseFXAAOn();
>
>     vtkFXAAOptions* const aaOpts = m_renderer->GetFXAAOptions();
>      aaOpts->SetRelativeContrastThreshold(0.125);
>      aaOpts->SetHardContrastThreshold(0.045);
>      aaOpts->SetSubpixelBlendLimit(0.75);
>      aaOpts->SetSubpixelContrastThreshold(0.25);
>      aaOpts->SetUseHighQualityEndpoints(true);
>      aaOpts->SetEndpointSearchIterations(12);
>
> m_view->GetRenderWindow()->AddRenderer(m_renderer );
>
> cheers,
>
> Paulo
>
>
> Em qua, 26 de dez de 2018 às 12:15, Mohamed Amine Mzoughi 
> <aminemzoughi at febus-optics.com <mailto:aminemzoughi at febus-optics.com>> 
> escreveu:
>
>     Hello Paulo,
>
>     Even without SmoothingOn* instructions, I still have a problem in
>     my 2D charts (I use a subclass of vtkChartXY, same issue with
>     vtkHistogramChart2D, I have rectangles in screen).
>
>     In ParaView, the line is smooth :
>
>
>     whereas in my VTK app, it isn't :
>
>
>
>     I don't know the issue...
>
>     I'm calling the FXAA instructions before Render() in the
>     constructor, I tried even to call them before each call to Render().
>
>     Best regards.
>
>     Le 26/12/2018 à 14:21, Paulo Carvalho a écrit :
>>     Hello, Mohamed!
>>
>>       It seems that your last calls (*SmoothingOn()) conflict with
>>     UseFXAAOn().
>>
>>     Here is the output I get when I add a call to
>>     PolygonSmoothingOn().  Not only it is not antialiased, but you
>>     can notice the edges triangle strips, visually ruining the results:
>>
>>     image.png
>>
>>     This one is rendered with only UseFXAAOn() and some configuration
>>     to the vtkFXAAOptions object like you did:
>>     image.png
>>
>>     kind regards,
>>
>>     Paulo
>>
>>     Em qua, 26 de dez de 2018 às 10:03, Mohamed Amine Mzoughi
>>     <aminemzoughi at febus-optics.com
>>     <mailto:aminemzoughi at febus-optics.com>> escreveu:
>>
>>         Hello,
>>
>>         I want to enable Anti-alisaing in my VTK app, so I took some
>>         parameters
>>         from ParaView and it still doesn't work :
>>
>>              m_view->GetRenderer()->UseFXAAOn(); // enable AA
>>
>>              vtkFXAAOptions* const aaOpts =
>>         m_view->GetRenderer()->GetFXAAOptions();
>>              aaOpts->SetRelativeContrastThreshold(0.125);
>>              aaOpts->SetHardContrastThreshold(0.045);
>>              aaOpts->SetSubpixelBlendLimit(0.75);
>>              aaOpts->SetSubpixelContrastThreshold(0.25);
>>              aaOpts->SetUseHighQualityEndpoints(true);
>>              aaOpts->SetEndpointSearchIterations(12);
>>
>>         what am I missing ?
>>
>>         Also, m_view->GetRenderWindow()->GetMultiSamples() => returns 8.
>>
>>         and I called also :
>>
>>         m_view->GetRenderWindow()->LineSmoothingOn();
>>         m_view->GetRenderWindow()->PolygonSmoothingOn();
>>         m_view->GetRenderWindow()->PointSmoothingOn();
>>
>>         Thanks.
>>
>>         _______________________________________________
>>         Powered by www.kitware.com <http://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
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20181226/328a644a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mgmjgdbpgalilcml.png
Type: image/png
Size: 35038 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20181226/328a644a/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liciomaiecgnccjf.png
Type: image/png
Size: 14787 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20181226/328a644a/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 111147 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20181226/328a644a/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 60566 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20181226/328a644a/attachment-0007.png>


More information about the vtkusers mailing list