Problems with transparent custom textures

Everything around the Descent level editor

Moderators: Frustikus, Aus-RED-5

User avatar
Enzo03
Posts: 135
Joined: Wed Apr 01, 2009 1:19 pm
Location: Private Luxury Worldship.
Contact:

Re: Problems with transparent custom textures

Postby Enzo03 » Tue Apr 17, 2012 10:20 pm

I am importing as BMP. However, the level I have tested it in uses the ice palette, where the "transparent" color is a bluish color. This is almost certainly why it does not turn transparent when imported via DLE, but there is no reason I can think of why it would behave as it does when imported through DTX2.
Some people are like Slinkies. They aren't really good or even useful for anything but they always manage to put a little smile on your face when you give them enough of a push down the stairs.
User avatar
Hawkins
Posts: 256
Joined: Wed Jan 11, 2012 1:18 pm
Location: /Universe/Milky-way/Sol/Earth/Europe/Greece/Athens/~

Re: Problems with transparent custom textures

Postby Hawkins » Tue Apr 17, 2012 10:30 pm

THe old school approach Enzo is following is done with .bmps, that necessitate the use of a specific color channel for transparency. But from what I see so far, DLE reads TGAs successfully (more than that) and editing them is easier because of the true alpha channel. And the alpha channel you get is 255 or 0, full time, unless you start doing funcy stuff in it, or us a texture that is such (D3 glasses for example) So TGA is the robust way to go, even for 64x64 on the original Descent format, because the 255 alpha value is read properly.

Oh I remembered why I made the comparison. The TGA reader does not distort colors on the editor, and much like in the game as well, from my experience. That's the main reason IMVHO against using bmps.
Gigabyte® GA-X48-DQ6
Intel® Core 2™ Quad Q6600 @2.4GHz
ATi(AMD®) Radeon™ HD4870
________________________________________________________________________
Descent Rangers
Captain of Black Lions squadron
User avatar
Enzo03
Posts: 135
Joined: Wed Apr 01, 2009 1:19 pm
Location: Private Luxury Worldship.
Contact:

Re: Problems with transparent custom textures

Postby Enzo03 » Wed Apr 18, 2012 12:55 am

Yeah but I want to just put in a texture that is 64x64 and edited as I want it to look as opposed to trying my luck with a program's resizer that may or may not preserve certain details when the image is converted to a 64x64 image. For most textures there is no problem with such resizing, but with something like letters for someone's name used as a secondary texture I want everything to be precise so I do not end up with R's that look like A's or D's that look like O's, etc.
Some people are like Slinkies. They aren't really good or even useful for anything but they always manage to put a little smile on your face when you give them enough of a push down the stairs.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Problems with transparent custom textures

Postby karx11erx » Wed Apr 18, 2012 1:05 am

Enzo03 wrote:I am importing as BMP. However, the level I have tested it in uses the ice palette, where the "transparent" color is a bluish color. This is almost certainly why it does not turn transparent when imported via DLE, but there is no reason I can think of why it would behave as it does when imported through DTX2.

You do not seem to have understood me. Descent bitmaps do not contain colors, but palette (color map) indices. The palette index decides whether the bitmap entry is interpreted as transparent, not the color it points to in the palette.

I think Pumo is right: Index 252 is the transparency key.

Hawkins,

the TGA importer can (and most likely will) change colors when mapping the 24 bit RGB values to 256 bitmap colors. Depending on the texture it may just not be obvious. DLE-XP also only does that mapping for standard Descent levels to keep the custom textures compatible.

Btw, I have worked a bit over the Aqua Cave map, which is a standard Descent map, and have added transparent overlay textures bearing text using 64x64x32 (RGBA) TGAs. I painted the text using one of the Descent fonts, and imported the TGAs in the level, where they got converted to bitmaps. Since they only have one color tone, this worked great and w/o noticable quality loss.
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Problems with transparent custom textures

Postby Alter-Fox » Wed Apr 18, 2012 1:46 am

Enzo03 wrote:Yeah but I want to just put in a texture that is 64x64 and edited as I want it to look as opposed to trying my luck with a program's resizer that may or may not preserve certain details when the image is converted to a 64x64 image. For most textures there is no problem with such resizing, but with something like letters for someone's name used as a secondary texture I want everything to be precise so I do not end up with R's that look like A's or D's that look like O's, etc.


Why don't you try it and see first though? If it does work then you'll have nothing to complain about.
Last edited by Alter-Fox on Wed Apr 18, 2012 1:49 am, edited 2 times in total.
We live in a universe... It's distracting
=========================================================
beware of ounce
User avatar
Enzo03
Posts: 135
Joined: Wed Apr 01, 2009 1:19 pm
Location: Private Luxury Worldship.
Contact:

Re: Problems with transparent custom textures

Postby Enzo03 » Wed Apr 18, 2012 1:48 am

Eh, I was trying to answer Pumo, who asked if I was importing as TGA or BMP. I was importing BMP.

I know about how palettes work. I'm not saying your wrong - you're precisely correct, and I didn't think what I wrote implied that I had enough of a different idea of how it works to warrant what is apparently a misunderstanding.
Ok maybe a little.

I have not been able to import TGAs of the size 64x64.

Alter-Fox wrote:
Enzo03 wrote:Yeah but I want to just put in a texture that is 64x64 and edited as I want it to look as opposed to trying my luck with a program's resizer that may or may not preserve certain details when the image is converted to a 64x64 image. For most textures there is no problem with such resizing, but with something like letters for someone's name used as a secondary texture I want everything to be precise so I do not end up with R's that look like A's or D's that look like O's, etc.


Why don't you try it and see first though? If it does work then you'll have nothing to complain about.
Because.. I did. And I had things to complain about after the fact.
Some people are like Slinkies. They aren't really good or even useful for anything but they always manage to put a little smile on your face when you give them enough of a push down the stairs.
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Problems with transparent custom textures

Postby Alter-Fox » Wed Apr 18, 2012 1:50 am

Ok then... what if you did it without transparency? Just modify the base texture to be the base texture with the name overtop of it, and have it replace a texture you weren't otherwise going to use in the level. I'm sure there are enough textures that you won't use in the level to make it feasible for wherever you want to put the writing -- unless it's the size of Anthology -- but even Anthology had enough textures left over after the first two parts to make a POG for the D3 section.
In normal circumstances where everything is working perfectly it would take a little longer than just making a secondary texture, but right now I have this feeling that doing it this way would be faster than trying to work around what's wrong -- and in the meantime Karx will probably find time to fix whatever part of the problem is on DLE-XP's end.
We live in a universe... It's distracting
=========================================================
beware of ounce
User avatar
Enzo03
Posts: 135
Joined: Wed Apr 01, 2009 1:19 pm
Location: Private Luxury Worldship.
Contact:

Re: Problems with transparent custom textures

Postby Enzo03 » Wed Apr 18, 2012 3:20 am

But... it's not my level. It's another person's level. I offered to do it for him, as did Blarget. Both of us have done this without success. I think the author in question also took a shot at it with similar results but I don't really remember.

I don't know what textures he's going to want to put his name on. He got the idea when he saw DKH's latest level, Logic, which has a DKH emblem on it (also done by Blarget, through a DTX patch file).
Some people are like Slinkies. They aren't really good or even useful for anything but they always manage to put a little smile on your face when you give them enough of a push down the stairs.
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Problems with transparent custom textures

Postby Alter-Fox » Wed Apr 18, 2012 3:38 am

Well... That sucks then.
I have no more suggestions except for the sortof dishonorable "re-delegate to someone for whom it actually works".
We live in a universe... It's distracting
=========================================================
beware of ounce
Sirius
Posts: 1987
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Re: Problems with transparent custom textures

Postby Sirius » Wed Apr 18, 2012 4:42 am

For Azure Catacombs, I used a combination of GIMP (to palettize the textures) and DTX2 (to actually import them into a .POG). It worked pretty well except that some textures are exceedingly painful to get into Descent 2's palettes without ending up as a grand total of 4 different colors.

However DTX2 is tricky to get to work on 64-bit operating systems. I had to install it under Windows XP Mode for it to work. Even there it's a bit flaky (error messages all the time, think it crashed once or twice) but it at least kind of works...
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Problems with transparent custom textures

Postby Alter-Fox » Wed Apr 18, 2012 5:38 am

Well that's why I offered to do it with DTX2. I can run it no problem. But it sounds like Enzo's already tried that and it also didn't work.
We live in a universe... It's distracting
=========================================================
beware of ounce
Sirius
Posts: 1987
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Re: Problems with transparent custom textures

Postby Sirius » Wed Apr 18, 2012 7:16 am

It definitely works if you do it right, but there are plenty of subtle ways to get it wrong. :)
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Problems with transparent custom textures

Postby karx11erx » Wed Apr 18, 2012 8:05 am

Is the DTX2 source code available?
User avatar
Aus-RED-5
Forum Moderator
Posts: 1490
Joined: Tue Sep 25, 2007 9:02 am
Location: Adelaide, South Australia
Contact:

Re: Problems with transparent custom textures

Postby Aus-RED-5 » Wed Apr 18, 2012 10:43 am

Maybe try e-mailing the author? I doubt the address is valid anymore... :clue:
But his site is still up... http://www.cybertrash.com/shareware/dtx/
Stefan Ekstam (website) aka Stefan Nilsson: stefan.nilsson at mks.se
Did a search on FB.... only 2 ppl with that name came up.
----System Specs----
Case: Corsair Obsidian 650D Black
Motherboard: ASUS Sabertooth X58
CPU: Intel Core i7 960 3.20ghz
Heat Sink: Corsair H100 CPU Water Cooler
Memory: Corsair 6GB (3 x 2048mb) DDR3 1600 Dominator (PC12800 - TR3X6G1600C8D)
Video Card: ATi SAPPHIRE Radeon HD 7970 3GB GDDR5 OC Edition
Hard Drives: SSD Corsair Force Series 3 F120 120GB & WD5003ABYX Enterprise RE4 500GB
Media Player: LG BH10LS30 BluRay Burner
Power Supply: Corsair HX-850
OS: Windows 7 Pro 64Bit
Monitor: Benq XL2420T LED
User avatar
Alter-Fox
Posts: 1132
Joined: Mon Mar 31, 2008 7:29 pm
Location: some other reality

Re: Problems with transparent custom textures

Postby Alter-Fox » Wed Apr 18, 2012 12:46 pm

I am assuming he's actually swedish, because if he wasn't it would make finding him so much easier.
We live in a universe... It's distracting
=========================================================
beware of ounce

Return to “DLE-XP Help”

Who is online

Users browsing this forum: No registered users and 1 guest