anti-aliasing

hello

i’m making a little toy that has a 3D mod in it, i wont to anti-aliasing it, because i dont need to worry about the frame rate at all. any pointers would be cool

aNt

glEnable(GL_POLYGON_SMOOTH);

i still get jaggy edges.

You could use an accumulation buffer.

You basically jitter the image around to smooth the edges.

Chris

the polygon smooth is only (ONLY) a hint. OpenGL implementations are free to ignore it.

Jittering the camera and accumulating the results is the best approach, but not all ogl drivers know about th accum buffer. In this case, your options are: 1) implement the accum buffer yourself, or 2) render a larger image than what you need, and resample the new sized image. Simply, if you wanted a 640x480 image at the end, render a 1280x960 image and then remap every 2x2 pixel to a single pixel by averaging the colours. This is effectively an accum buffer done in one buffer.

cheers
jOHn

take a look at : http://toolbox.sgi.com/TasteOfDT/documents/OpenGL/advanced97/node63.html#SECTION00095000000000000000
it explains how to use the accumalation buffer to antialiase you scene, and also gives the best way to jitter the cam (a gaussian repartition, I think)
watch out, it will be VERY slow (about 20 times slower), unless your graphic card support accumulation buffer

Originally posted by john:
[b]the polygon smooth is only (ONLY) a hint. OpenGL implementations are free to ignore it.

Jittering the camera and accumulating the results is the best approach, but not all ogl drivers know about th accum buffer. In this case, your options are: 1) implement the accum buffer yourself, or 2) render a larger image than what you need, and resample the new sized image. Simply, if you wanted a 640x480 image at the end, render a 1280x960 image and then remap every 2x2 pixel to a single pixel by averaging the colours. This is effectively an accum buffer done in one buffer.

cheers
jOHn[/b]

How do I render the image larger in GL code? I am having trouble here… which settings do i have to changde to render it larger and then have GL ‘squash’ the image back down?

thanks

There is a faster method than accumulation buffer, but it’s not always usable…
Use color blending instead of accum.
This method is used in GLClock : http://www.daionet.gr.jp/~masa

Originally posted by john:
the polygon smooth is only (ONLY) a hint. OpenGL implementations are free to ignore it.

I’ve got some questions about that:

Which cards actually follow this hint?

Is this feature supported in hardware or software emulated?

And, at the end, after having sorted polygons and drawn them from back to front (with the proper blending function enabled of course), is it a faster method than using the accumulation buffer (and what about quality)?