Similar to models PAC3 lets you use custom textures. Available texture formats include **.JPG**, **.PNG** and **.VTF**, each comes with their own pros and cons. ==== Usage ==== Textures can be used within the **[[part:material|Material]]**, {{icon:bug.png?nolink}}**[[part:material3d|Material3D]]**, {{icon:bug.png?nolink}}**[[part:material2d|Material2D]]** parts. Simply paste your texture link into the proper field. Click on the part name to learn more about it. If you're looking for information on how to host your files online, see [[tutorial:hosting]]. If you want to know how to replace existing textures, see [[tutorial:replacing-materials]]. ==== Quick format guide ==== **.JPG** - Textures without transparency. **.PNG** - Textures with transparency, colourable textures. **.VTF** - Textures with transparency, animated textures, colourable textures, textures bigger than 1024x1024. ---- ==== Texture Format Comparison Table ==== This table shows a brief comparison of supported texture formats. In-depth explanations can be found further down the page. ^ ^.JPG^.PNG^.VTF^ |Max. resolution|1024x1024|1024x1024|4096x4096| |Transparent|{{icon:no.png?nolink}}|{{icon:yes.png?nolink}}|{{icon:yes.png?nolink}}| |Colourable|{{icon:no.png?nolink}}|{{icon:yes.png?nolink}} {{icon:bug.png?nolink}}|{{icon:yes.png?nolink}}| |Animated|{{icon:no.png?nolink}}|{{icon:no.png?nolink}}|{{icon:yes.png?nolink}}| |Texture Filtering|{{icon:yes.png?nolink}} {{icon:bug.png?nolink}}|{{icon:yes.png?nolink}} {{icon:bug.png?nolink}}|{{icon:yes.png?nolink}}| |Unclamped|{{icon:no.png?nolink}}|{{icon:no.png?nolink}}|{{icon:yes.png?nolink}}| ^ Can be used with: ^^^^ |Material|{{icon:yes.png?nolink}}|{{icon:yes.png?nolink}}|{{icon:no.png?nolink}}| |Material3d|{{icon:yes.png?nolink}}|{{icon:yes.png?nolink}}|{{icon:yes.png?nolink}}| |Material2d|{{icon:yes.png?nolink}}|{{icon:yes.png?nolink}}|{{icon:yes.png?nolink}}| ---- {{icon:bug.png?nolink}} - Works only with experimental parts (Material3d / Material2d) ==== Resolution ==== Any **.JPG** or **.PNG** texture with resolution over 1024x1024 pixels might not work correctly, they might load partially or completely black, or randomly break after a while. Colourable **.PNGs** do not work above that limit. The only solution is to lower the texture resolution or switch to the **.VTF** format. **.VTF** supports any resolution but try to keep it as low as possible. The size you should use depends on your models, UV maps, etc. In most cases you won't need anything bigger than 1k unless you're doing something very detailed, in extreme close-up or trying to fit an entire character on a single texture. A close-up comparison of different texture sizes on a 1x1 plate. ---- {{https://i.imgur.com/TRr8wFg.jpg}} Resolution: 1024x1024 File size: 1.6 MB {{https://i.imgur.com/iTiY2fS.jpg}} Resolution: 2048x2048 File size: 5.5 MB {{https://i.imgur.com/0yCixsZ.jpg}} Resolution: 4096x4096 File size: 15.7 MB ---- Is the much bigger file size worth it? Decide for yourself. ---- ==== Compression ==== Most common compression levels in source are **DXT1** / **DXT5** and **BGR888** / **BGRA8888**. **DXT1** - Compressed texture with no alpha channel. **DXT5** - Compressed texture with alpha channel. **BGR888** - Uncompressed texture with no alpha. **BGRA8888** - Uncompressed texture with alpha channel. There are many other formats that will not be covered here as you probably won't need them. All comparison tests were done with the {{icon:bug.png?nolink}}**Material3D** part. ---- === Base Texture === Normal image textures or pictures look good even with higher compression levels so the format isn't really that important unless you need some really smooth gradients. The texture size is 512x512. ---- {{ :tutorial:textures:diffuse_png.png |}} Format / Compression: **.PNG** File size: 392.57 KB {{ :tutorial:textures:diffuse_dxt5.png |}} Format / Compression: **.VTF** / **DXT1** / **DXT5** File size: 170.88 KB / 341.56 KB {{ :tutorial:textures:diffuse_bgr888.png |}} Format / Compression: **.VTF** / **BGR888** File size: 1.0 MB As you can see there is almost no visible difference for that type of picture. **PNG** / **DXT5** ( **DXT1** if you don't need alpha ) should work fine in most cases. If you need an image with very smooth gradient use **BGR888**. Recommended formats ---- ^Texture type^ Smallest File Size *^ Best Quality^ |Below 1024x1024| **DXT1** / **DXT5** | **.PNG** | |Above 1024x1024| **DXT1** / **DXT5** | **BGR888** / **BGRA8888**| |Below 1024x1024 + Alpha| **DXT5** | **.PNG** | |Above 1024x1024 + Alpha| **DXT5** | **BGRA8888**| * Depending on the original image **.PNG** might be smaller in some cases. ---- === Normal Map === When working with normal maps images compression becomes much more important as it might cause some heavy artifacts. Below you'll find a comparison of different image formats and how they look in-game. The texture used is a 400x400 normal map. Phong is enabled to show lighting artifacts. ---- {{:tutorial:textures:normal_png.png}} Format / Compression: **.PNG** File size: 25.7 KB * {{ :tutorial:textures:normal_dxt5.png |}} Format / Compression: **.VTF** / **DXT1** / **DXT5** File size: 170.88 KB / 341.56 KB {{ :tutorial:textures:normal_bgr888.png |}} Format / Compression: **.VTF** / **BGR888** File size: 1.0 MB **.PNG** is clearly a winner for textures under 1024x1024 pixels as it offers the best image quality while keeping the file size low. For bigger textures you'll have to pick between **DXT1** / **DXT5** / **BGR888**. On the tested texture there was almost no visible different between **DXT1** / **DXT5** but **DXT5** should create smoother gradients in general. **BGR888** is similar in quality to **.PNG**, the difference is a much bigger file size (which gets even bigger with **BGRA8888**). Recommended formats ---- ^Texture type^ Smallest File Size * ^ Best Quality^ |Below 1024x1024| **DXT1** / **DXT5** | **.PNG** | |Above 1024x1024| **DXT1** / **DXT5** | **BGR888** / **BGRA8888**| |Below 1024x1024 + Alpha| **DXT5** | **.PNG** | |Above 1024x1024 + Alpha| **DXT5** | **BGRA8888**| * Depending on the original image **.PNG** might be smaller in some cases. ---- ==== Transparency ==== how 2 transparency alphatest vs translucent ---- ==== Colourable textures ==== Both **.VTF** and **.PNG** (up to 1024x1024) textures can be colourable, it's done through an alpha mask where visible (white) data is colourable and invisible (black) isn't. If you want to learn more, see [[tutorial:colourable-textures]] Example material using colourable texture. ---- {{https://i.imgur.com/1Uv6Itv.png}} Original texture {{https://i.imgur.com/Nmd2MHT.png}} Alpha mask {{https://i.imgur.com/JT1oX7Y.png}} End result, texture coloured in PAC ---- ==== Filtering ==== All textures in PAC are filtered by default. In most cases there is no need to change those settings at all. Filtering doesn't affect file sizes. {{ :tutorial:textures:filtering_ani.png |}} Format / Filtering: **.VTF** / **Anisotropic** {{ :tutorial:textures:filtering_tri.png |}} Format / Filtering: **.VTF** / **Trilinear** {{ :tutorial:textures:filtering_point.png |}} Format / Filtering: **.VTF** / **Point Sample** **Anisotropic** is supposed to give the best results and is the default filtering option for **.VTF** (you don't have to check any filtering flags) and **.PNG** textures. **Trilinear** is pretty much the same as **Anisotropic** although it might get blurry in some cases. **Point sample** produces really sharp images, same effect can be achieved by checking the ''**no texture filtering**'' option in PAC editor. ---- ==== Glowing textures ==== ==== Animated textures ==== Animated texture example Animated texture example Animated texture example Animated texture example Animated texture example {{ https://cdn.discordapp.com/attachments/349930619767357451/392982923088887808/SociableSplendidArmyant-size_restricted.gif?200}} ==== UV Clamp ====