UE2 - UT2kX how to batch replace all original textures?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Larry7

New Member
Mar 26, 2009
4
0
0
What i want to do is make a smaller lo-res version of UT2004 for my laptop :)

I want to extract all the DDS texture files from the UTX files, make a photoshop script that will resize all the textures to half the dimensions and then import back the textures ... except the coronas and other stuff that will get screwed if i do that :)

so how do i do such batch export and import after that?
 

meowcat

take a chance
Jun 7, 2001
803
3
18
Is it a RAM memory concern? or processor concern? or harddrive space concern?

All (with exception of perhaps GUI) textures already have mipmaps (roughly 5 maps, each with half the resolution of the previous). By turning down the texture detail settings, the lower res mipmap will be used. I *think* that if you restart the game after having adjusted the texture settings lower, it will only load up the required mipmap levels into memory (someone please correct me if I'm wrong).
 

xMurphyx

New Member
Jun 2, 2008
1,502
0
0
liandri.darkbb.com
I suppose you want this to reduce the size on the hdd.
If you modify the existing texture packages in any way you won't be able to play online on maps that require these packages, so your plan would only work for offline play.

What you can safely do is delete the maps you don't play/don't play often. This'll save a lot of space already and you won't break any compatibility.

I'm not sure if you can just delete the music folder, but it's worth a try.
 

Larry7

New Member
Mar 26, 2009
4
0
0
i know about the mipmaps, it's a hdd space concern - and 2,8 gb textures 1024x1024 and above when i play at resolution 800x480 seems pointless and a waste of space - which is very limited on my netbook :)

i did similar thing to Heroes 5 and it works fine and saved about 40% hdd space :)

If you modify the existing texture packages in any way you won't be able to play online on maps that require these packages, so your plan would only work for offline play.

are you sure about that? and what do you mean by "online"? only official servers or local lan games? because i am interested only in local LAN gaming :)
 
Last edited:

Larry7

New Member
Mar 26, 2009
4
0
0
ok but my main question still stands - how :)

how do i export all the textures and then import back the modified textures?
 

meowcat

take a chance
Jun 7, 2001
803
3
18
To do this you will have to physically open up each and every texture package while in UnrealEd (or at least the larger texture packages that you want to reduce), and export them all (usually as .dds). Then import them into your editing program, reduce the size, reexport as the same type of .dds file (dxt5, dxt3, dxt1 etc) then reimport them into UnrealEd with the same name (overwriting the existing file). Then save the texture package.

There are some batch export commands, and you could always try using UDE.exe or the UT Package tool (search the UnrealWiki for these) to export all of the textures at once, but importing them would probably be best done texture by texture. Alternatively you probably also just compile a script package, using #EXEC commands to reimport all of the textures into a package (then just rename the package), but I'm not sure that is much faster than just reimporting them via UEd.

I don't know of any good way to do this for the textures embedded in .u files, but those are usually pretty small (mostly icons) so that should not be a concern.

Of course it'd be a good idea to keep copies of the original files elsewhere. Keep in mind that you do not want to reduce the size of any gui/hud textures as there is no guarantee that the code does not use hardcoded texture sizes/coordinates when drawing them (in fact all weapon icons use the same texture with explicit coordinates to only draw a small section).

If I were you, I'd only do this to the playerskins, weaponskins, and some of the level texture packages.
 
Last edited:

Larry7

New Member
Mar 26, 2009
4
0
0
ok i have some progress :)

I can extract all the textures with UCC, it names them in format <group>.<name>.dds

i resized them in photoshop with the batch command.

the problem now is how to import them all at once, not by hand?

if i go to UnrealED -> import and select all of them it asks me to specify manually the group and the name for every texture.
Is there a way to tell him to get the group and the name from the name of the file and to import everything automatically?
 

meowcat

take a chance
Jun 7, 2001
803
3
18
No. And this does not allow you to set groupnames or any other settings.


The only way to import multiple textures at once, with group name, bTwoSided, generate mipmaps flagged etc. set, is to compile a uscript package -OR- (and I think this will work) add all of the same #EXEC directives to a text file and run it from within UEd. In either case you will have to write out an #EXEC Texture Import command for each and every texture. Now if you have some programming background, you could probably make yourself a little command line utility that could generate that text automatically from the texture file names....