You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just wanted to say that this is a great tool, and I used it extensively during the recent 20th anniversary contest.
Unfortunately, I noticed an issue with the mipmap generation for the self-illumination textures (BC3, ending in "_I"). In TM2020, the self-illumination alpha channel value of zero encodes to brake lights, however the color information in fully transparent regions doesn't seem to exist in lower-level mipmaps generated by this tool. Practically, this means that when exporting the default game illumination file for car details, the brake meter on the front wheels is missing unless the camera is really close to the car.
Example file with consistent RGB rows and horizontally varied alpha value:
First mipmap generated by GIMP BC3 .dds export (expected):
First mipmap generated by this tool:
I believe this is due to using premultiplied alpha for all mipmap generation, which can destroy RGB data for pixels with an alpha of zero. NVTT's sample code recommends avoiding premultiplication for textures where the alpha channel represents non-transparency material data. Because you're already using file suffixes to automatically determine the compression type, it seems like you could also use this to disable premultiplied alpha when mipmapping illumination textures.
I need C++ practice and I'd love to implement this change myself if you think it's appropriate!
The text was updated successfully, but these errors were encountered:
Just wanted to say that this is a great tool, and I used it extensively during the recent 20th anniversary contest.
Unfortunately, I noticed an issue with the mipmap generation for the self-illumination textures (BC3, ending in "_I"). In TM2020, the self-illumination alpha channel value of zero encodes to brake lights, however the color information in fully transparent regions doesn't seem to exist in lower-level mipmaps generated by this tool. Practically, this means that when exporting the default game illumination file for car details, the brake meter on the front wheels is missing unless the camera is really close to the car.
Example file with consistent RGB rows and horizontally varied alpha value:
First mipmap generated by GIMP BC3 .dds export (expected):
First mipmap generated by this tool:
I believe this is due to using premultiplied alpha for all mipmap generation, which can destroy RGB data for pixels with an alpha of zero. NVTT's sample code recommends avoiding premultiplication for textures where the alpha channel represents non-transparency material data. Because you're already using file suffixes to automatically determine the compression type, it seems like you could also use this to disable premultiplied alpha when mipmapping illumination textures.
I need C++ practice and I'd love to implement this change myself if you think it's appropriate!
The text was updated successfully, but these errors were encountered: