[MODKIT Issue] Cooking diffuse texture misses alpha – RED support welcome :)

+
[MODKIT Issue] Cooking diffuse texture misses alpha – RED support welcome :)

Hey everyone,

So, I’m having a rather big issue with importing and then cooking & packing a simple diffuse texture using the newest version of ModKit.
The specific texture I’m using atm can be found at “Uncooked\fx\textures\smoke\smoke_03.xbm” and is a simple diffuse texture for which there exist no additional normal map or specular map.

Whenever I export to .tga, then import to .xbm and then cook and pack this original, completely unaltered texture, it seems to lose its alpha channel.
Please have a look at the following two short videos:


  1. Unmodded game, using original texture: [video]https://streamable.com/f9un[/video]
  2. Original, unaltered texture after exporting to .tga, importing to xbm and cooking and packing: [video]https://streamable.com/pysz[/video]

Also when comparing my imported .xbm with the original .xbm in the folder “…Uncooked\fx\textures\smoke\smoke_03.xbm” my imported one is almost 3,5 times the size of the “original .xbm” (1196 kB vs 344 kB).
This difference is further confirmed when comparing both .xbm files in the unofficial Mod Editor by fellow community member Sarcen (http://forums.cdprojektred.com/threads/58546-Mod-editor)




The "original .xbm" from the game's "Uncooked" folder is on the left and the one I imported from .tga to .xbm is on the right. Again the .tga has never been modified and not even been opened in any image processing software.
The most striking differences are certainly:


  1. My imported .xbm has a value of "compression = TCM_DXTNoAlpha" vs the original ""compression = TCM_DXTAlpha"" -> seems to confirm missing alpha info
  2. And "textureGroup = WorldDiffuse" for my imported .xbm, while for the original it is "textureGroup = Particles" which makes much more sense, as this is actually a texture for a particle effect.
  3. Furthermore there's the additional reference to a "CSourceTexture" which does not exist (?) for the "original .xbm"

Also here are the steps in detail to reproduce this behavior using the most recent version of ModKit:

  1. Export “Uncooked\fx\textures\smoke\smoke_03.xbm” to “…\MyMods\Smoke\Raw\smoke_03.tga”
  2. Import “…\MyMods\Smoke\Raw\smoke_03.tga” to “…MyMods\Smoke\Uncooked\fx\textures\smoke_03.x bm”
  3. Cook and pack
    1. Cook “…MyMods\Smoke\Uncooked\” to “…MyMods\Smoke\Cooked\” -> cook.db
    2. Buildcache textures using cook.db to “…MyMods\Smoke\Packed\modSmoke\content” -> texture.cache
    3. Pack from “…MyMods\Smoke\Cooked\” to “…MyMods\Smoke\Packed\modSmoke\content”
    4. Metadatabase store to “…MyMods\Smoke\Packed\modSmoke\content”

I’m really sort of lost now that even an unaltered, original texture poses such problems.
Could anyone provide me some assistance on this topic? Maybe (and hopefully) I just missed something and thus I would gladly take any advice.

Vinthir , you proved to be extremely helpful on mod related problems in the past. Do you have any ideas or thoughts about this?
Benzenzimmern , as a former modder and experienced in skybox assets for The Witcher 2 (loved your tutorial videos ;)), might you be able to help?
Marcin Momot , as being the community’s primary contact could you ask around?
Jose Teixeira, (sorry I don’t know your forum account name), you are one of the leading experts on particle development in The Witcher 3, if I’m not mistaken? Could you probably have any hints?

Obviously, if any of our fellow modders here have come across (and maybe solved?) a similar problem, I’d be glad for any advice. Maybe you, HalkHoganPL ? :)

Also, is there any additional info I could provide? Like, for example, my batch files, both .xbm files? (if it’s fine with legal regulations/copyright?) or ModKit logs? Anything else, that might help us in tracking down the root cause?

Finally, a question for our mods: Should I file a support ticket including all of this (and probably more?) info? If so, could you kindly provide me with a link/email address?

Thank you all for taking your time to read through all of this and I really hope we can solve this together! :)
 

Attachments

  • Modeditor.png
    Modeditor.png
    47.1 KB · Views: 36
Last edited:
Hey, I'll try to check it out tomorrow but from what I see on the two videos, it doesn't look like you lose the alpha channel completely, but it's not a soft alpha. I had that issue when I saved the texture in a different format. But it's been two years since I did that, so I am a little rusty on the subject.
Just in case we're not able to find a solution, please also write a mail to our support. They know much more about how our W3 modkit works than I do! :)
 
Hey, I'll try to check it out tomorrow but from what I see on the two videos, it doesn't look like you lose the alpha channel completely, but it's not a soft alpha. I had that issue when I saved the texture in a different format. But it's been two years since I did that, so I am a little rusty on the subject.
Just in case we're not able to find a solution, please also write a mail to our support. They know much more about how our W3 modkit works than I do! :)

Thank you so much for answering and you trying to look into this :)
I will gather everything together and write a mail to your support colleagues tomorrow.
 
Quick Update

So, as @Benzenzimmern suggested that not the entire alpha info is missing but rather soft alpha is not applied, I tried two more things yesterday:


  1. Particle effects have instance parameters soft_alpha/soft_transperency_value (depending on material). So I tried to modify these values to see if it has some positive influence. However, sadly, the change was pretty much negligible, if present at all. I remember that the influence on original textures, such as clouds, was also rather minor. In any case this did not improve the situation.
  2. I read somewhere during my research about a case where missing /corrupted alpha info was caused by the very low and high values in the alpha channel. Thus using curves, I remapped alpha info from original range 0-255 to 35-210, and during a second test, to 5-220. Both tests however failed in showing any indication of soft alpha at all.

So, unfortunately, there's no progress, but I thought I'd still share my thoughts. Maybe they trigger some further ideas :)
 
Top Bottom