We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Question about smooth()
Page Index Toggle Pages: 1
Question about smooth() (Read 2757 times)
Question about smooth()
Apr 3rd, 2007, 12:25am
 
When I use smooth, it doesn't make any noticable difference.  But maybe I'm using it wrong.  Should smooth() anti-alias   the edges of objects defined by beginShape()....endShape()?  Or just primitives, like in the example, which uses ellipse()?

Also, when smooth() is activated once, is it on forever or would I have to call it each time through draw(), or before each beginShape()?  

Or maybe smooth() uses hardware only, and my hardware just doesn't support it?

thx
Re: Question about smooth()
Reply #1 - Apr 3rd, 2007, 8:57am
 
Once smooth() is called, a boolean is flipped and you no longer have to call it again, until some operation calls noSmooth() (usually.. by you).

Once smooth() is called, all drawing operations will attempt to anti-alias, however some smoothing operations in openGL is kind of broken, for example, smoothing a filled ellipse().
Re: Question about smooth()
Reply #2 - Apr 3rd, 2007, 9:47pm
 
OK, that makes sense.  But still it doesn't do anything.  Do you know if the smoothing should apply to objects defined by beginShape()..endShape(), or maybe this is one of the broken things?

Re: Question about smooth()
Reply #3 - Apr 3rd, 2007, 10:43pm
 
The should apply to everything, including beginshapes. I would check your video card, and video card properties for anti aliasing.
Re: Question about smooth()
Reply #4 - Apr 3rd, 2007, 10:49pm
 
smooth() doesn't do FSAA (full screen anti-aliasing) It just turns on 3 OpenGL options, which try to make things look a bit better:
 gl.glEnable(GL.GL_POINT_SMOOTH);
 gl.glEnable(GL.GL_LINE_SMOOTH);
 gl.glEnable(GL.GL_POLYGON_SMOOTH);

Now, I don't think there's any guarantee these will actually make things look any better on every card.
Re: Question about smooth()
Reply #5 - Apr 6th, 2007, 9:06am
 
I've had this problem on PCs in the past, where I've solved it by forcing anti-aliasing through the graphics card control panel. If you're on PC that's worth a shot.

Right now I'm trying to get it working on a Mac Mini with the Intel GMA 950 card, but I can't find any similar controls. Anyone have the same problem and found a solution?
Re: Question about smooth()
Reply #6 - Apr 9th, 2007, 9:55pm
 
OK I found the answer for my card on PC.  It is an ATI x1300 and I had to go into the Catalyst Control Panel, and UNCHECK "allow applications to decide" for anti-aliasing.  Which seems totally backwards to me, but hey it works now!

Re: Question about smooth()
Reply #7 - Apr 10th, 2007, 7:02am
 
You should have a look at this discussion. Turns out most graphics cards need a little extra prodding from JOGL to turn on the antialiasing. If you can hack a bit of Java you can turn it on. Ben is likely to include this in upcoming versions of Processing.
Page Index Toggle Pages: 1