Hey folks,
I'm struggling with creating custom textures that have transparent portions. Way back in the day I was able to do this, but now I'm having no such luck. For my new map, I'm using the ice palette and have the tried the following colors to serve as the transparent color:
R:120, G:88, B:128 - A flavor of purple (this is what I remember from forever ago)
R:231, G:231, B:231 - An off-white, and supposedly the transparency color for the ice palette
So far, neither of these have worked. I import the texture into DLE and no dice; the "transparent" color is opaque. Heck, even if I export a default texture with transparency (like, say, a light) using DLE and immediately re-import it as a custom texture, the transparency effect is gone.
Also, I save my textures as 8-bit or 256-color bitmaps.
Any suggestions?
Need Help Creating Custom Textures with Transparency
Re: Need Help Creating Custom Textures with Transparency
Well, I've discovered a few things:
- The transparent color for the Ice palette appears to be: R:228, G:228, B:228 (a light gray)
- Even if I use that particular RGB value in a texture and save it as an 8-bit bitmap (I'm using Paint.net), DLE seems to automatically change the color to a different, albeit similar, color upon import that causes the transparency effect to be lost.
- I have to manually use the "transparent" color in DLE's built-in texture editor, which adds a lot of needless work since it has virtually no tools or zoom.
- The transparent portions still show as opaque in DLE, but appear transparent in Descent 2 Rebirth.
- I get some really strange dark gray outlines happening at the border between transparent color and non-transparent color in Descent 2 Rebirth that aren't present in the texture as seen in DLE.
Re: Need Help Creating Custom Textures with Transparency
Use DMBII or SDLDEVIL.
Whatever I just said, I hope you understood it correctly. Understood what I meant, I mean.
#AllLivesMatter
#AllLivesMatter
Re: Need Help Creating Custom Textures with Transparency
I have a feeling DLE is doing this because the bitmap palette isn't an exact match, so it's not sure exactly what color is supposed to be transparent, so it assumes all the colors are not supposed to be transparent. Does Paint.NET allow you to copy the palette from an existing bitmap (exported from DLE using ice.pig) to the new bitmap? That should work.
Whether or not it does, though, I need to rethink this workflow... having people accidentally putting transparent pixels in textures is bad, but so is making it a pain in the ass to figure out how to get them in there intentionally. Maybe a prompt is called for.
Whether or not it does, though, I need to rethink this workflow... having people accidentally putting transparent pixels in textures is bad, but so is making it a pain in the ass to figure out how to get them in there intentionally. Maybe a prompt is called for.
Re: Need Help Creating Custom Textures with Transparency
Paint.NET does not appear to allow me to extract a color palette from a bitmap; at least, not out of the box. I've already tried exporting a transparent bitmap from DLE and sampling the transparent color (resulting in R:228, G:228, B:228), but this didn't seem to work when used in DLE.Sirius wrote:I have a feeling DLE is doing this because the bitmap palette isn't an exact match, so it's not sure exactly what color is supposed to be transparent, so it assumes all the colors are not supposed to be transparent. Does Paint.NET allow you to copy the palette from an existing bitmap (exported from DLE using ice.pig) to the new bitmap? That should work.
Whether or not it does, though, I need to rethink this workflow... having people accidentally putting transparent pixels in textures is bad, but so is making it a pain in the ass to figure out how to get them in there intentionally. Maybe a prompt is called for.
Perhaps, when editing a bitmap in DLE, let the user click a "Select Transparent Color" button and click somewhere on the displayed bitmap. Whatever color is selected is converted to the transparency color. Just be sure to let users clear it and set things back to opaque if desired.