Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: DDSConverter & Texture Discussion Thread

  1. #1

    Default DDSConverter & Texture Discussion Thread

    I took the liberty to open a new thread to discuss the new texture format, as it has nothing to do with PFM (see link).

    Regarding the latest comments from the PFM thread, the textures actually didn't change too much. The difference is the file header..

    DDS uses 128 bytes as the file's header (actually 4 byte as FourCC and 124 byte actual header info). The 'old' textures use a pixel format varrying from DXT1, DXT2 ... to DXT5 (different compression methods) or some luminance/alpha format. The textures that were introduced in the elfen update use a DDS extension adding another 20 byte to the file header. These 20 byte form a DX10 header structure containing the actual image description, among these is a DXGI_FORMAT which ultimately determines the files contents.

    All new DX10 textures use the format DXGI_FORMAT_BC1_UNORM_SRGB. The relevant part is the BC1 in the name because DirectX 9's DXT1 is the same thing as BC1. The same applies for BC2 and DXT2/DXT3. And BC3 and DXT4/DXT5. (Check the documentation) The actual pixel data inside the respective groups are exactly the same.

    I'm also expecting CA to use the new format in future dlcs as well, and as I'm kinda lazy I'm writing a small programm to convert BC1 through BC3 textures back to DXT format, so if anyone is interested just say so.

    EDIT:

    Here is the program: DDSConverter

    I didn't add a UI as you only need to run it once after an update. License and HowTo are both included in the .jar file and as n extra download.
    Last edited by Frunk; December 13, 2016 at 05:49 AM. Reason: Edited on behalf of OP.

  2. #2

    Default Re: Texture discussion Thread

    I am very interested. My workaround is less than ideal.

  3. #3

    Default Re: Texture discussion Thread

    I would be very interested as well! I've been reading forums trying out different methods to no avail and I'm not super good at programming, more so the art aspect so any help would be greatly appreciated

  4. #4

    Default Re: Texture discussion Thread

    As I am not allowed to edit my first post, I hope you still find this:

    DDSConverter

    I didn't add a UI as you only need to run it once after an update. License and HowTo are both included in the .jar file and as n extra download.

  5. #5

    Default Re: Texture discussion Thread

    You are amazing! Thank you

  6. #6

    Default Re: Texture discussion Thread

    Ok, so how do I use this program? I don't really have photoshop or anything, I use Gimp2. So, Do I use this program to edit my custom textures from BC1/DXT1 to .DDS or what?

    Sorry If I'm missing something completely obvious. I am by no means a programmer, texturer or expert. I am but a gamer who likes to mod things.

  7. #7
    Frunk's Avatar Form Follows Function
    Artifex

    Join Date
    Jun 2009
    Location
    Gold Coast
    Posts
    6,490

    Default Re: Texture discussion Thread

    Quote Originally Posted by DiegoDelaVega View Post
    As I am not allowed to edit my first post, I hope you still find this: DDSConverterI didn't add a UI as you only need to run it once after an update. License and HowTo are both included in the .jar file and as n extra download.
    You will be able to edit your own posts once you've made a total of 25 posts. In the mean time, I've added the info to the first post, and updated the thread title and prefix. If I've made any mistakes, let me know. Nice work, by the way.
    FrunkSpace | Mod Announcements | Colonies & Empires

    Under the patronage of Iskar of the House of Siblesz. I am the proud patron of:

    atthias | PaulH | Athos187

  8. #8

    Default Re: DDSConverter & Texture Discussion Thread

    Any information on editing the material files? Currently it seems they break as soon as you load them into the PFM

  9. #9

    Default Re: Texture discussion Thread

    Quote Originally Posted by DiegoDelaVega View Post
    As I am not allowed to edit my first post, I hope you still find this:

    DDSConverter

    I didn't add a UI as you only need to run it once after an update. License and HowTo are both included in the .jar file and as n extra download.
    Well I for one are still figuring out how to even run the program. Doesn't seem to allow me even if I follow your instructions.

  10. #10

    Default Re: DDSConverter & Texture Discussion Thread

    @ P4ntz: The material files shouldn't break if (and I'm asuming PFM does) PFM handles them as ordinary files, as both material and wsmodel files are plain XML. But tbh I never concerned myself with either of these formats.

    @ frolof: You need Java installed and properly set up, that means installing Java 7 or higher and setting up the environment variable for windows, linux or solaris. Sorry for the inconvenience, but I had almost all of the code ready as I've been working on a project for some weeks allready.

  11. #11

    Default Re: DDSConverter & Texture Discussion Thread

    @ frolof: You need Java installed and properly set up, that means installing Java 7 or higher and setting up the environment variable for windows, linux or solaris. Sorry for the inconvenience, but I had almost all of the code ready as I've been working on a project for some weeks allready.
    Alright thanks for the reply! I indeed have Java 7 or higher since I play minecraft a bit here and there. No idea what enviroment variable is, any suggestions on how that works?

    also if it matters, I have windows 10

  12. #12

    Default Re: DDSConverter & Texture Discussion Thread

    Ok seems like I figured out how to use this. How is this going to change the compression so it works in the game? It seems like it only changes the new texture files back to it's original state. Like I said I compress my textures to BC3/DXT5 but it still doesn't work.

    I tested the files in game now and it doesnt work like I predicted it. What am I doing wrong?
    Last edited by frolof; December 15, 2016 at 09:26 AM.

  13. #13

    Default Re: DDSConverter & Texture Discussion Thread

    @ DiegoDelaVega: In order to make certain unit variations work we need to be able to edit the material xml files manually and then load them into the packs via PFM. It seems currently that if a pack contains any .xml files it completely warps the units texture. For example there are hair colour tint variations that you can edit in those xml files, if i edit those, the texture breaks. Even if I load untouched completely vanilla material or xml files into the game through a pack those textures will break for those units. We are assuming that it is the PFM that is causing this currently as the files havent changed on the end of CA's extracted files to the best of my knowledge. Hope that provides more context.

  14. #14

    Default Re: DDSConverter & Texture Discussion Thread

    Quote Originally Posted by DiegoDelaVega View Post
    @ P4ntz: The material files shouldn't break if (and I'm asuming PFM does) PFM handles them as ordinary files, as both material and wsmodel files are plain XML. But tbh I never concerned myself with either of these formats.

    @ frolof: You need Java installed and properly set up, that means installing Java 7 or higher and setting up the environment variable for windows, linux or solaris. Sorry for the inconvenience, but I had almost all of the code ready as I've been working on a project for some weeks allready.
    Also to support "@P4ntz" statement. I specifically used the materials files to create shaders which had similar effects as "ethereal units" for example: cairn wraiths. CA use these files as a type of "shaders" or to create sub skin variations for a specific "rigid model".

    However those units which were looked exactly as "Ethereals" pre-wood elf patch. After the new faction, they just glitched and get "dark grey shade".

    So "materials" or ".wsmodel" files got corrupted somehow via PFM.

    Regards,
    Blaise90

  15. #15

    Default Re: DDSConverter & Texture Discussion Thread

    Just to post my 2 cents... I worked with P4ntz on this... and I confirm as well that "material files" are somehow breaking... with PFM. If you create a blank mod... and import a vanilla material file... and test it... you get crazy results in game. So def problem with PFM. Would love to see this fixed so we can get back to modding

    As for the program you created... any chance of it getting a UI ? I'm dumb and suck at anything CMD lol

  16. #16

    Default Re: DDSConverter & Texture Discussion Thread

    Quote Originally Posted by frolof View Post
    Ok seems like I figured out how to use this. How is this going to change the compression so it works in the game? It seems like it only changes the new texture files back to it's original state. Like I said I compress my textures to BC3/DXT5 but it still doesn't work.

    I tested the files in game now and it doesnt work like I predicted it. What am I doing wrong?
    After running the converter can you get those textures to display properly without compressing them?

  17. #17

    Default Re: DDSConverter & Texture Discussion Thread

    Hey Guys,


    I had my brother in law "who programs for a triple A video game company" edit the source code for the Intel Texture Works Plugin, so it now reads the Alpha channel for BC1 dds textures.
    There's an issue with the compressor used... what this means is if you save the file format as a BC1 "same as original" it will not include the Alpha channel... This is just the compressor used in ITW. My brother in law said if he has spare time he'll re-work it... so we can save in BC1 file formats that include the Alpha channel. In the mean time, we can now at least OPEN the BC1 file format and have the Alpha channel included... then save as a BC3 file format (what CA was using before).
    Turns out the BC1 file format is way more efficient... but the Alpha channel information isn't as high quality (easiest way to explain).... so it makes sense CA wanted to do the change, to increase the efficiency.

    Here's the link to the plugin... just replace the existing ITW Plugin you have installed. (Note, 32bit and 64bit included).
    http://www.mediafire.com/file/lk9d7l...TW-AlphaBC1.7z

    Merry Christmas !! This is my gift to the modding community !!!
    Cheers,
    Kelstr

  18. #18
    Gengi87's Avatar Libertus
    Join Date
    Sep 2013
    Location
    Florence, Italy
    Posts
    52

    Default Re: DDSConverter & Texture Discussion Thread

    Quote Originally Posted by kelstr View Post
    Hey Guys,


    I had my brother in law "who programs for a triple A video game company" edit the source code for the Intel Texture Works Plugin, so it now reads the Alpha channel for BC1 dds textures.
    There's an issue with the compressor used... what this means is if you save the file format as a BC1 "same as original" it will not include the Alpha channel... This is just the compressor used in ITW. My brother in law said if he has spare time he'll re-work it... so we can save in BC1 file formats that include the Alpha channel. In the mean time, we can now at least OPEN the BC1 file format and have the Alpha channel included... then save as a BC3 file format (what CA was using before).
    Turns out the BC1 file format is way more efficient... but the Alpha channel information isn't as high quality (easiest way to explain).... so it makes sense CA wanted to do the change, to increase the efficiency.

    Here's the link to the plugin... just replace the existing ITW Plugin you have installed. (Note, 32bit and 64bit included).
    http://www.mediafire.com/file/lk9d7l...TW-AlphaBC1.7z

    Merry Christmas !! This is my gift to the modding community !!!
    Cheers,
    Kelstr
    WOW!! Nice Christmas gift!! I will try it tomorrow, anyway could this new ITW fix the ws model issue?

  19. #19

    Default Re: DDSConverter & Texture Discussion Thread

    for solve problem just use rigid instead wsmodels. I used them for create a color variation for eagles and horses of elfs and both work. Using ws model instead give the glich prob lem

  20. #20

    Default Re: DDSConverter & Texture Discussion Thread

    Quote Originally Posted by adclaw View Post
    for solve problem just use rigid instead wsmodels. I used them for create a color variation for eagles and horses of elfs and both work. Using ws model instead give the glich prob lem
    That's not an option though if you're making new units and don't want to affect what the base game units look like. Unless I'm thinking about this the wrong way.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •