View Issue Details

IDProjectCategoryView StatusLast Update
0024324CommunityOCCT:Visualizationpublic2016-04-07 10:33
ReporterPawel Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
PlatformWindowsOSVC++ 2012 
Summary0024324: Antialiasing exposes triangulation edges [on NVIDIA]
DescriptionWhen activating antialiasing the edges of the triangulation are shown. This is not desired.

Please consult the attached pictures.
Steps To Reproducepsphere b 10
vinit
vdisplay b
vfit
vsetdispmode b 1
vantialiasing 1
TagsNo tags attached.
Test case number

Attached Files

  • antialiasing.png (111,544 bytes)
  • shaded.png (65,963 bytes)

Relationships

related to 0026711 closedbugmaster Open CASCADE Visualization, TKOpenGl - support creation of multisampling off-screen FBOs 
related to 0027360 closedbugmaster Open CASCADE Visualization - remove obsolete anti-aliasing API 

Activities

Pawel

2013-11-07 12:16

developer  

antialiasing.png (111,544 bytes)

Pawel

2013-11-07 12:17

developer  

shaded.png (65,963 bytes)

Pawel

2013-11-14 20:23

developer   ~0026637

Last edited: 2013-11-15 12:23

This problem might depend on the machine/graphics card: I have one PC where the effect can be observed and another one where everything is OK.

Pawel

2013-11-19 17:20

developer   ~0026767

OK, after switching between the Intel and NVIDIA driver I can say the problem occurs in my case using an NVIDIA graphics card:

Draw[8]> vglinfo
OpenGL info:
  GLvendor = 'NVIDIA Corporation'
  GLdevice = 'Quadro K2000M/PCIe/SSE2'
  GLversion = '4.4.0'
  GLSLversion = '4.40 NVIDIA via Cg compiler'
  GLdebug = ON


Intel driver is NOT affected:
Draw[5]> vglinfo
OpenGL info:
  GLvendor = 'Intel'
  GLdevice = 'Intel(R) HD Graphics 4000'
  GLversion = '4.0.0 - Build 9.17.10.3040'
  GLSLversion = '4.00 - Build 9.17.10.3040'

san

2013-11-20 13:06

developer   ~0026797

Dear Pawel,

I confirm that this problem can be reproduced at our side, too.
It seems to be an old issue with GL_POLYGON_SMOOTH which results in depth test errors on polygon boundaries and thus is not the recommended anti-aliasing method nowadays. Also the old-style OpenGL smoothing is not hardware-accelerated and thus impacts the frame rate.

Obviously, this is not a regression of OCCT 6.7.0, since the code existed for years.

With OCCT releases up to 6.7.0 it is not possible to enable or disable anti-aliasing selectively for different types of geometry using API.

However, as a workaround, I recommend you adding the following line to your environment:

set CALL_OPENGL_ANTIALIASING_MODE=1

As the result, GL_POLYGON_SMOOTH is not enabled when V3d_View::SetAntialiasingOn() is called.

Meanwhile, I have to admit that both the current way to enable/disable anti-aliasing and the current implementation of anti-aliasing could be improved, though this is a low-priority task for us:

1. The most logical way to control anti-aliasing would be to move the anti-aliasing flag from V3d_View (the global switch) to Graphic3d_Aspect* classes, so as to enable/disable anti-aliasing selectively for given type of primitives and within the given Graphic3d_Group instance(s) only and thus to have full control over the visual result and rendering performance. At this step, we can keep GL_*_SMOOTH as anti-aliasing method.

2. As the second step, something smarter and faster than just enabling GL_*_SMOOTH could be used.
E.g. setting up multi-sampling could be tried:
http://www.opengl.org/wiki/Multisampling
This would require some extra platform-specific work at 3D view initialization stage.
Alternatively, shader programs supported since OCCT 6.7.0 could be considered as a tool for anti-aliasing, though choosing a suitable algorithm might not be an easy task.

Thus if you have some time for the above-mentioned experiments, your contribution would be appreciated a lot!

Pawel

2013-11-20 13:56

developer   ~0026802

Dear Sergey,

thank you for the hints!

Indeed, I found an old thread on the forum telling to set the "CALL_OPENGL_ANTIALIASING_MODE" for NVIDIAs in order to avoid the problem.

To tell the truth, the problem does not seem that important to me neither. I'm much more interested in the Voxel package and hope to be able to spend some time on it.

san

2013-11-20 14:12

developer   ~0026804

Anyway, thanks a lot for reporting it!
I have also created a forum thread on the collaborative development portal: http://dev.opencascade.org/index.php?q=node/901

abv

2016-04-06 06:57

manager   ~0052412

Is this issue still relevant as of OCCT 7.0?

san

2016-04-06 12:29

developer   ~0052427

Old anti-aliasing API still exists in 7.0 release and might potentially cause this kind of problems.
To avoid this, new API for MSAA management implemented in 0026711 should be used.
Thus this issue can be closed.

san

2016-04-06 12:31

developer   ~0052428

Dear bugmaster,

Please close this issue, it will not be fixed, since a better anti-aliasing method is supported since OCCT 7.0.

Issue History

Date Modified Username Field Change
2013-11-07 12:16 Pawel New Issue
2013-11-07 12:16 Pawel Assigned To => san
2013-11-07 12:16 Pawel File Added: antialiasing.png
2013-11-07 12:17 Pawel File Added: shaded.png
2013-11-07 12:22 Pawel Target Version => 6.7.0
2013-11-14 20:23 Pawel Note Added: 0026637
2013-11-15 12:23 Pawel Note Edited: 0026637
2013-11-19 17:20 Pawel Note Added: 0026767
2013-11-19 17:20 Pawel Summary Antialiasing exposes triangulation edges => Antialiasing exposes triangulation edges [on NVIDIA]
2013-11-20 13:06 san Note Added: 0026797
2013-11-20 13:06 san Status new => acknowledged
2013-11-20 13:06 san Product Version 6.7.0 =>
2013-11-20 13:06 san Target Version 6.7.0 =>
2013-11-20 13:56 Pawel Note Added: 0026802
2013-11-20 14:12 san Note Added: 0026804
2016-04-06 06:57 abv Note Added: 0052412
2016-04-06 12:18 san Relationship added related to 0026711
2016-04-06 12:29 san Note Added: 0052427
2016-04-06 12:31 san Note Added: 0052428
2016-04-06 12:31 san Assigned To san => bugmaster
2016-04-06 12:31 san Status acknowledged => feedback
2016-04-06 12:35 san Relationship added related to 0027360
2016-04-07 10:33 bugmaster Status feedback => closed
2016-04-07 10:33 bugmaster Resolution open => fixed
2016-04-07 10:33 bugmaster Resolution fixed => no change required