Asset textures often need to be resized or the compression method changed. Large Sized Textures cause issues for your players such as the map not loading making them fall through the map or other models not loading either. FXServer will warn you in the console if your YTD files are too large.
If you have issues compressing textures, feel free to comment and I’ll try to get back to you.
Best way to keep the quality of the file, you are going to resize is to keep the image in a DDS format (DirectDraw Surface) DDS is a compressed format and thus cannot be opened the same way a PNG or JPEG can.
If you want to avoid Setting up Photoshop or you don’t own a licence for Photoshop the alternative is to use Paint.NET as it supports DDS natively and is free
To allow Photoshop to open and edit DDS files you need to install a plugin. There is a few options for this but I highly suggest the Intel Texture Works Plugin.(Nvidia one works but I`ve had problems importing the DDS into openIV after export) Intel Texture Works Plugin comes with instructions on how to install and works nicely with windows as you can then double click DDS files to have them open in Photoshop. For your convenience I have copied the guide from the Intel Texture Works Plugin Repo
- Close Photoshop
- Download the IntelTextureWorks_1.0.4.zip file and expand it on your local computer
- Copy the desired plugin from either of the following unzipped folders
- .../IntelTextureWorks_1.0.4\Plugins\x64\IntelTextureWorks.8bi
- .../IntelTextureWorks_1.0.4\Plugins\Win32\IntelTextureWorks.8bi
- Paste the plugin into the appropriate Photoshop Plugin folder
- D:\Program Files\Adobe Photoshop CC 2014\Required\Plug-Ins\File Formats
- D:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins\File Formats
- Copy the cubemap scripts from:
- .../IntelTextureWorks_1.0.4\PhotoshopScripts\IntelTextureWorks-ConvertCubeMap.jsx
- .../IntelTextureWorks_1.0.4\PhotoshopScripts\IntelTextureWorks-CubeMapGaussianBlur.jsx
- Paste the cubemap scripts into:
- D:\Program Files\Adobe Photoshop CC 2014\Presets\Scripts
In order to resize textures from a YDR container you need to export the images from it first, you cannot edit them within a YDR file. To export from a YDR file my favourite way is to open the file with Texture Toolkit It's really easy to open YDR files with Texture toolkit, the main thing to remember with the toolkit is that it can only import, export and save textures a YDR and cannot change the compression method.
You can also open YDR files with OpenIV, just create an archive first to work on and import the YDR files.
You cannot change compression Methods using Texture Toolkit. If you need to change compression you will need to import the image into photoshop and export it again to change the method.
Here is a list of all the most common compression methods in all cases you will be using DXT5 unless its really basic in-which you will use DXT1:
| Compression Algorithm | Information |
|---|---|
| DXT1 | For use with really basic and small images (only has basic colour) |
| DXT5 | For use with most images |
| A8R8G8B8 | This method takes up a huge amount of space. Has Little compression. To be used for script_rt_dials_race (dials for vehicles) |
| A8 | pain of death, pretty sure this has no compression involved |
- Make sure your OpenIV is in Edit mode
- Select the image you want to change the method of, in the left bar
- Click properties near the top right.
- Using the Pixel format dropdown box change the compression method.
- Press okay
It's important to check image size as 1 4000x4000 image even in DXT5 mode can push a car into a warning. Here is a rough guide of sizes that textures should be.
| Item | Texture Size | Comments |
|---|---|---|
| Big Items (liveries) | at most 2046x2046 | it is okay for it to be sized smaller once it looks okay |
| Medium Items (big important pieces, engines) | 1024x1024 | |
| Small Items (Tyres, lights, weapons) | 512x512 | |
| Really Small Items (logos) | 256x256 |
- Open the DDS file with Photoshop
- Under the Image tab from the top bar select Image size (Alt + CTRL + i)
- Change the Height to the appropriate size (make sure you use pixels for measurement). you don't change the width as photoshop will adjust this for you after you change the height! ** If the item is a rectangle it will need to be a rectangle after you resize it. The ratios need to match after the image is made smaller**
-
Save image as (shift + control + S)
-
choose Intel Texture Works (.DDS)
-
Save in the right Directory
Options for DDS export
Texture Type: Color + Alpha Compression: BC3 8bpp (linear) Mip level: Ignore (leave blank) Pre-compress Normal Map operations: Ignore (leave blank) Mip Maps: Auto Generate And then press Okay!
- Create a work folder to place your file.
- open your file in OpenIV or in Texture Toolkit if it is a YDR.
- Look through all the textures you are looking for Size (pixels), Compression Method and purpose.
- Size. Size should never be above 2046x2046 it doesn't make sense to have a 4kx4k texture for a car.
- Compression Method. You are checking that the compression method is DXT5 or DXT1
- Purpose. The reason you check purpose is because you don`t need a huge texture for a tire or floormat.
- Using All the Criteria I have set look through the texture files and adjust every item that does not meet the criteria
- https://www.modding-forum.com/guide/3-texture-compression/
- https://en.wikipedia.org/wiki/DirectDraw_Surface
- https://github.com/GameTechDev/Intel-Texture-Works-Plugin/releases
- https://www.gta5-mods.com/tools/texture-toolkit
- https://openiv.com/
Writen while a member of the RPUK Development team for RPUK