Perspective in early pseudo-3d games

Please take a look at the screenshot below, from the old classic Space Harrier. My question regards the curved perspective on the chequerboard 'ground'. It's got a strangely curved geometry (I remember seeing this in a few old games/demos). I reminds me somewhat of a moire effect, and I think some of it (in the background) is just that - but I don't think its the full story. Compare with the screen shot from the Sega version, which shows moire effects in the distance, but not the same curvature.

So...

• Why the curvature?
• Did they do this on purpose, or is it a side effect of some technique?
• How is it achieved?

• Your question seems to suggest that these two images do not display the same curvature of the grid on the plane. However, they both do produce the exact same effect as far as I can tell. It's just that in the lower image, the camera angle is a little lower. – Olhovsky May 10 '11 at 20:45
• I believe this effect was called 'mode 7' on the super nintendo: en.wikipedia.org/wiki/Mode_7 which might answer your third question. – thedaian May 10 '11 at 21:50
• @Olhovsky - I'm agree that there is a moire effect in both images, it's just that I feel there is an additional effect going on in the first (the curvature is clearly visible in the foreground). Perhaps I'm wrong. – UpTheCreek May 10 '11 at 22:51
• The amount of curvature changes as your camera angle changes (less curvature close up as the camera gets further off the ground). Imagine looking straight down at the grid. Then you would see no curvature at the center, and you would see curvature at the edges. However there is some sort of different sampling technique used in the first image, you're right. The aliasing of edges close up is clearly different (not necessarily better) than in the second image. I don't know what kind of sampling that is. I'm still confident that the difference in curvature though, is just due to cam angle. – Olhovsky May 11 '11 at 1:14

This has to do with Mip Mapping textures. This texture has not been mip mapped. See the before and after mip mapping on this image:

http://warsztat.gd/files/articles/texatlas/mip-map2.png

So it's a side effect of the game trying to draw textures far away at an angle. Mip mapping fixes this, so the way to achieve it is to not use mip mapping.

• Interesting, thanks. However in your two examples, if you follow one of the diagonals out from the bottom of the image, they both follow a completely straight line (the c64 image follows a curve). The Mip mapped version seems to suffer less from interference/moire and aliasing effects, but the geometry looks the same in each case to me. I'm not yet convinced this is the full answer. – UpTheCreek May 10 '11 at 20:11
• Its not the full answer, but it is a side effect. It has something to do with drawing a texture as it goes to infinity. When the perspective it in that angle and with their very limited processing power my guess it they wrote something that would be good enough. As such, you would have to create the effect manualy via shaders. – Peter Ølsted May 10 '11 at 20:27
• Well it'll be hard to find an example of mipmapping that show exactly the same effect. The influence of the rendering software/hardware will have an effect on the end result. Here some some other examples of mipmapping: link link – MichaelHouse May 10 '11 at 20:32
• UpTheCreek: Actually the diagonals do NOT follow a straight line. Consider the image he linked: warsztat.gd/files/articles/texatlas/mip-map2.png. Look at the diagonals off in the distance, they exhibit the same behavior as your question's images. The reason that the curve is further in the distance is mainly because the camera's angle with the plane is larger than the angle in the images in your question. – Olhovsky May 10 '11 at 20:42
• I'm sure there's plenty of test apps out there for showing the effects of mip mapping. Try putting one together and seeing if you can re-create the look you want. – MichaelHouse May 10 '11 at 20:56

I think it's more correct to say that the effect you're seeing is called Aliasing. Specifically a Moiré pattern.

Basically for speed there was a naive method of picking which pixel from a texture to draw at a given pixel on screen given the camera you're rendering from, and the curvature you see is a side effect of the grid pattern.

So no, it wasn't intentional.

Mipmapping helps fix this issue as well as improves speed of rendering (as picking adjacent pixels from a lower res texture is faster due to cache coherency than picking far apart pixels on a larger texture). But, as you can see from mipmap examples, it doesn't make the texture look "right". For that you need anisotropic filtering.

• Something that this answer misses is that the top image in the question is not using simple point sampling. (Compare the aliasing of the grid edges in the first and second image in the foreground.) – Olhovsky May 11 '11 at 1:18