net-lisias-ksp / KAX

Kerbal Aircraft Expansion - KAX /L
http://ksp.lisias.net/add-ons/KAX
Other
4 stars 3 forks source link

There're DXT3 textures on the distribution (errata: on the fillesystem - errata's errata: is really on the distribution), but KSP likes DXT1 and DXT5 only #18

Closed Lisias closed 2 months ago

Lisias commented 2 months ago

Fellow Kerbonaut Nophallus reported on Forum:

I am having a issue with the propellers turning black when fully spooled.

Welp, it seems to have fixed itself after I installed another mod (OPT).

I had restarted the game few time and they were still turning into black discs, then I installed that other parts mod and now they look fine.

MODLIST

KSP: 1.12.5 (Win64) - Unity: 2019.4.18f1 - OS: Windows 10  (10.0.0) 64bit
ClickThroughBlocker - 2.1.10.21
Harmony - 2.2.1
Toolbar - 1.8.1.1
ToolbarControl - 0.1.9.11
AIES_Patches - 0.0.1.3
ASET Consolidated Agency - 2.0.2
ASET Consolidated Props Pack - 2.0.7
Astronomer's Visual Pack - 4.1.3
B9 Aerospace Procedural Wings - 0.45.1
BetterTimeWarpContinued - 2.3.13
Chatterer - 0.9.99.2788
Contract Configurator - 2.9.2
DE_IVAExtension - 1.2
Distant Object Enhancement (DOE) /L - 2.1.1.16
Environmental Visual Enhancements - Redux - 1.11.7.2
Firespitter - 7.17
ForScience - 1.6
FreeIva - 0.2.18.4
RasterPropMonitor - 0.31.13.4
KAX - Kerbal Aircraft Expansion /L - 2.8.1
Kerbal Engineer Redux - 1.1.9
Kopernicus - 1.12.1.206
AdvancedFlyByWire - 1.8.4.1
KSP-AVC Plugin - 1.4.1.9
KSPCommunityFixes - 1.35.2
ModularFlightIntegrator - 1.2.10
Docking Port Alignment Indicator - 6.10
PlanetShine - 0.2.6.6
Procedural Parts - 2.5.9
ReStock - 1.4.5
ReStockPlus - 1.4.5
Shabby - 0.3
ButtonManager - 1.0.1.1
SpaceTuxLibrary - 0.0.8.6
VesselModuleSave - 1.0.1.2
Alternate Resource Panel - 2.11
TexturesUnlimitedFX - 1.0.7.1
VesselViewerContinued - 0.8.9
Waterfall - 0.9
WaterfallRestock - 0.2.3
Waypoint Manager - 2.8.4.2
[x] Science! - 6.0.2 

Evidences

Lisias commented 2 months ago

Hypothesis

Lisias commented 2 months ago

From the user's log, I found:

[LOG 19:46:41.480] Load DDS texture: KAX/Parts/KAX_radialProp/radialPropBlu
[WRN 19:46:41.480] LOAD FAILED : DDS: The 'DXT3' format isn't supported, use DXT1 for RGB textures or DXT5 for RGBA textures
[WRN 19:46:41.487] Duplicate PNG texture 'KAX/Parts/KAX_radialProp/radialPropBlu' with extension 'png' won't be loaded
[LOG 19:46:41.498] Load DDS texture: KAX/Parts/KAX_radialProp/radialPropChk
[WRN 19:46:41.498] LOAD FAILED : DDS: The 'DXT3' format isn't supported, use DXT1 for RGB textures or DXT5 for RGBA textures
[WRN 19:46:41.506] Duplicate PNG texture 'KAX/Parts/KAX_radialProp/radialPropChk' with extension 'png' won't be loaded
[LOG 19:46:41.517] Load DDS texture: KAX/Parts/KAX_radialProp/radialPropRed
[WRN 19:46:41.517] LOAD FAILED : DDS: The 'DXT3' format isn't supported, use DXT1 for RGB textures or DXT5 for RGBA textures
[WRN 19:46:41.523] Duplicate PNG texture 'KAX/Parts/KAX_radialProp/radialPropRed' with extension 'png' won't be loaded

But I didn't found anything like that on the logs I get from my test beds. Absolutely weird...

Lisias commented 2 months ago

Yep, mine is working fine:

[LOG 03:06:27.111] Load(Texture): KAX/Parts/KAX_radialProp/radialPropBlack
[LOG 03:06:27.678] Load(Texture): KAX/Parts/KAX_radialProp/radialPropBlu
[LOG 03:06:27.841] Load(Texture): KAX/Parts/KAX_radialProp/radialPropChk
[LOG 03:06:27.997] Load(Texture): KAX/Parts/KAX_radialProp/radialPropRed
[LOG 03:06:28.159] Load(Texture): KAX/Parts/KAX_radialProp/radialProp_NRM
[LOG 03:06:28.535] Load(Texture): KAX/Parts/KAX_radialProp/radialProp_txr
Lisias commented 2 months ago

Hummm... WAIT!

I found PNG and DDS for some textures on the KAX 2.8.1.0 distribution package!

I removed the PNG files, leaving the DDS. But still they loaded fine again. So I'm not the source of the borkage.

Lisias commented 2 months ago

Oukey, there's no other explanation. Something converted the KAX's DDS's to DXT3, or perhaps converted the PNG files into DXT3 instead of DXT1 - this issue is completely unrelated to KAX.

Yes, there's another explanation - I borked the second test without being aware.

Lisias commented 2 months ago

The duplicated textures are already fixed on the DEV branch, so this is something that was already tackled down.

Found the commit: https://github.com/net-lisias-ksp/KAX/commit/7fbbafe9b4325e93e00dc699c5a4ab66f869c1e5

Lisias commented 2 months ago

Hummm.... KSPCF is installed, and I know it optimizes the textures for quicker loading... It worth a try.

Lisias commented 2 months ago

YES, IT WAS KSPCF!!!

Found this on my KSP.log from my KSPCF test bed:

[LOG 03:25:45.116] Load DDS texture: KAX/Parts/KAX_radialProp/radialPropBlu
[WRN 03:25:45.117] LOAD FAILED : DDS: The 'DXT3' format isn't supported, use DXT1 for RGB textures or DXT5 for RGBA textures
[WRN 03:25:45.117] Duplicate PNG texture 'KAX/Parts/KAX_radialProp/radialPropBlu' with extension 'png' won't be loaded
[LOG 03:25:45.144] Load DDS texture: KAX/Parts/KAX_radialProp/radialPropChk
[WRN 03:25:45.144] LOAD FAILED : DDS: The 'DXT3' format isn't supported, use DXT1 for RGB textures or DXT5 for RGBA textures
[WRN 03:25:45.217] Duplicate PNG texture 'KAX/Parts/KAX_radialProp/radialPropChk' with extension 'png' won't be loaded
[LOG 03:25:45.469] Load DDS texture: KAX/Parts/KAX_radialProp/radialPropRed
[WRN 03:26:24.211] LOAD FAILED : DDS: The 'DXT3' format isn't supported, use DXT1 for RGB textures or DXT5 for RGBA textures
[LOG 03:26:24.439] [ModuleManager] INFO: Loading Physics.cfg
[WRN 03:26:24.447] Duplicate PNG texture 'KAX/Parts/KAX_radialProp/radialPropRed' with extension 'png' won't be loaded

KSP.log

Lisias commented 2 months ago

So, this is what's happening:

Next KAX release will not have duplicated textures, so I hope this problem will not be triggered again by KAX - but KSPCF clearly have a bug, and they should not be overwritting 3rd party assets!

Lisias commented 2 months ago

Closing this so.

Lisias commented 2 months ago

WRONG

I indeed shoved DXT3 DDSs in the distribution.

Lisias commented 2 months ago

This is a bug, being masked silently by how KSP (stock) load things. KSPCF was the messenger that I ended up shooting by mistake.

Lisias commented 2 months ago

Fixed on commit https://github.com/net-lisias-ksp/KAX/commit/9d9c10b1f0c793cc409f7fff82947ea49be432d0.

Lisias commented 2 months ago

On a (hopefully) final note, thanks for the KSPCF guys for (properly) diagnosing the problem, and my apologies for shooting the messenger.

On the bright side, a change request on KSPCF were create to prevent further mishaps like this one.