Pruning unused textures

Sun Aug 08, 2021 12:07 pm

I wasn't sure whether to put this under Mapping or Assets but given you need a map file to do what I'm asking, I decided to go with mapping.

I've asked this before here, maybe a scary 10 years or so ago, but I thought I'd ask again because I haven't been keeping up with things much at all.

Is there a tool that can take a look at a pk3/wad texture resource file and a map, or just a pk3 that has all the stuff merged in it, then go through the textures / flats assigned to each surface in the map and finally delete any textures that are NOT used?

I'm essentially looking for a tool that allows you to use a large resource pool while you're working, then prune down all unused assets.

Thanks in advance!

Re: Pruning unused textures

Fri Aug 20, 2021 9:31 am

SLADE has a built-in feature that does the job, although it only seems to work properly with .wad files with any custom textures/flats in them.

Re: Pruning unused textures

Fri Aug 20, 2021 10:46 am

I'm not sure how Slade does it, but animated textures, switches and any textures that change in game (e.g. via ACS) could potentially get pruned with the DeePsea tool that did this. i.e. if SW1something was on a wall in the map, it wouldn't get pruned, but SW2something might. Just something to check.