Need Help Creating Custom Textures with Transparency

For Descent, Descent II and Descent3 level editing and modification assistance.
Post Reply
Najarati
DBB Ace
DBB Ace
Posts: 25
Joined: Mon Aug 15, 2016 1:27 am

Need Help Creating Custom Textures with Transparency

Post by Najarati » Sat Jun 03, 2017 4:28 pm

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?
Najarati
DBB Ace
DBB Ace
Posts: 25
Joined: Mon Aug 15, 2016 1:27 am

Re: Need Help Creating Custom Textures with Transparency

Post by Najarati » Sat Jun 03, 2017 7:11 pm

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.
All of that said, I've managed to achieve transparency, but there are some odd behaviors:
  • 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.
All in all, creating custom, transparent textures seems excessively tedious. I don't remember it being so painful, but it's been decades.
User avatar
LightWolf
DBB Captain
DBB Captain
Posts: 505
Joined: Sat Mar 09, 2013 2:27 pm
Location: Kingdom of God

Re: Need Help Creating Custom Textures with Transparency

Post by LightWolf » Sun Jun 04, 2017 2:49 pm

Use DMBII or SDLDEVIL.
Your friendly neighborhood diamond-loving light wolf.
(Who wouldn't love diamonds? They're so strong! Ever wonder why Diamond Claws did so much damage?)
Substance: 5/30 (6/35) Click here!
New Age Mod: Now hiring! Click here!
User avatar
Sirius
DBB Master
DBB Master
Posts: 5434
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Re: Need Help Creating Custom Textures with Transparency

Post by Sirius » Mon Jun 05, 2017 10:52 pm

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.
Najarati
DBB Ace
DBB Ace
Posts: 25
Joined: Mon Aug 15, 2016 1:27 am

Re: Need Help Creating Custom Textures with Transparency

Post by Najarati » Thu Jun 08, 2017 10:39 pm

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.
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.

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.
Post Reply