Difference between revisions of "3D Model Guidelines"

m (Rules)
(Create Polycount section (migrated from Making Tracks: Notes))
Line 19: Line 19:
 
* High-poly models should make use of [[Level of Detail]].
 
* High-poly models should make use of [[Level of Detail]].
 
* Avoid adding ground or vegetation around your objects, as this limits their usability in different scenarios.
 
* Avoid adding ground or vegetation around your objects, as this limits their usability in different scenarios.
 +
 +
== Polycount ==
 +
 +
Polycount is the number of surfaces, or faces 3D objects have. Older versions of Blender only supported objects made of "quads" (quadrilaterals—polygons made of four points) and "tris" (triangles—polygons made of three points). "Poly" was generally taken to mean "number of quads." However, Blender now supports n-gons, or polygons with unlimited numbers of points, and only supplies numbers of surfaces and tris. Thus, since the number of tris can always be relied upon to stay the same (a triangle never gets more points!) it is more accurate to count tris than poly. Therefore, these guidelines refer to tris.
 +
 +
=== A Bit of History ===
 +
 +
In the old days of gaming it was impossible to compute perfect lights for all pixels. All intense computation was done for each poly and then interpolated to the pixels inside the poly.
 +
 +
But nowadays modern engines like [[Antarctica: Overview|Antarctica]] use per-pixel lighting. Therefore, the most complex part isn't the vertex shader but the pixel shader. Let's take an example of an object that has ~500 polygons. For the GPU, managing a vertex is maybe ~10 instructions (it's not the exact number, just to give you an indication). For each poly of your model the computer will do ~10 instructions, so 500 * 10 = 5000 instructions for the entire mesh.
 +
 +
Now, the pixel part. It depends on how many pixels will be taken up by your object, but let's go with the worst case scenario—let's assume the whole screen is filled with your object. For each pixel to compute (the light, the gloss, the normal map, etc), it will take ~50 instructions to the GPU.
 +
 +
If you have a resolution of 800*600 (most people have higher resolution), 800 * 600 * 50 = 24000000 instructions. So even if you double the number of surfaces, you won't greatly affect the majority of the power spent. It's calculated by pixel, not by surface now.
 +
 +
Thus, we can increase the polycount without too much trouble. However it's important to keep it under control.
 +
 +
=== Measuring Polycount ===
 +
 +
Blender displays polycount in the '''Info''' window/toolbar next to the rendering engine selector:
 +
 +
<gallery mode="packed" widths="591px" heights="26px">
 +
File:Blender_screenshot_tris.png
 +
</gallery>
 +
 +
Look for the number of '''Tris'''. This is the information you need. Also, remember that the number of tris in the entire scene is only shown in object mode.
 +
 +
=== Polycount Examples ===
 +
 +
* A cargo plane: ~4000 tris
 +
* A palm tree with Level of Detail
 +
** High: 1400 tris
 +
** Medium: 1400 tris
 +
** Low: 42 tris
 +
* A basic plant: 32 tris
 +
* A medium-sized tree: 1380 tris
 +
* A pumpkin: 470 tris

Revision as of 22:44, 2 September 2016

It's important that SuperTuxKart has a consistent object style throughout. In many ways, this page is analogous to the texture guidelines.

Style

Objects in SuperTuxKart should be realistic in size, shape, general form. However, objects should not be as detailed as in real life. Take a palm tree for example:

You can see that the the new palm tree model far more closely matches the shape of a real palm tree. However, it is not so detailed that it looks real. In short, maintain realism in general form, but also retain a cartoony appearance by avoiding excessive detail in shape or textures.

Rules

  • All models MUST be child-friendly. SuperTuxKart should fit the ESRB "Everyone" rating.
  • Models should be capable of looking good both alone and in groups.
  • High-poly models should make use of Level of Detail.
  • Avoid adding ground or vegetation around your objects, as this limits their usability in different scenarios.

Polycount

Polycount is the number of surfaces, or faces 3D objects have. Older versions of Blender only supported objects made of "quads" (quadrilaterals—polygons made of four points) and "tris" (triangles—polygons made of three points). "Poly" was generally taken to mean "number of quads." However, Blender now supports n-gons, or polygons with unlimited numbers of points, and only supplies numbers of surfaces and tris. Thus, since the number of tris can always be relied upon to stay the same (a triangle never gets more points!) it is more accurate to count tris than poly. Therefore, these guidelines refer to tris.

A Bit of History

In the old days of gaming it was impossible to compute perfect lights for all pixels. All intense computation was done for each poly and then interpolated to the pixels inside the poly.

But nowadays modern engines like Antarctica use per-pixel lighting. Therefore, the most complex part isn't the vertex shader but the pixel shader. Let's take an example of an object that has ~500 polygons. For the GPU, managing a vertex is maybe ~10 instructions (it's not the exact number, just to give you an indication). For each poly of your model the computer will do ~10 instructions, so 500 * 10 = 5000 instructions for the entire mesh.

Now, the pixel part. It depends on how many pixels will be taken up by your object, but let's go with the worst case scenario—let's assume the whole screen is filled with your object. For each pixel to compute (the light, the gloss, the normal map, etc), it will take ~50 instructions to the GPU.

If you have a resolution of 800*600 (most people have higher resolution), 800 * 600 * 50 = 24000000 instructions. So even if you double the number of surfaces, you won't greatly affect the majority of the power spent. It's calculated by pixel, not by surface now.

Thus, we can increase the polycount without too much trouble. However it's important to keep it under control.

Measuring Polycount

Blender displays polycount in the Info window/toolbar next to the rendering engine selector:

Look for the number of Tris. This is the information you need. Also, remember that the number of tris in the entire scene is only shown in object mode.

Polycount Examples

  • A cargo plane: ~4000 tris
  • A palm tree with Level of Detail
    • High: 1400 tris
    • Medium: 1400 tris
    • Low: 42 tris
  • A basic plant: 32 tris
  • A medium-sized tree: 1380 tris
  • A pumpkin: 470 tris