image smoothing when drawn in perpective?

Hi,

i am doing a very simple loading and drawing of images, except that i put them into 3D perspective with gl tanslations and scaling. The problem is that the images appear very aliased, especially on the edges…

I hope there is a supersimple way to enable a smoothing function on the images, but I spent a day on this and couldn’t find it :S

Any suggestions maybe?

cheers,

k.

maybe if you post a little piece of code is better but are you trying to use ofImage to load an image and have you put it in a texture? if you are using openGL(of course ) at least

  
 glEnable(GL_DEPT_TEST);  
glDepthFunc(GL_LEQUAL);  
glHint(GL_POLYGON_SMOOTH_HINT,GL_DONT_CARE);  
  

take a look at red book:http://glprogramming.com/red/chapter06.html#name2

thanks @kalwalt for the suggestion, but there seems to be no change in aliasing when adding your code. i read the linked chapter and tried several other combinations of gl statements, but with no success.

meanwhile I found this thread http://forum.openframeworks.cc/t/anti-aliasing-in-0061-on-os-x/3179/4 and using window.setGlutDisplayString() works somehow = it smoothes the edges, but not the image itself. I am attaching 2 images of how it looks like with and without window.setGlutDisplayString().

the images are loaded with

  
	images[n].setUseTexture(true);  
	images[n].loadImage(path);  
  

and the draw code is this (m_texRGBAMix is the reflection texture)

  
		ofTranslate(NULL, NULL, -(ofGetHeight()+(maxH-ofGetHeight()))+zoom); //SHOW MAX IMG IN CORECT PLACE  
		  
		for(int i=0; i<n; i++){  
			ofPushMatrix();  
				ofTranslate(ofGetWidth()/2, ofGetHeight()/2, -maxW/5*n);//OPENGL COORDINATE SYTEM PLACE IN CENTER  
		  
				ofRotateY(rotY+tab[i]*(double)360/n);  
				ofTranslate(0, (maxH-images[tab[i]].getHeight())/2, maxW/5*n); //DRAW IN CORECT RADIUS  
				images[tab[i]].draw(-images[tab[i]].getWidth()/2,-images[tab[i]].getHeight()/2);  
				  
				ofTranslate(NULL, images[tab[i]].getHeight()+40, NULL); //PLACE SHADOW UNDER IMG  
				ofEnableAlphaBlending();  
					m_texRGBAMix[tab[i]].draw(-images[tab[i]].getWidth()/2,-images[tab[i]].getHeight()/2);  
				ofDisableAlphaBlending();  
			ofPopMatrix();  
		}  
  

I am looking further for a solution…

The problem isn’t with the geometry itself; the polygon. Performing aliasing/smoothing on that isn’t going to make a difference in the appearance of the texture, save for the edges, I guess.

What I think you want to look into is MIP mapping / anisotropic filtering, probably via openGL. I’m guessing this should be possible in OFX.