Texture size
First off, Rimworld being on Unity, textures get uncompresssed and converted to a GPU-native format (DDX i think? Similiar to RAW) in memory, so tweaks like better compression ratio or a more efficient picture format like webm or avif do nothing. That's correct, right?
Reason i ask this is, i'm low on memory with my modlist even with 32 GB RAM.
Now, Rimworld wiki about textures has a warning:
Is point 2 still true?
- RimWorld texture resolutions are independent of their draw size
in-game. Most vanilla textures use a resolution of 64 pixels per tile,
but most mod artists use a resolution of 128 or 256 PPT. Using a higher
resolution is possible, but RimWorld texture compression and default
zoom levels will render such high resolutions excessive. Textures that
are too large will also take up a lot more VRAM, and RimWorld will
simply crash if the GPU's VRAM is filled.
I interpret this, that using higher than 256 px textures makes no sense. And indeed, seeing how the Kurin Deluxe mod was the biggest one by far and especially the tail animations, consisting of hundreds of png with 512x512px, i resized them all to 128px and saw no visual difference even zooming all in with Camera+.
Then i made a shell script (Linux) to check and resize all textures in any "Textures" directory recursively, using Imagemagick (Windows users could maybe use Irfanfiew batch mode):
#!/bin/sh
fd '^Textures$' -t d -x fd . -t f -e png {} | while read pic; do
identify -ping -format '%w %h' "$pic" |xargs |while read _width _height; do
if ([ "$_width" -gt 256 ] || [ "$_height" -gt 256 ]); then
printf 'image:\t%s\nwidth:\t%s\nheight:\t%s\n' "$pic" "$_width" "$_height"
fi
[ "$_width" -gt 256 ] && mogrify -resize 256x "$pic"
[ "$_height" -gt 256 ] && mogrify -resize x256 "$pic"
done
done
This shaved off a whoping 5 GB of memory usage, everything still looks fine, textures where they should be and no visual quality loss. Points i noticed:
- some texture replacements used crazy 2000x2000px textures. Most were around 512x512px tho.
- almost all mods using some grayscale textures, magick complained about incorrect RGB colorspace.
So, in summary: using more than 256 px textures makes no sense but uses more memory. Someone please can confirm?
Posted Mar 8, 2025, 12:52 PM UTC