What the warning means
FiveM warns when a file of a resource needs a lot of graphics memory, for example that an asset “uses 64.0 MiB of physical memory”, and adds that “Oversized assets can and WILL lead to streaming issues”. RedM does the same for Red Dead Redemption 2 files. In a texture dictionary (.ytd), that memory is its textures: a texture of 4096 × 4096 pixels needs 16 times as much as the same texture at 1024 × 1024.
Optimize textures halves every texture that is larger than a size you choose until it fits. A texture that already holds a smaller copy of itself (a mip level) keeps that copy as it is, so nothing is lost but the size. Textures inside models (.ydr, .ydd, .yft) are not changed.
Before you start
- RPFView 0.15.0 or later for GTA V files (FiveM), 0.16.0 or later for Red Dead Redemption 2 files (RedM). Download RPFView if you don't have it yet.
- GTA V (Legacy or Enhanced) or Red Dead Redemption 2 chosen as your game in RPFView. File → Switch game… changes it.
- The resource's
streamfolder on your PC, or the.ytdfiles or archives you want to make smaller.
1. Open Optimize textures
- In the main window, choose Tools → Optimize textures….
- Click Choose folder… and pick the resource's
streamfolder. RPFView finds the.ytdfiles in it and in its subfolders, and reads how much graphics memory each one uses.
Or right-click .ytd files, folders or archives in the file list and choose Optimize textures…: the window opens with them.
2. Choose the largest texture size
- Largest texture side: 4096, 2048, 1024, 512 or 256 px, 1024 by default. Every texture whose longer side is larger is halved until it fits.
- Only files that use: Any amount, or only the files that use 16 MiB or more, 32 MiB or more or 64 MiB or more, counted the way FiveM counts them.
- The list shows each file with its Memory now and After, the Textures that get smaller and a Status. Untick a file to leave it out.
3. Optimize
- Choose where the smaller files go. Replace the files (the default) writes them over the originals; leave Keep the originals in ticked to keep each original in a folder next to yours, such as
stream (originals). - Or choose Save copies in to write the smaller files into another folder, such as
stream (optimized), with the same subfolders. The files themselves are not changed. - Click Optimize, and Replace when RPFView asks before it replaces files on disk. The Status column shows what happened to each file.
Files inside archives are changed like any other edit: they stay pending until you save the archive with File → Save all (Ctrl+Shift+S).
If you saved copies, put them in the resource's stream folder in place of the old files, then start the resource again. A file that still needs a lot of memory can be optimized again with a smaller Largest texture side.
From the command line
rpfview-cli optimize-ytd, which comes with RPFView, does the same for files on disk, without opening the app and without the game. It never changes the files you give it: the files that change are written to the --out folder, with their paths below the folder you gave.
rpfview-cli optimize-ytd resources\mypack\stream --out D:\work\optimized rpfview-cli optimize-ytd resources\mypack\stream --max 512 --min-mib 16 --list
--maxis the largest texture side in pixels (1024 by default).--min-mibleaves out files that use less graphics memory than that.--listonly shows what would change, with each file's memory before and after.- It reads the
.ytdfiles of GTA V (Legacy and Enhanced) and Red Dead Redemption 2. All options are in the command-line reference.
Common problems
Tools → Optimize textures… is greyed out
It works while GTA V or Red Dead Redemption 2 is the chosen game. Change it with File → Switch game….
A file says “Nothing to change.”
None of its textures is larger than the Largest texture side you chose; the Textures column says so. Choose a smaller size, or leave the file as it is.
The warning names a model, not a .ytd
Optimize textures only changes texture dictionaries. Textures inside models (.ydr, .ydd, .yft) stay as they are, and so does the model itself.