Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Jun 19, 2026 8:38 pm
All times are UTC + 0
I made a new texture compression tool.
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
jonwil
Rocket Cyborg


Joined: 24 Jul 2005

PostPosted: Wed Jun 10, 2026 5:32 am    Post subject:  I made a new texture compression tool. Reply with quote  Mark this post and the followings unread

I made a new tool for doing texture compression that is designed to do it identically to how the sage SDK does it.
This is the same code that will be going into the BinaryAssetBuilder replacement I am working on.

You can download it from https://mega.nz/file/HoEgCTiL#gcuKel5QwVO-dQD6-EBvrOupZebVUEkM7sNTpQeE2L4 and you can get the source code at https://github.com/jonwil/sagetools

It takes the following parameters:
-in (path to the input texture file to convert)
-out (path to the output texture file to create)
-type <type> (type of texture to generate where <type> can be VolumeTexture, CubeTexture or StandardTexture, default is StandardTexture)
-generatemips <true|false> (generates mip maps, default is true)
-format <format> (texture format to generate where <format> can be A8R8G8B8, DXT1, DXT1A, DXT3, DXT5, X8R8G8B8 or R5G6B5, default is DXT1)

For example, this command line:
texcompress -in in.tga -out out.dds -format DXT5 -generatemips false -type StandardTexture
will convert in.tga into an output standard texture file with DXT5 compression and no mip maps generated.

It can read the following input formats:
.jpg
.tga
.png
.dds (which is copied directly across to the output file without any changes)

The purpose of this tool is to provide a way to compress textures identically to how the SAGE SDK does it. (note that this only supports output in PC format, not XBOX or PS3 format)

Feel free to modify the source code and to distribute your modifications but if you distribute modified binaries you also need to distribute modified source code to comply with the various licenses and I would appreciate a heads up that you are doing things with my code Smile

Any questions about this stuff or how to use it (e.g. if the instructions aren't clear), please feel free to post here or hit me up on Discord (I am "Jonathan Wilson" on most of the C&C/SAGE/modding discords)

If you want to know more about how this works internally, read the source code (or ask me questions on Discord Smile

More tools are comming in the future.

Back to top
View user's profile Send private message
jonwil
Rocket Cyborg


Joined: 24 Jul 2005

PostPosted: Wed Jun 10, 2026 5:54 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2112s ][ Queries: 11 (0.0089s) ][ Debug on ]