| 1 | [[TOC]] |
| 2 | = Technical Art Requirements = |
| 3 | == Introduction == |
| 4 | Art content sets the style of the game and makes it beautiful, but at the same time it significantly |
| 5 | affects performance and storage space. So we always have to balance between visual quality and |
| 6 | technical limitations to make the game attractive and enjoyable. |
| 7 | |
| 8 | When you’re not sure does a guideline rule is applicable for you or not ask a question on the |
| 9 | [https://wildfiregames.com/forum/ forums] or ask a programmer. |
| 10 | == Textures == |
| 11 | === Texture formats and sizes === |
| 12 | The game engine supports two common texture formats: [https://en.wikipedia.org/wiki/DirectDraw_Surface DDS] and [https://en.wikipedia.org/wiki/Portable_Network_Graphics PNG]. All new textures |
| 13 | should be PNG by default, the engine will automatically convert them to [https://en.wikipedia.org/wiki/DirectDraw_Surface DDS]. |
| 14 | |
| 15 | The engine supports only textures with a size of power of two: 4, 8, . . . , 1024, 2048. Maximum |
| 16 | size is **2048**. It’s 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. |
| 17 | |
| 18 | A texture screen density should be accounted for the texture size choice. If an object covers a |
| 19 | small part of a screen (like a flower), then the object doesn’t need a big texture. |
| 20 | |
| 21 | Do not use 64-bits textures, they will loose their precision anyway but will cost much more space |
| 22 | in a repository. |
| 23 | === Ambient occlusion textures === |
| 24 | Ambient occlusion (AO) textures should not have noise. Noise increases sizes of [https://en.wikipedia.org/wiki/Portable_Network_Graphics PNG] files and adds artifacts to [https://en.wikipedia.org/wiki/DirectDraw_Surface 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. |
| 25 | |
| 26 | AO textures should not have alpha channel and saved as 8-bit grayscale [https://en.wikipedia.org/wiki/Portable_Network_Graphics PNG] files. |
| 27 | |
| 28 | {{{#!div style="font-size: 80%;text-align:center" |
| 29 | {{{#!div |
| 30 | [[Image(ao-bad-good.png)]] |
| 31 | }}} |
| 32 | Figure 1: Ambient occlusion textures. |
| 33 | }}} |
| 34 | |
| 35 | === Normal map textures === |
| 36 | [NormalMaps Normal map] textures in the game engine are encoded using the classic method: |
| 37 | |
| 38 | (''Pixel,,Red,,'', ''Pixel,,Green,,'', ''Pixel,,Blue,,'') = (''Normal,,X,,'' ∗ 0.5 + 1, ''Normal,,Y,,'' ∗ 0.5 + 1, ''Normal,,Z,,'' ∗ 0.5 + 1) |
| 39 | |
| 40 | You have to avoid the following cases which might add noise and/or artifacts: |
| 41 | * item normals lying on the surface, example Normal = (1, 0, 0), Pixel = (255, 127, 0) |
| 42 | * item neighbour pixels with opposite directed normals, example: |
| 43 | |
| 44 | ''Normal''1 = (1, 0, 0), ''Normal''2 = (−1, 0, 0), |
| 45 | |
| 46 | ''Pixel''1 = (255, 127, 0), ''Pixel''2 = (0, 127, 0) |
| 47 | |
| 48 | === Invisible faces === |
| 49 | You should avoid invisible faces, if a player can’t see a face in the game (during a usual gameplay |
| 50 | or cinematic scene), then you have to remove it. For example you don’t need to have 5mm details |
| 51 | on helmets. |
| 52 | |
| 53 | {{{#!div style="font-size: 80%;text-align:center" |
| 54 | {{{#!div |
| 55 | [[Image(invisible-faces-bad.png)]] |
| 56 | }}} |
| 57 | Figure 2: Invisible faces for helmets. |
| 58 | }}} |
| 59 | |
| 60 | === Transparent meshes === |
| 61 | Avoid using transparent materials for meshes. If you can add some (5% - 10%) triangles but use |
| 62 | opaque materials then use opaque materials. Make sure to still stay inside the recommended polycount. |
| 63 | |
| 64 | {{{#!div style="font-size: 80%;text-align:center" |
| 65 | {{{#!div |
| 66 | [[Image(wireframe-bad-good.png)]] |
| 67 | }}} |
| 68 | Figure 3: Geometry for transparent meshes. |
| 69 | }}} |
| 70 | === Bones === |
| 71 | 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. |
| 72 | === Bone Weights === |
| 73 | 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. |
| 74 | == Geometry == |
| 75 | === Polycount Guidelines === |
| 76 | There is a good [ArtPolyCountGuidelines guideline] about poly count. |
| 77 | === Low poly tips === |
| 78 | There is a good generic [https://wildfiregames.com/forum/topic/18340-lowpoly-tips/ guideline] about low-poly geometry. |
| 79 | |
| 80 | === Vertex and triangle count === |
| 81 | The game engine doesn’t support meshes with more than **65536** vertices. It means a mesh with |
| 82 | 3 unique vertices per triangle might have at most **21845** triangles. Reusing vertices might increase the maximum number of triangles. |
| 83 | |
| 84 | You should avoid spawning many small meshes, especially if they have less than 128-256 vertices. |
| 85 | It’s better to pack them into a single mesh. |
| 86 | |
| 87 | == Materials == |
| 88 | |
| 89 | === Normal and specular textures === |
| 90 | 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. |
| 91 | |
| 92 | === Parallax mapping === |
| 93 | Parallax mapping is allowed only on big and flat surfaces. [ParallaxNormalMaps Normals] of these surfaces (of all their vertices) should be co-directed (look in the same direction) and be perpendicular to the corresponding surface. |
| 94 | |
| 95 | {{{#!div style="font-size: 80%;text-align:center" |
| 96 | {{{#!div |
| 97 | [[Image(parallax-bad-good.png)]] |
| 98 | }}} |
| 99 | Figure 4: Usages of parallax mapping. |
| 100 | }}} |
| 101 | |
| 102 | === External References === |
| 103 | * https://docs.unrealengine.com/4.27/en-US/TestingAndOptimization/PerformanceAndProfiling/Guidelines/ |
| 104 | * https://developer.arm.com/solutions/graphics-and-gaming/developer-guides/game-artist-guides |
| 105 | * http://fragmentbuffer.com/gpu-performance-for-game-artists/ |
| 106 | * https://docs.cryengine.com/display/SDKDOC2/Rendering+Performance+Guidelines |
| 107 | * https://blog.unity.com/technology/artists-best-practices-for-mobile-game-development |