Jump to content

DDS and Alpha Channel.


Hatonastick

Recommended Posts

Hi, firstly I have checked via Google, plus poked about on the forum without much luck in finding an answer to this one. So hopefully I don't upset anyone by asking here. Anyway, here goes...

Is there anyway at this point in time to load a DDS file with alpha set to something other than 100%, alter the alpha channel, and save it back out again?

My situation is this. I'm currently working on a module for a game called Mount and Blade Warband and have created quite a few textures using Paint.net and never had any issues previously with any textures I've created and saved as DDS. However recently I found a texture file that I need to replace with my own version which has it's alpha channel set to something other than 100%. It's used to blend with another texture to give an aged appearance to hair.

Now this texture when loaded into Paint.net appears as a mostly transparent texture, which I cannot make any darker using the layer transparency slider which is set to maximum. ie. The texture is loaded and displayed with transparency on, but the layer transparency slider in Paint.net is set at maximum opacity as if there is no transparency -- so the only thing I can do is make it even more transparent rather than make it darker. So when I tried to make my replacement for this particular file I created my texture, set transparency for the layer to about 20%, then saved as a DDS file -- however when I load it into the BRF game editor it displays as a completely black texture, while the original file displays fine.

Hopefully I'm making sense. If not I'll attempt to clarify.

EDIT: Also does it actually create mipmaps when you ask it to when saving? I just noticed that my textures don't seem to have them.

I should point out that while I'm very experienced with programming, 2D etc. I'm pretty new to 3D programming (not that I'm doing so on this project of course -- thought it might be easier working out how to create 3D objects while using someone elses engine to start with) and 3D object creation -- so things like DDS texture formats still create a lot of head scratching. boltbait.big_smile.png

Edited by Hatonastick
Link to comment
Share on other sites

Sure. This isn't my file of course, but the one the game uses and the one I want to replicate and replace. I think that's the one you are asking me for. In any case, this is it (can't add as attachment as even zipped it's a little too big):

DDS file with Alpha.

Edited by Hatonastick
Link to comment
Share on other sites

Here's a variant of the file with altered opacity, no mip maps.

See if it looks OK in the game.

Don't open and save it in Paint.NET before looking at it in the game environment.

http://s000.tinyuplo...318944109653368

Yup, that looks fine in game. Does exactly what it's meant to.

Edit: I did finally work out how to save my file with the required level of alpha and with mipmaps. Basically I just changed the alpha using the layer properties, saved as DDS DXT5 with "weight by alpha" and "generate mip maps" ticked.

However I still need a way to edit DDS files that have alpha set when loaded into Paint.net. ie. being able to do something other than just increase their level of transparency would be nice. boltbait.smile.png If this is due to a limitation of Paint.net and that the author would have to add the feature, don't worry about it. I'm sure he has enough on his plate already. I'm only asking in case there is something already in Paint.net that I've missed, or a plugin in that would do the job.

Thanks.

Edited by Hatonastick
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...