2 TechnicalArtRequirements
stanislas69 edited this page 2023-05-24 13:24:56 +00:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Technical Art Requirements

Introduction

Art content sets the style of the game and makes it beautiful, but at the same time it significantly affects performance and storage space. So we always have to balance between visual quality and technical limitations to make the game attractive and enjoyable.

When youre not sure does a guideline rule is applicable for you or not ask a question on the forums or ask a programmer.

Textures

Texture formats and sizes

The game engine supports two common texture formats: DDS and PNG. All new textures should be PNG by default, the engine will automatically convert them to DDS.

The engine supports only textures with a size of power of two: 4, 8, . . . , 1024, 2048. Maximum size is 2048. Its allowed to have different width and height, like 1024 × 4. Some platforms and drivers do not support non power of two textures, and it might cause unexpected crashes.

A texture screen density should be accounted for the texture size choice. If an object covers a small part of a screen (like a flower), then the object doesnt need a big texture.

Do not use 64-bits textures, they will loose their precision anyway but will cost much more space in a repository.

Ambient occlusion textures

Ambient occlusion (AO) textures should not have noise. Noise increases sizes of PNG files and adds artifacts to DDS files. If you don't see any noise in the game but only on a texture, then you are using a texture that's too big and you have to reduce its size and/or remove the noise.

AO textures should not have alpha channel and saved as 8-bit grayscale PNG files.

Figure 1: Ambient occlusion textures.

Normal map textures

Normal map textures in the game engine are encoded using the classic method:

(Pixel,,Red,,, Pixel,,Green,,, Pixel,,Blue,,) = (Normal,,X,, 0.5 + 1, Normal,,Y,, 0.5 + 1, Normal,,Z,, 0.5 + 1)

You have to avoid the following cases which might add noise and/or artifacts:

  • normals lying on the surface, example Normal = (1, 0, 0), Pixel = (255, 127, 0)
  • neighbour pixels with opposite directed normals, example:

Normal1 = (1, 0, 0), Normal2 = (1, 0, 0),

Pixel1 = (255, 127, 0), Pixel2 = (0, 127, 0)

Invisible faces

You should avoid invisible faces, if a player cant see a face in the game (during a usual gameplay or cinematic scene), then you have to remove it. For example you dont need to have 5mm details on helmets.

Figure 2: Invisible faces for helmets.

Transparent meshes

Avoid using transparent materials for meshes. If you can add some (5% - 10%) triangles but use opaque materials then use opaque materials. Make sure to still stay inside the recommended polycount.

Figure 3: Geometry for transparent meshes.
### Bones For a good performance the number of bones should not exceed **32** bones for a single mesh. More bones means worse performance and bigger memory usage. The engine supports at most **64** bones per a mesh when gpu skinning is on. ### Bone Weights Every vertex in a rigged mesh should have be weighted to at least one bone. If they do not, they will cause glitches, and sometimes even a black screen. ## Geometry ### Polycount Guidelines There is a good [guideline](ArtPolyCountGuidelines) about poly count. ### Low poly tips There is a good generic [guideline](https://wildfiregames.com/forum/topic/18340-lowpoly-tips/) about low-poly geometry.

Vertex and triangle count

The game engine doesnt support meshes with more than 65536 vertices. It means a mesh with 3 unique vertices per triangle might have at most 21845 triangles. Reusing vertices might increase the maximum number of triangles.

You should avoid spawning many small meshes, especially if they have less than 128-256 vertices. Its better to pack them into a single mesh.

Materials

Normal and specular textures

Always use materials with both normal and specular textures. The engine will downgrade them for low-end hardware automatically using the shader quality option in the game.

Parallax mapping

Parallax mapping is allowed only on big and flat surfaces. Normals of these surfaces (of all their vertices) should be co-directed (look in the same direction) and be perpendicular to the corresponding surface.

Figure 4: Usages of parallax mapping.

External References