Anti-Aliasing

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
cblt2l
Posts: 155
Joined: Sat May 15, 2010 3:59 am

Re: Anti-Aliasing

Post by cblt2l »

kwahoo wrote:Works fine for me.
ulrich1a wrote:It may be a Debian wheezy issue. I got the same message with a Radeon HD4670.
Since kwahoo has no problems running a much more recent version of mesa I'm guessing that is the problem.
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Anti-Aliasing

Post by kwahoo »

ulrich1a wrote: It may be a Debian wheezy issue. I got the same message with a Radeon HD4670.

Code: Select all

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 2.1 Mesa 8.0.5
OpenGL shading language version string: 1.20
IIRC MSAA for R600g (Radeon HD2000-6000) driver was introduced somewhere around Mesa 10.1...
User avatar
detlet
Posts: 85
Joined: Sun Sep 25, 2011 5:54 pm
Location: Lauenstein, Germany

Re: Anti-Aliasing

Post by detlet »

jmaustpc wrote:Can you post a file that demonstrates these issues?
For the disappearing images it doesn't depend on a special file. So here is, how I can reproduce it with any image:
set anti-aliasing to none in the configuration
create a new project
go to the image workbench and create a image in 3d space; image is visible
go to the part design workbench and create a new sketch in the same plane as the image; the image disappears
set anti-aliasing to anything else in the configuration; the image is back again
set anti-aliasing back to none and now the image doesn't disappear again, even not if you create an other sketch

Till now, I was not able to reproduce the GL error.

In my last message I forgot to say, that I use the proprietary AMD driver at version 12.104.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Anti-Aliasing

Post by jmaustpc »

ulrich1a wrote:It may be a Debian wheezy issue. I got the same message with a Radeon HD4670.

Code: Select all
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 2.1 Mesa 8.0.5
OpenGL shading language version string: 1.20
I'm not getting the error here working perfectly here on a laptop with an old Nvidia Quadro GPU and nouveau driver .I'll try it on some other pc in a bit...but here is the details for this one.

OS: Kubuntu 14.04 LTS
Platform: 64-bit
Version: 0.14.3567 (Git)
Branch: master
Hash: 068452f0ac35ed9d70b250bf0ac83d91fb1c2e51
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0


name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
etcetera................

client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:............etc...........


OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NV84
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 10.1.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:..blah....blah......etc...
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Anti-Aliasing

Post by jmaustpc »

detlet wrote:
jmaustpc wrote:Can you post a file that demonstrates these issues?
For the disappearing images it doesn't depend on a special file. So here is, how I can reproduce it with any image:
set anti-aliasing to none in the configuration
create a new project
go to the image workbench and create a image in 3d space; image is visible
go to the part design workbench and create a new sketch in the same plane as the image; the image disappears
set anti-aliasing to anything else in the configuration; the image is back again
set anti-aliasing back to none and now the image doesn't disappear again, even not if you create an other sketch

Till now, I was not able to reproduce the GL error.

In my last message I forgot to say, that I use the proprietary AMD driver at version 12.104.
OK, thanks for the clear step by step instructions, now I can confirm that bug for me to...and add a bit more more to it.

The bug is there for "none" and "Line smoothing" modes... Like you said if you once select any of the aa modes and then go back to either none or line smoothing, the bug does not come back.

Also a variation on this bug
1) have the preference set to either "none" or "Line smoothing"
2)start FreeCAD go to PartDesign wb then image WB new document, insert image plane, select A4 landscape template from Data/mod/drawing/......you get an image plane with the drawing template
2)edit menu ..preference..display...anti-aliasing...leave the setting as whichever it was (either "none" or "Line smoothing")...keep pressing "Apply"....the image plane will change back and forth between displaying the image and a grey plane (Part colour), each time the Apply is applied.

I think these are basically the same bug...


@ickby is this something you can fix quickly or should I write up a bug report?

Jim
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Anti-Aliasing

Post by ickby »

jim,

can you please check if this bug is in older versions too, before the anti-aliasing patch? I can't think of any reason this could have to do with my changes, if you set "None" or "Smoothing" then everything is as it was before my changes.
User avatar
detlet
Posts: 85
Joined: Sun Sep 25, 2011 5:54 pm
Location: Lauenstein, Germany

Re: Anti-Aliasing

Post by detlet »

ickby wrote:can you please check if this bug is in older versions too, before the anti-aliasing patch?
I've tested it with the version at commit http://sourceforge.net/p/free-cad/code/ ... 3b292c4cf/ - the one directly before your "Add multisampling anti-aliasing" commit - and for me that version works without any problems.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Anti-Aliasing

Post by wmayer »

ickby wrote:jim,

can you please check if this bug is in older versions too, before the anti-aliasing patch? I can't think of any reason this could have to do with my changes, if you set "None" or "Smoothing" then everything is as it was before my changes.
I can confirm exactly this what detlet reported. After doing some experiments I found out that when I modify View3DInventorViewer::setAntiAliasingMode() to do nothing then everything works fine again,

So, setting anti-aliasing setting to "None" does not have the same effect as it was before the patch. We at least call
getGLRenderAction()->setSmoothing(false); and
setSampleBuffers(buffers);

Remark:
When a sketcher goes to edit mode than I have to revert the anti-aliasing to "None" because otherwise the box-selection is broken. See ViewProviderSketch::setEditViewer
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Anti-Aliasing

Post by jmaustpc »

I am getting a horrible display when setting is either none or smooth lines, for a default Part Box and cylinder. If I go to preferences and click apply without changing the setting from either none or smooth lines, the images toggles back and forward between horrible and perfect. Repeatedly clicking apply caused a crash once but I could not yet get that crash to repeat.
screenshotdistance none-smoothlinesdisplayissue.png
screenshotdistance none-smoothlinesdisplayissue.png (169.88 KiB) Viewed 3129 times
OS: Ubuntu 14.04 LTS
Platform: 64-bit
Version: 0.14.3569 (Git)
Branch: master
Hash: ec442507e1a280db0ddb520ee566c788d45a7566
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0


Like the last post regarding the image plane...if you once toggle an aa mode and then go back to none or smooth lines, then the bug goes away
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Anti-Aliasing

Post by ickby »

Ok, I can reproduce the image plane and will check the black/normal behaviour too. No idea why this is happeneing, but I think we should reduce the antialisaing calls only to situations when something changes. I will test if this works.
Post Reply