Good Use of Polygons in Games

Good Use of Polygons in Games


It has been quite some time since the first polygons appeared in games. Perhaps the founder of the 3D game was Elite, with it's wireframed spaceships. Since then, rendering technology has come a very long way indeed. Polygons became filled and coloured, Gouraud shaded, Textured, transparent, phong shaded. And now with the introduction of dedicated rendering hardware, we are seeing all combinations of textured, phong shaded, bump mapped with coloured lighting. Despite the massive increase in technology, there does not seem to have been an equal rise in the good use of polygons.

Think back to the days of Space Invaders. The sprites were all made from nasty big pixels. They had wonky limbs and square eyes. Now that graphics have improved, sprites can have many colours, and the pixels themselves become barely noticable. The same can be true for polygons. In a game, the existance polygons should not be noticable. The player should feel that they are in a solid world.
Get as far away from polygons as possible.

It is not sufficient to throw a massive amount of hardware at a graphics engine. I have seen flat shaded polygon games that look more pleasing than the latest technology. Power is nothing without control.

The best thing, I think, would be to have some examples:

Examples


Sub Pixel Accuracy
Sub pixel accuracy allows you to render polygons whose vertices have been specified to non-integer coordinates on the screen. Slowly moving polygons will move smoothly from one pixel to the next. Without this, polygons will tend to jump between pixels.

With: Quake

I hope I can assume that most people reading this will have played, or at least seen, Quake. If you have Quake, load it up. Try moving the mouse really slowly, and you will see that the polygons move smoothly. This is especially apparent at inbetween-level screens, where the camera drifts backwards and forwards slightly.
The result of this is that the scene appears to be solid. All the polygons can move together, rather than hopping from one pixel to the next. When you are playing Quake, it's easy to forget that everything is made from microscopically thin polygons. Everything feels so solid. This is how it should be.

Without: Syndicate Wars

Syndicate was a great game. One of the best. I played it so much that, whenever I shut my eyes, I had images of little men in trenchcoats running around with flame throwers. Syndicate was was a 16 colour, hi-res game. It looked wonderful. Those 16 colours were used to the full.

Syndicate had a sucessor, Syndicate Wars. Syndicate Wars was rendered with 256 colours. It was 3D, isometric, fully rotatable, with multiple lightsourcing and realtime shadows. Despite this, it looked much worse than its predecessor. It was still a great game, and statically it looks great, as you can see from the screen shots. However it was let down by the tacky feel of the polygon engine.
You will also notice that the polygon version has a lot less detail.
The origional felt solid. This felt like everything was loosely stuck together with sticky tape. The main reason was the lack of sub-pixel accuracy. Syndicate Wars is quite a slow moving game, and so the jumping and jittering polgygons were very noticable. The scenery felt cheap and looked as if it could colapse in the next strong wind.


Texture Interpolation and Filtering
Texture Interpolation, also known as Bilinear or Trilinear Interpolation, smooths textures so that they don't appear blocky when viewed close up.


On the left is a texture as it would appear close up in most games. On the right is the same texture with Bilinear interpolation applied. At first glance the image on the right appears to be better quality than the other. However, it does look somewhat out of focus. It is this that causes problems in many games.
The human brain uses focus as an important visual cue. An image with a range of focal depths tends to look more 3D than one without. An image with incorrect focus can look really weird.
This effect can be seen in many games on the new breed of Super Consoles. They all support texture filtering in hardware, and so nearly all game designers use it. But they do not realise that the blurring is percieved as a focus issue. Let me explain why it looks bad.

A correct image will contain one focal depth at which objects will appear to be in sharp focus. Objects nearer or further from the camera will be out of focus. Two objects at equal distances from the camera should appear to be just as blurred. In games, it is often the case that two objects will have two different resolutions of texture and so will appear to be differently focused even at the same distance from the camera. It is made worse by the fact that polygons always have crisp edges. The inside of a polygon will be really blurred and still have a sharp outline. This can be very confusing and will spoil the sense of depth.

This image from Quake II demonstrates this. Click on it to see it full size. There are two depths in this scene. The foreground with the character and the small rocks, and the background with the large mountains and sky. If this were a photograph, the foreground would be in sharp focus, and the background would be blurred. However, the foreground seems to contain two different focuses. The outlines of the rocks and the character are crisp, while the surfaces of the rocks and the character are blurred. More blurred, in fact, than the background.

The other problem is that graphic designers think they can now use lower resolution textures and they will look just as good as a high resolution texture without filtering. This is not true. They just end up looking like out of focus, low resolution textures.