Thanks again for your help. So I tried a few things with that function but I seem to be misunderstanding something because the only thing I was able to get to work correctly was making it return the same texture I passed to it, which still has the pixels that are supposed to be translucent being rendered as opaque. Here is what I tried:
#how I'm loading my texture (same as my code from my first post):
mat = NoeMaterial(matName, diffuseTexName)
tex = rapi.loadExternalTex(diffuseTexFile)
tex.name = diffuseTexName
#New code attempting to add transparency:
texData = rapi.imageDecodeRaw(tex.pixelData, tex.width, tex.height, "r8 g8 b8 a8") #returns exact same image, transparencies not working
tex.pixelData = texData
I'm not sure if the parameters I'm passing to imageDecodeRaw are the ones it wants. Giving it the string "r8 g8 b8 a8"
was the only one that returned an image that didn't look corrupted. I tried this on a texture from a random model of the game I'm working on. This texture file is a .dds of type DXT1, which to the best of my knowledge contains the normal map in the channels Red and Green, and the Blue channel seems to contain the alpha mask
texture. So for this I attempted to make the Blue channel be read as the alpha channel by using the string "r8 g8 a8 p8"
, but the result of this is a corrupted-looking texture in Noesis, and the areas that should be transparent are still opaque. I lack the experience of working with textures/materials to understand what I might be doing wrong, but if I had to guess, I would say I may be passing the wrong parameters to imageDecodeRaw?
If it helps, the game I'm working on is DragonaEU, the game can be downloaded for free legally so I guess there's no problem linking to the download page in this forum: http://dragonaeu.flamegames.hu/?page=download