Author Topic: KLAX Texture Size  (Read 3875 times)

Dimon

  • Sr. Member
  • ****
  • Posts: 491
KLAX Texture Size
« on: May 22, 2015, 06:10:28 pm »
I'm slowly adapting to P3D and have some questions pop up from time to time.

I'm running P3D at 1024 TML in order to afford 100% AI and normal autogen without a risk of OOM. I'm reading on various forums that DTX5 1024 are less resources hungry (VAS-terms) than DDS of the same size. Is there any scientific proof for that before I start massive conversion.

Thanks
i7-6700k@4.6Ghz, Z170 Delux, 980Ti-6GB5700, 2TB EVO850, 16GB DDR4 RAM Win7/64 PRO.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50686
    • VIRTUALI Sagl
Re: KLAX Texture Size
« Reply #1 on: May 22, 2015, 10:47:45 pm »
I'm reading on various forums that DTX5 1024 are less resources hungry (VAS-terms) than DDS of the same size. Is there any scientific proof for that before I start massive conversion.

The .DDS it's a container format, like .BMP, that can contain images in various compressed formats, like DXT1, DXT3 or DXT5. This means, you cannot say that a "DXT5" it's best/worse than a "DDS" of the same size.

A texture in the DXT5 format *will* surely be contained in a .DDS container, although in ancient times (CFS2, FS8, etc.) you could find DXT textures inside a .BMP format (hence the famous DXTBMP utility, which was used back then to support this somewhat unusual format ( DXT inside a .BMP container ).

There might be *some* memory saving and/of fps benefits by choosing between DXT1, DXT3 and DXT5, but you can't just mass convert stuff. In order to decide if a texture can be converted safely without losing its features, you must check each texture individually, following these generic guidelines:

- If a texture doesn't have an Alpha channel, it can be SAFELY converted to DXT1 (assuming it's not in that format already). This is the only case which can be probably easily detectable automatically with a software.

- If a texture has an Alpha channel that doesn't need "continuous" levels, and can work as black/white mask, it can also use DTX1, which means "1 bit for Alpha channel"

- If a texture needs more levels than just black/white, you can CHOOSE between DXT3 and DXT5. The difference between DXT3 and DXT5, is that DXT5 allocates more bits in the Alpha channel so, you want to use DXT5 if:

a) The texture has a "smooth" (gradient) Alpha mask, like an halo light.

b) The texture is a specular map or a normal map, because compression artifacts are more visible if the texture is used for speculars or normals

If you need just a generic greyscale Alpha mask with no gradients, DXT3 is fine.


Now, the memory savings.

Under DX9, using smaller-sized textures (and, in general, not wasting too much VRAM, which includes dual-monitor support, SLI, Antialiasing and very high resolutions) WILL have a measurable impact on VAS too. This because under DX9, the video drivers work in a way that a copy of the allocated VRAM is copied into the system RAM and, since this cannot be larger than 4GB for a 32 bit app, you can risk OOM under DX9 if using lots of VRAM.

This is far less of a problem under DX10, and of course DX11, which P3D uses.

I'm not saying the impact on VAS of very large texture is exactly "nil", but it's probably FAR less of an issue than it ever was under DX9 so, I wouldn't undertake a massive conversion, which will surely have side-effects if not done properly. AND, by re-compressing textures that were already compressed, the visual quality will worsen.

Now, the original question: what about FSDT KLAX ?

Don't waste your time resizing our textures. We never used 4K textures to get "Ultra" resolution. We ONLY used them for SPEED. The total amount of VRAM we require for KLAX, which has been designed with 4K textures is not very different than an earlier scenery like KDFW, which only used 1024 textures.

The whole KLAX background uses 3 full sized 4K textures and one half-size ( 4K*2K ), while KDFW has 53 1024*1024 textures. Since a single 4K texture holds the same information as 16 1K textures, the overall memory usage is not *THAT* different, and if we used 1K textures for KLAX, we would need 72 textures, compared to the 53 used in KDFW, but that's just because the scenery is more detailed, not because of the 4K textures.

So, in our case, 4K textures are used ONLY for efficiency, because all graphic engines (the more the graphic engine depends on the GPU, the more you see this effect) are faster the LESS materials and texture changes they must handle. Ideally, the fastest scenery could probably use a SINGLE 8K texture, but in real world you don't have all object sharing the same properties, so some material changes must be done anyway.

THAT'S why KLAX runs SO WELL under P3D, because the way it's done, it allows the GPU to work better.

This also means, if you *resize* an FSDT scenery that uses 4K textures, you are LOWERING the quality below what even standard FSX is supposed to look like. To continue the previous example, if you lower the KLAX textures to 2K, it would be AS IF you used KDFW at 512*512, and if you lower KLAX to 1024, it would look like KDFW at 256*256!

So, for FSDT sceneries, just don't do it.