How to Build - A Next-Gen Game Car
by Valentin Nadolu


Low-Res Model

At first sight, the processing power of a next gen console might seem enough to render huge amounts of polygons and allow the high-res model just created to be rendered in full detail in real-time. The problem is that a vehicle is just a part of the scene rendered by the game engine. 20.000 polygons might seem low, but if you consider that some racing games can have many cars on screen at the same time, that adds up to a lot of polygons being rendered. That is why games require different models with different detail levels to be created for each vehicle.

The first mesh used is usually called „ingame” and it is the model players see in the actual game. This one has around 10.000 polygons for racing games and much less than that for games that contain more complex scenes, like Grand Theft Auto type of games. This model is optimized to be viewed from a medium distance so certain parts of the car have little to no detail to save on polygons. The underside is usually flat, there are no suspension parts unless the car is an open-wheeler and the interior has less geometry detail than the exterior. The geometry I will build for this tutorial’s subject car is pretty simple as shape goes so I will set the polycount limit to about 7000 polygons, including wheels and interior.

            For the low-resolution model, the modeling rules are stricter that in the case of the low-res model because the optimization of the mesh plays a more important role. Realtime rendering is done using triangles, the only geometrical shape that a video card can “understand”. All other more complex 3d shapes are converted to triangles when rendered or exported to a game’s rendering engine. This automatic conversion can cause problem if the source polygon has more than 4 sides, because it might tessellate in an incorrect/inefficient mode. This is why only quads are to be used. There are areas where quads probably won’t do, so triangles can be used to fill in these areas.

As mentioned at the beginning of this tutorial, saving a different scene with basic high-res mode of the exterior is used as a base for the low-res model. Still, it seems I forgot to save a good intermediary mesh for the wheel so I will have to build it by using the full detailed mesh. This might also be the case in some situations, when the artist is required to build a low-res model using an already finished high-resolution mesh.

First thing is to eliminate all the close parallel cuts in the geometry that were used to strengthen the high-res model. A simple way to do this is to use Edit Mesh->Merge Vertices on the entire wheel mesh. The Distance value can be tweaked to make sure that only the very close vertices are merged.





Next step is to reduce the unnecessary polygons by deleting the edges that do not influence the shape too much.


The high-res wheel didn’t have an interior, but the low-res still requires one that will be visible in the game. As the car has a very small ground clearance, the back of the wheel will be barely visible, so just basic geometry there is enough.


Setting up the Normals in Maya

The way the object is illuminated is defined by normals, which are a vectorial attribute assigned to each vertex. This vector defines the direction in which the light is reflected off that vertex. To make it easier to setup vertex normals without having to define them one by one, Maya uses an attribute applied to each edge called Hard Edge(Normals->Harden Edge) or Soft Edge (Normals->Soften Edge). In short, if one edge is „hard”, the geometry will look like it is broken on that edge. Contrary, if the edge is „soft”, the mesh will have a continuous aspect on that edge. This is done by splitting one vertex into a couple of vertices with different normals for each one to create the „broken” appearance of the geometry. The lightning for a soft-edged area is calculated by averaging the values of the normals of adjacent vertices.


Modeling for games will almost always mean that the normals have to be adjusted for the model to look its best. The problem comes when there is a normal map involved, normal map that requires as few hard edges as possible. I will talk more about this necessity in the 4th chapter.

First thing to do before setting up the normals is using the Normals->Unlock Normals option to unlock the normals and allow for proper editing.

The starting point is the mesh with all of its edges set to soft. This is done because there will be less hard edges than soft edges, so it makes sense to set them all as soft and then just change a few to hard as necessary.




As you can see, the wheel doesn’t look that good with all the edges set to soft. The strange shadows visible on the mesh will have an adverse effect on the quality of final lightning with normal maps. Here are some simple rules that I use when setting up normals:
  1. All border edges count as hard edges. (not a rule, but a fact to be remembered J)
  2. For curved continuous surfaces, set the edges as soft (2 and 3 in the image)
  3. For angles that have a concave shape, use hard edge (4)
  4. For angles that are close to 90o use either soft edge if the edge is facing the camera (5) or hard edge if it is not visible(6)
The last rule is good for objects that do not rotate in the scene. As always, these rules can be broken as long as the final result is good.



 
 
 
  Copyright © 2005-2008. All Rights Reserved