[[TOC]] = 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 you’re not sure does a guideline rule is applicable for you or not ask a question on the [https://wildfiregames.com/forum/ forums] or ask a programmer. == Textures == === Texture formats and sizes === 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 should be PNG by default, the engine will automatically convert them to [https://en.wikipedia.org/wiki/DirectDraw_Surface DDS]. The engine supports only textures with a size of power of two: 4, 8, . . . , 1024, 2048. Maximum 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. 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 doesn’t 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 [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. AO textures should not have alpha channel and saved as 8-bit grayscale [https://en.wikipedia.org/wiki/Portable_Network_Graphics PNG] files. {{{#!div style="font-size: 80%;text-align:center" {{{#!div [[Image(ao-bad-good.png)]] }}} Figure 1: Ambient occlusion textures. }}} === Normal map textures === [NormalMaps 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: ''Normal''1 = (1, 0, 0), ''Normal''2 = (−1, 0, 0), ''Pixel''1 = (255, 127, 0), ''Pixel''2 = (0, 127, 0) === Invisible faces === You should avoid invisible faces, if a player can’t see a face in the game (during a usual gameplay or cinematic scene), then you have to remove it. For example you don’t need to have 5mm details on helmets. {{{#!div style="font-size: 80%;text-align:center" {{{#!div [[Image(invisible-faces-bad.png)]] }}} 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. {{{#!div style="font-size: 80%;text-align:center" {{{#!div [[Image(wireframe-bad-good.png)]] }}} 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 [ArtPolyCountGuidelines guideline] about poly count. === Low poly tips === There is a good generic [https://wildfiregames.com/forum/topic/18340-lowpoly-tips/ guideline] about low-poly geometry. === Vertex and triangle count === The game engine doesn’t 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. It’s 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. [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. {{{#!div style="font-size: 80%;text-align:center" {{{#!div [[Image(parallax-bad-good.png)]] }}} Figure 4: Usages of parallax mapping. }}} === External References === * https://docs.unrealengine.com/4.27/en-US/TestingAndOptimization/PerformanceAndProfiling/Guidelines/ * https://developer.arm.com/solutions/graphics-and-gaming/developer-guides/game-artist-guides * http://fragmentbuffer.com/gpu-performance-for-game-artists/ * https://docs.cryengine.com/display/SDKDOC2/Rendering+Performance+Guidelines * https://blog.unity.com/technology/artists-best-practices-for-mobile-game-development