Jump to content

Photoshop DDS Compression


SonAnima

Recommended Posts

This may be a dumb question but does it matter what compression I use for making texture files? I want to make my weapon mods as Xbox friendly as possible and Im trying to figure out how to decrease the file size of my mods wherever possible while still delivering the best quality that I can.

Link to comment
Share on other sites

I don't know anything about xbox. In vanilla for PC, the texture formats are... D - nvidea dxt1 (regular normal), dxt3 (alpha channel), dxt5 (interpolated alpha channel for translucent surfaces). N,S - intel bs5 8bpp. Green channel - medium, yellow - shine, red - matte.I can also add that the N texture is inverted. Not blue, but yellow, the relief, accordingly, is also inverted.

Edited by South8028
Link to comment
Share on other sites

50 minutes ago, South8028 said:

I don't know anything about xbox. In vanilla for PC, the texture formats are... D - nvidea dxt1 (regular normal), dxt3 (alpha channel), dxt5 (interpolated alpha channel for translucent surfaces). N,S - intel bs5 8bpp. Green channel - medium, yellow - shine, red - matte.I can also add that the N texture is inverted. Not blue, but yellow, the relief, accordingly, is also inverted.

You are correct in that blue doesnt exist for the specular map. You can also change the levels of either the red or green to affect the shine of the textures. When using the Intel Texture Works plugin for Photoshop for the Compression you have BC 1, BC 3, BC 4, BC 5, BC 6, and BC7. I always use the Color Texture Type and BC7 8bpp Fine (Linear, DX 11 +) for compressing the diffuse map. 

For the Normal and Specular Map I always use the Normal Map as the texture type and use BC5_U 8bpp (Linear, Unsigned, 2 Channel) for compression

Link to comment
Share on other sites

2 hours ago, SonAnima said:

You are correct in that blue doesnt exist for the specular map. You can also change the levels of either the red or green to affect the shine of the textures. When using the Intel Texture Works plugin for Photoshop for the Compression you have BC 1, BC 3, BC 4, BC 5, BC 6, and BC7. I always use the Color Texture Type and BC7 8bpp Fine (Linear, DX 11 +) for compressing the diffuse map. 

For the Normal and Specular Map I always use the Normal Map as the texture type and use BC5_U 8bpp (Linear, Unsigned, 2 Channel) for compression

BGS didn't use the Intel format for D textures. They used Nvidea. I use the vanilla format because it weighs less than bs7 without sacrificing quality. More precisely, fo4 shaders are not able to convey the difference in quality between bs7 and dxt1. Accordingly, bs7 does not make any sense for fo4.

Link to comment
Share on other sites

4 hours ago, SonAnima said:

Good to know that the vanilla format weights less. Is there a place to get the Nvidea tool or is it located in a fallout 4 folder?

https://www.nexusmods.com/skyrim/mods/76482/

Perhaps these should do the trick. I'm using old d3d nvidea plugins from 2014. Specifically those that used bgs in fo4. I don't know where you can download them from today. If these don't work, I'll throw mine on a file hosting service.

Link to comment
Share on other sites

DDS = Direct Draw Surface

DDS is a part of DirectX, and Microsoft standard.  For conversion, Bethesda used Microsoft's texconv.exe, with Bethesda's Elric app acting as the front end.  You can find it in the Tools folder (the same  folder where Elric is located).  Elric takes the .TGA format, and converts it to DDS format of your choice.  TGA image format is used in game industry often because of its uncompressed nature, and you can see Bethesda using it as the export format from CK, for example.

The vanilla game textures are :

_d = Diffuse (+Alpha) : BC1 (no alpha), BC3 (with Alpha)

_n = Normal : BC5 (Blue channel removed)

_s = Specular (Red channel) + Gloss (Green channel) : BC5

Note that Bethesda is using the DirectX format for normal map, and not OpenGL (which is used by Blender, for example).  To convert OpenGL format to DirectX, you need to flip the Green channel.  Bethesda's Fallout 4 normal maps do not contain the Blue channel (I assume this was done for better compression when creating .ba2).

_s texture files actually contain 2 separate maps, Specular (metallic) and Gloss (smooth).  RGBA image file is better seen here as a container for 4 separate 8 bit numeric values.  Game devs often pack multiple texture data into 1 file to reduce the number of files being loaded in game.

DXT designation was depreciated in DX11, and Microsoft started using BC# then.  The old NVIDIA plugin for the 32 bit Photoshop doesn't even import the Bethesda normal maps correctly (it adds the Blue channel on import, and it appears the wrong color profile gets applied).  That plugin predates the current BC- formats, and better avoided for Fallout 4.

Anyway, in Elric, you'll find the Texture Conversion section in the middle part of the left column.  At the top, you'll see "Force Format" and here you can set the DDS format of your choice.  Check the "Generate MipMaps", and keep the "Quartering Threshold" and "BC7 Threshold" to "NONE".  "Quartering" here means it would create a smaller resolution out of a larger one (Input 4k -> Output 2k, for example).  Elric can batch convert TGA files to DDS.

As for the texture compression format, the safest bet is what Bethesda used.  For my own project, though, I've been using BC7 (d/n/s) for weapons/clothing, and vanilla formats for environment/props, as I feel that BC7 pops out more against the vanilla formats, which are noisier to my eyes.  In any case, you may want to maximize your texel density of your textures, so that if you had to lower the resolutions for consoles in the end, they will survive the conversion.  Bethesda used a lot of UV mirroring/overlapping to maximize texel density, and their assets are a great source of learning in this regard.  Reducing the number of material files loaded by combining multiple elements can be a good idea if possible (each material files will add draw calls in game).

I hope this helps.  Good luck.

Link to comment
Share on other sites

12 hours ago, DiodeLadder said:

  In any case, you may want to maximize your texel density of your textures, so that if you had to lower the resolutions for consoles in the end, they will survive the conversion.  Bethesda used a lot of UV mirroring/overlapping to maximize texel density, and their assets are a great source of learning in this regard.  Reducing the number of material files loaded by combining multiple elements can be a good idea if possible (each material files will add draw calls in game).

I hope this helps.  Good luck.

This is my first time hearing about Texel Density. Im guessing that what texel density means is that I try to fit as many uv's as possible on a single uv grid? Its good to know that Elric can downsize resolutions of the textures for me as that sounds faster than dealing with substance painter which tends to crash quite a bit.

Link to comment
Share on other sites

Texel Density is measured by how many pixels of texture you have per unit.  I was just trying to say "try maximizing the UV island sizes", so nothing fancy really.  😉

The concept of Texel Density, however, is very important when creating 3D assets.  For example, UV islands for a receiver and a buttstock should have the same texel density ideally even if they are on separate materials, so that both parts would have the same texture resolution on screen and one wouldn't be more blurry than the other.  Here's an example :

34555-1703198590-1918720360.jpeg

Here I have models with separate materials - receiver (4k texture), muzzle devices (2k), buttstock (2k), etc., in more or less the same density (not perfect, but close enough, lol).  The "color grid" image included in Blender is very handy for keeping eye on texel density.  There's a free Blender addon for matching texel densities across multiple parts, so you might want to check that out :

https://mrven.gumroad.com/l/CEIOR 

Personally, I use ZenUV addon, but it's a paid product.

https://sergeytyapkin.gumroad.com/l/zenuv4?layout=profile

ZenUV is amazing, though, and it's totally worth your money.  Take a look at their demo videos.

In first person shooters, you may want to consider how much screen real estate an asset would occupy.  For example, rear iron sight may need more polygons and higher texel density, since it may occupy a large part of your screen while aiming.  The example above doesn't have such treatment because I was already packing a lot in one map, but it's something to consider, especially if you have a zoomed-in aim-down sight.

Speaking of UV packing, this addon for Blender is really great to have :

https://glukoz.gumroad.com/l/uvpackmaster3

I have the older version, which was cheaper, though.  Looks like he raised the price.  

Anyway, I think Bethesda's 10 mm pistol heavy barrel could serve as a nice example of how to do UV mirroring, and use out of range UV coordinates for the mirrored islands.  By "mirroring" I don't mean splitting the mesh at the center in this case, since symmetric top and bottom parts would have "butterfly" look if done in such a way.  Bethesda artist mirrored the UVs only on the sides, and offset one side outside of regular UV coordinates (+1 in X axis), so that during baking normal map from high to low poly, one side would be ignored by the baker.  The UV for Eyebot is a great example as well (by using a lot of UV mirroring + overlapping, the Eyebot 2k texture pretty much has the density of 4k maps used on other assets), but in that asset it looks like the artist moved the out of bounds UV islands back to regular coordinates after baking.

About Substance Painter, I have never seen it crashing personally.  I use the Steam version from 2019.

....It's gotten kinda long, but I hope someone would find it useful.  🙂

Edited by DiodeLadder
Link to comment
Share on other sites

On 12/21/2023 at 3:58 PM, DiodeLadder said:

Texel Density is measured by how many pixels of texture you have per unit.  I was just trying to say "try maximizing the UV island sizes", so nothing fancy really.  😉

 

After looking into texel Density from what I understand how things work in game is that every time something loads up in game the material files for that mesh has to be loaded as well and the more materials that is assigned to a mesh the more draw on performance and the more space the mod file takes up? So the best bet is to pack as much as possible onto one UV grid so the game only has to look for one material and texture file and that should take up less space(hopefully). Instead of having the weapon divided into different parts like the guns in Fallout 4 I should have just one texture called "MyWeaponMod" to be referenced in game and do the same with the scopes and other attachments. Idk how much space reducing texture resolution will save up but Im thinking either 512 or 1K as with 2K textures one of my mods is already taking up 204MB which is too much for a weapon pack for xbox. Anything below 512 I want to avoid as it looks like 007 Goldeneye textures in Substance Painter which probably looks much worst in game lol

Edited by SonAnima
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...