Optimize the size
Optimize analyses the ped garment by garment: how much each garment takes when it is exported, what it could save and how much it would show. The analysis changes nothing. A garment’s textures and triangles you can then preview and reduce, one garment at a time or several at once.
Why size matters
Every player who sees the ped downloads its files from the server, so a large ped takes longer to show up. And if your server has a limit on how large a ped may be, it has to fit within it.
Optimize a garment in the inspector
Select the garment. Under Optimization in the inspector are the garment's size and the levels Original, Light, Balanced and Strong, each with roughly how large the garment gets and three dots for how much of the look it keeps. Recommended shows where to start.
Pick a level. Pedify builds it on a copy and shows it in the 3D view, where Original and Optimized switch between before and after.
Press Apply. It is one step in the history, so Undo takes it back, and Restore original gives the garment its first form. An optimized garment costs 3 credits when you export, once per garment; previewing, undoing and restoring are free.
Light only does what the analysis recommends and hardly shows; when it says Already light there is nothing to gain. Balanced goes further and can show a little, Strong makes the garment smallest and can show. Under Issues, a texture or model that is too large has the button Optimize this garment, which brings you here.
Custom shows the same choices as the garment's page under Optimize: a size for each texture, the triangles and lower LODs.
Analyse the ped
Press Optimize in the top bar. The panel takes the inspector’s place and analyses the ped, with the maps as the export dialog is set. It analyses again after every edit.
Type your server’s limit in Target (MB). The target is kept with the project. Start is the ped’s size when you first opened Optimize, and Saved is what you have saved since. Reset start makes the size now the new start.
Under Garments and savings are the garments, those that can get smaller first. Each garment has a status: Large improvement possible, Some improvement possible or Already optimized, and Optimized for a garment you optimized here. The row shows the garment’s size, up to three reasons, such as a texture of 4096 × 4096, and roughly how much it could save.
Your server’s limits
Choose your server in Server. FiveM standard sets no target: FiveM has no limit on a ped’s size, only a warning for files over 16 MB, so the target is your own. Light server sets the target to 30 MB, counts textures over 1024 as too large and gives each garment 75 % of its triangle budget. The analysis and the route to the target follow what you choose.
Custom is your own limits: Largest texture, Triangle budget and the target you type. They are kept in this browser. A texture larger than the limit is suggested at the limit’s size only when that shows little or moderately; if it would show a lot, the texture stays as it is, with the limit as a reason on the garment’s row.
The route to the target
When the ped is over its target, Route to the target lists the changes that save the most for the least visible loss, until the ped is estimated to reach the target. If low-impact changes are not enough, it says how far medium-impact changes would go. High-impact changes are never suggested.
Next step shows what to start with. A status needs a real saving that shows little: a large texture the garment needs to look right is not counted as a problem.
Several garments at once
Press Optimize several under the route to the target. A page shows the route’s garments, each with its settings, what it is estimated to save and how much it shows. All are ticked; untick what should stay as it is. Preview opens a garment with exactly those settings, and back takes you to the page.
Press Check. The ticked garments are built on a copy of the ped and checked one by one, and the ped is measured exactly as the export writes it. A garment whose check finds an error is left out, and its row says why.
Press Apply. It works only after a check of exactly the ticked garments. The garments are changed as one step in the history, so Undo takes them all back at once, and each garment can still be restored on its own. Each optimized garment costs 3 credits when you export.
Optimize the whole ped, above the list of garments, opens the same page with every garment that has Large improvement possible or Some improvement possible, with the changes that show little, or moderately where your server limit requires it. It needs no target.
Good to know
Pedify never changes several garments by itself: nothing is done until you press Apply on the page, and changes that show a lot are never suggested.
One garment at a time
Press View & optimize or View details to see a garment. The garment is selected in the 3D view, and Optimize takes you back to the list.
Under the textures you choose a size for each texture. When the garment opens, Pedify measures how much detail each smaller size loses on the parts of the texture the garment uses, and the recommended size follows the measure. Each size says roughly what it saves and how much it shows: low, medium or high impact. Same for all variants gives every variant the same size, and Use the recommendation for all goes back to the recommendations.
Under the geometry is how many triangles the garment has, and presets to reduce them: Safe (~15 %), Balanced (~30 %), Aggressive (~50 %) and Custom. When the garment opens, Pedify makes each preset with the simplifier and shows how many triangles it leaves and how much it shows. The high LOD of the model and of its alternative models is simplified: open edges such as the neck and the cuffs stay where they are, and every point that is kept keeps its bone weights, colours and UVs. The lower LODs stay as they are, since the export writes the high LOD only unless you turn on Keep lower LODs. A garment with few triangles has no presets, and a shaped head or a new head from the AI keeps its geometry.
Preview and apply
Press Preview. The garment is built with the chosen sizes and triangles on a copy of the ped, each texture in its own format and with its transparency.
Choose Original or Optimized to see the garment before and after in the 3D view. While the 3D view has focus, Tab switches between them, and Wireframe draws the garment’s triangles over it on both sides. The table shows the garment’s and the whole ped’s size as the export writes them, the triangles, the vertices and the largest texture, and Check says whether anything in the result is wrong. Warnings, such as points removed on a seam, still let you apply.
Press Apply. It works only when the check found no errors. The textures and the triangles are changed as one step in the history, so Undo takes it back. The garment costs 3 credits when you export, once. The garment then says Optimized in the list, and the analysis runs again when you go back.
Restore original gives the garment back as it was before its first optimization. If you changed the garment after that, those changes are lost, and Optimize says so first. The original stays with the project until the log is written down as a ped after 2000 steps; after that there is no original left to restore.
The reduced triangles are kept on this device with the project, so opening the project again gives the very same garment. They are deleted with the project.
Good to know
The preview changes nothing: it is built on a copy, and another choice or another change to the ped takes it away. A garment with painted layers, such as a texture or map edit, skin or tattoos, keeps its textures and maps until the layers are off, or the old size would come back the next time it is painted. Its triangles can still be reduced.
Lower LODs
Under Lower LODs on a garment’s page you can tick Make lower LODs. Pedify makes a medium and a low LOD from the high one, with the same points and the same bone weights: medium keeps about 30 % of the triangles and low 5 %, as the game’s own clothing has them, or as far as it gets without moving open edges. Props get none, since the game’s own props have none, and neither does a shaped head or a new head from the AI.
The preview shows the triangles per LOD, and LOD in the 3D view chooses which LOD the optimized side is shown at in the 3D view. Apply makes them in the same step as the textures and the triangles, and they are kept with the project like the reduced triangles.
The export writes them only when Keep lower LODs is on in the export dialog. It is off to begin with, so otherwise the export writes the high LOD only as before, and the files get no bigger. The lower LODs stay in the project even when the log is written down as a ped.
Quick fixes
Textures that need no transparency: textures in DXT5 that have nothing showing through are written in DXT1 instead, at half the size.
Identical variants: variants that are exactly the same as another variant are removed.
Textures no garment uses: textures in the files that no garment uses are removed.
Open Quick fixes. Nothing is ticked at first. Tick what you want done; the line below shows how large the ped will be with it, and whether it then fits: Fits the target or Still over the target.
Press Apply. Every ticked change is made as one step in the history, so Undo takes them all back. Quick fixes cost no credits.
Warning
Textures no garment uses may belong to the head or the body. Check them before you remove them.
Make one texture smaller
You can also make a texture smaller in the inspector. Select a variant, choose a size in Resize to and whether it is for This texture or All textures in the garment, and press Resize. If the size is already one of the texture’s mip levels it is simply taken from there. Otherwise the texture is re-encoded as DXT and may lose a little detail, and the inspector says so before you press.
Change format and mip levels
In the inspector, under the size, is Pixel format. DXT1 is the smallest but has no transparency, DXT5 has it and is twice the size, and uncompressed loses no quality but takes about eight times as much as DXT1. The choice is for Change this texture or Change every texture in the garment, the line under it shows the size before and after, and Change format rewrites the textures as one step in the history. It costs no credits.
Mip levels are the smaller copies of the texture the game shows at a distance. Dropping levels makes the file smaller and works for every format, because the levels are only cut away. Adding levels means writing the texture again, so it is only possible in the three formats above. The smallest level is 4 × 4, so the list ends at the count the texture’s size allows.
Good to know
If the texture has anything showing through, DXT1 is off, because the transparency would be lost. Pedify also reads more formats than it writes: a texture in BC7, for one, can be given fewer levels without being rewritten, but choose another format for it and it is written again and cannot be turned back into BC7.