matyalatte / Blender-DDS-Addon

Blender addon to import and export dds textures
MIT License
67 stars 5 forks source link

Support for TEXCOMP_8BIT and TEXCOMP_8BIT16 codec? #27

Open jaigitrep159 opened 3 months ago

jaigitrep159 commented 3 months ago

Hi there. I'm trying to import the BMW M3 GTR Vinyl Texture from NFS Most Wanted (2005) to Blender using your DDS addon, it gives me result:

(Left: Original, Right: DDS imported using Blender DDS Addon)

image

It's in the wrong colors. It caused by the codec (the codec thinks it's "B8G8R8A8_UNORM"). Do you think you can support TEXCOMP_8BIT according to MaxHwoy's NFS Binary (that i use for extraction and replace textures)?

image

Thanks. Also using the latest version.

Files.zip here are the files provided from Binary's extraction

matyalatte commented 3 months ago

It's in the wrong colors.

Because your format does not specify whether it uses RGBA or BGRA. It depends on the game. You can get the original texture if you swap the red and blue channels.

Do you think you can support TEXCOMP_8BIT according to MaxHwoy's NFS Binary (that i use for extraction and replace textures)?

Unfortunately not. It's too old of a format. My DDS addon uses texconv to export DDS files, but it mainly supports newer formats than DirectX9. You could ask the developer of texconv to add support for the 8-bit palette, but I'm not sure if they would work on it.