1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

DX11 texture converter

Discussion in 'Modding' started by Drui, May 22, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Drui

    Drui Keen Update Guy Staff

    Messages:
    1,415
    Dear engineers, we are excited to announce that DX11 version of Space Engineers is closing in. We just released a MODSDK update, where you can find the texture converter to prepare your mods for the DX11 update.
    It should be available at SpaceEngineersModSDK\Tools\Space texture converter\

    You can also use this Medieval Engineers modding guide for DX11 textures: https://steamcommunity.com/sharedfiles/filedetails/?id=395248715

    In case you need more help than the included readme file, please post your questions here - we will try to help you through this transition as much as we can.
     
    Last edited by a moderator: May 22, 2015
    • Like Like x 2
  2. Digi

    Digi Senior Engineer

    Messages:
    2,393
    Nice, DX11 ! :D
     
  3. deltaflyer4747

    deltaflyer4747 Apprentice Engineer

    Messages:
    215
    And how's KSH's repainting going on? Almost done? :)
     
  4. Inferi

    Inferi Apprentice Engineer

    Messages:
    138
    Does this mean we have to redo all our current mods textures or they will not work!?
     
  5. mexpex

    mexpex Apprentice Engineer

    Messages:
    257
    Awesome! Time to fix some textures ;D
     
  6. Eikester

    Eikester Apprentice Engineer

    Messages:
    423
    i'd like to know this too, i have hundreds of textures to redo
     
    • Like Like x 1
  7. joeblack616

    joeblack616 Apprentice Engineer

    Messages:
    225
    Hi, for dx9 all your models will work just fine like before.If you want your model to work in DX11 you need to provide new textures (just add them to xml file used during conversion, together with dx9 textures). Dx9 and Dx11 will be selectable by users, we wont force dx11.
     
    Last edited: May 23, 2015
    • Like Like x 2
  8. mexpex

    mexpex Apprentice Engineer

    Messages:
    257
    Will players that uses dx9 be able to use models that have the dx11 texture definitions? and if so, how does it work?
     
  9. Ulfsark

    Ulfsark Master Engineer

    Messages:
    3,057
    Well, this is certainly one way to filter out the dead mods. I suggest on the workshop having a tick mark to filter between dx9 and dx11.
     
    • Like Like x 4
  10. High Ground

    High Ground Apprentice Engineer

    Messages:
    324
    You know what this means, expect DX11 next week! Here's hoping!
     
  11. darth_biomech

    darth_biomech Senior Engineer

    Messages:
    1,550
    Wait, wait, so mods with unconverted textures will stop work at dx11? That sucks mighty! There must be backward comparability! (And no, "just switch back to outdated render" isn't a solution)
     
  12. Thedevistator

    Thedevistator Senior Engineer

    Messages:
    1,942
    Their is backwards compatibility
     
  13. darth_biomech

    darth_biomech Senior Engineer

    Messages:
    1,550
    I just said in my post that "if you want your old mods then don't switch to dx11" is not a solution(

    If matter is in internal byte structure of dds files, then nothing can be done, I guess, but in any other case please make old _de and _ns files work! Let it be crappy, let it look horrible, but let it work, please! I doubt that even 50% of workshop mods will be updated!
     
    Last edited: May 23, 2015
  14. TumbleTV

    TumbleTV Trainee Engineer

    Messages:
    69
    Personally, I have so many things I will have to update it will take me weeks to do it. I doubt I will even have time to convert everything. I agree with @darth_biomech Please let old textures work, even if it will look bad.
     
  15. Digi

    Digi Senior Engineer

    Messages:
    2,393
    I agree, if the model doesn't have DX11 textures, add the missing texture as blank textures internally so it doesn't look purple.
     
  16. Harag

    Harag Junior Engineer

    Messages:
    913
    Can't the shaders that render the old textures be made available under DX11 as a fallback if there are no PBR textures? Like Darth Biomech I expect this to be pretty
    disruptive to using mods. It will also produce a fair amount of "This mod no longer works, please fix it."

    On another note the ME texture guide currently says (emphasis is mine):
    I guess the "not specified" relates to the B channel only (I think G was unspecified a few weeks back and now has emissivity assigned to it).

    Also, am I right to assume that SpecularPower and SpecularIntensity are no longer used with Physically Based Rendering?

    And... oh crap, I need to think about how to support this with my Blender addon :D
     
    Last edited: May 24, 2015
  17. Harag

    Harag Junior Engineer

    Messages:
    913
    Ok, I tried the converter. It's not just meant to create .dds textures from .tga, .tif, .jpg or .png images it's also able to convert de|me/ns textures into cm/ng/add textures.
    • The albedo map is nearly identical to the diffuse map but seems to receive some image processing
    • The metalness channel seems to be always black (which is why the _cm.dds looks like it's empty)
    • The normal map is copied verbatim. EDIT: Is this the right thing to do? The ME texture guide specifically mentions: "DX11 uses a different green channel than DX9", i.e. OpenGL normal maps.
    • The glossiness channel is calculated from the specularity channel but looks much brighter. I guess this is due to different value scaling used in the PBR shaders. SpecularIntensity and SpecularPower seem not to be taken into consideration because I had no .xml files in my conversion source folder.
    • The color mask channel is calculated from the 115-140 value range of the alpha channel of me textures.
    • It seems the emissivity channel is not converted, yet. I get no green color when I convert me/de textures that have some black in their alpha channel.
    • The ambient occlusion channel is fully red, i.e. no additional AO.
    I had to set COMPRESS = 'Dx9' in dx9to11.py. Otherwise I was not able to open the resulting .dds files in Gimp.

    Sadly, TextureBuilder.exe has no command-line usage information at all.

    There's also a Pyhton script update_xmls.py that looks like it can add cm/ng/add entries to parameter.xml files for MwmBuilder. The textures already in the .xml file need to follow the me/de/ns naming scheme for that to work.
     
    Last edited: May 24, 2015
  18. Harag

    Harag Junior Engineer

    Messages:
    913
    I'm wondering if converting all the textures offline is the best approach to this? We are more than doubling the size of our mods without any immediate visual gain.

    Im also wondering if it would be easy to provide us with a converter that does the opposite: converting from PBR/DX11 textures to DX9 textures. I have to admit I'm not looking forward to create good looking PBR textures and then to repeat that work to produce less good looking DX9 textures.

    EDIT: And to rephrase Darth Biomechs question: What will happen if a mod is loaded that has blocks where textures for the current renderer are undefined?
     
    Last edited: May 26, 2015
  19. TumbleTV

    TumbleTV Trainee Engineer

    Messages:
    69
    I have ran the xml converter multiple times, for me it's only converting the first set of material. Anyone else get this or is it intended? Say you have 6 materials in your xml, and it only converts the first, that has to be wrong, correct?
     
  20. Harag

    Harag Junior Engineer

    Messages:
    913
    Funny, you are right. There's no loop in the script that could handle more than one material.
     
  21. Geneticus

    Geneticus Senior Engineer

    Messages:
    1,618
    I assume not all textures need converted. Icons and UI elements will stay dx9?
     
  22. Harag

    Harag Junior Engineer

    Messages:
    913
    Hm, the ME texture guide doesn't have to say anything about transparent/glass textures.
    Do those work like before? I guess not because they used the DX9 textures.
    Is this were the AlphaMask texture comes into play? From the description "cut-off alpha" I guess not.
     
  23. Harag

    Harag Junior Engineer

    Messages:
    913
    I have two additional questions:
    • What format is the _alphamask.dds texture in? Just one greyscale-channel? If it is, which .dds compression format are we supposed to use for this? If it isn't, which channel is the alphamask supposed to be in?
    • Are the <Parameter name="DiffuseColorX|Y|Z"> still used with DX11 textures? (I already asked about SpecularIntensity and SpecularPower)
     
  24. Geneticus

    Geneticus Senior Engineer

    Messages:
    1,618
    Are the Textures for DX11 the same in ME and SE now? I ran the conversion on all of my Asteroid materials and tried to load one into ME for grins, but it was black like it was missing. I suppose custom voxels may not be implemented in ME yet and that's why they are black?

    Also I'm assuming we need to rebuild all models with the new textures. Is that correct?
    I'm really not looking forward to that since MWMbuilder only wants to cooperate 30% of the time.
     
  25. EctoSage

    EctoSage Trainee Engineer

    Messages:
    82
    Got my models updated following the readme . . . except they appear to be about 1/100th of their normal size now. . . .

    Edit: Tried turning rescale to true, no change, change the scale number to 1.00 instead of 0.01 no change. Will try doing both a the same time next.... but that will have to be later, have to do something now. Very odd seeing my workdesk be the size of ones pinky finger.
     
    Last edited: May 26, 2015
  26. Geneticus

    Geneticus Senior Engineer

    Messages:
    1,618
    I noticed that Maya rescales models down further and further each time you open and re-export from the Same FBX chain. Some of mine need 1000x scaling now to be normal size. I wish they would have given us mwmbuilder as source so we could get it working properly...
     
  27. darth_biomech

    darth_biomech Senior Engineer

    Messages:
    1,550
    Maybe it's Maya's exporter problem, and not MVMbuilder's?
     
  28. jakub.tyrcha

    jakub.tyrcha Trainee Engineer

    Messages:
    1
    -Albedo is converted to srgb. We have no good way -to generate metalness so it stays black for generated textures.
    -Normalmap conversion looks like a bug, we will try to fix that asap.
    -Glossiness is transformed so it matches better brdf we use in dx11 renderer.
    -Emissive should generate correctly, it converted fine textures we use for dx9.
    -We don't bake ao for textures automaticaly (that is why it stays white).
    -Alphamask use grey channel for alpha cutting. Compression is ignored for that texture.

    Compression 'Dx11' uses bc7 format. Sadly many tools don't work well with that.
     
  29. darth_biomech

    darth_biomech Senior Engineer

    Messages:
    1,550
    Two questions please
    a) does it neccessary to change and\or define textures in the xml and recompile the models? Or it would be enough to just put dx11 textures in the same folder with the same name? if recompiling is neccessary, would it be enough to instead this
    Code:
        <Parameter Name="DiffuseTexture">Textures\Models\Cubes\large_thrust_large_de.dds</Parameter>
        <Parameter Name="NormalTexture">Textures\Models\Cubes\large_thrust_large_ns.dds</Parameter>
        <Parameter Name="ColorMetalTexture">Textures\Models\Cubes\large_thrust_large_cm.dds</Parameter>
        <Parameter Name="NormalGlossTexture">Textures\Models\Cubes\large_thrust_large_ng.dds</Parameter>
        <Parameter Name="AddMapsTexture">Textures\Models\Cubes\large_thrust_large_add.dds</Parameter>
    leave only that
    Code:
        <Parameter Name="DiffuseTexture">Textures\Models\Cubes\large_thrust_large_de.dds</Parameter>
        <Parameter Name="NormalTexture" />
        <Parameter Name="ColorMetalTexture" />
        <Parameter Name="NormalGlossTexture" />
        <Parameter Name="AddMapsTexture" />
    like it was possibe to do with dx9 texture paths?
    B) it is neccessary to create them through texture converter? Or just saving directly from Photoshop into appropriate texture suffix is acceptable manual way of doing this too? Or it won't work? Why? I noticed that I cannot open many of vanila dx11 textures.
     
  30. Geneticus

    Geneticus Senior Engineer

    Messages:
    1,618
    Actually I think it's the FBX Importer in Maya, that resets the scale or it could just be a general bug in 2015 that doesn't preserve user settings properly.
    My issues with mwmbuilder were a separate thought even though it didn't come out that way.(first day back to work after a 3day weekend, and its morning.)
     
Thread Status:
This last post in this thread was made more than 31 days old.