Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Spoon on July 01, 2009, 03:04:46 pm

Title: Question about planets, alpha and all that
Post by: Spoon on July 01, 2009, 03:04:46 pm
(http://xs541.xs.to/xs541/09273/example335.jpg)

As you can see, the black around the planets isn't being alpha filtered (so to speak), it becomes more obvious the more you scale them up, I tried several thingies and for a moment figured I actually had it fixed (when I saved them as DTX3 instead of DTX1) but apparantly I am still doing something wrong.
I saved them as DTX3 (DTX5 screws em up) .dds
.TGA doesn't show up at all
.JPG seems like a really bad idea.
Could someone explain to me what I am doing wrong?
Title: Re: Question about planets, alpha and all that
Post by: FreeSpaceFreak on July 01, 2009, 03:52:27 pm
You'll want to cut the black edges off the image, then save as DXT5. Be sure to save as the proper DXT5, not the normal map variant.
What tool are you using for DDS conversions?
Title: Re: Question about planets, alpha and all that
Post by: Spoon on July 01, 2009, 04:28:03 pm
You'll want to cut the black edges off the image, then save as DXT5. Be sure to save as the proper DXT5, not the normal map variant.
What tool are you using for DDS conversions?
Manually editing the black edges off is not desirable and surely there is a better way for that.
DTX5 gives me this:
(http://xs141.xs.to/xs141/09273/narf850.jpg)

using the nvidia plugin for photoshop
Title: Re: Question about planets, alpha and all that
Post by: FreeSpaceFreak on July 02, 2009, 12:54:23 pm
If you don't have the planets on a transparent background, you'll have to cut the black off manually.

And, that's pretty weird. Try saving your image as TGA instead, then test it in FRED or in-game; if it won't work as TGA, there's very little chance it will work as DDS.
If it works as TGA, try converting it to DDS with nvDXT. That's probably the most reliable tool available.
If it doesn't work as TGA, there's something seriously wrong.
Title: Re: Question about planets, alpha and all that
Post by: Spoon on July 03, 2009, 07:26:01 am
While the DTX5 thing still confuses me,  I managed to find a way around the whole issue
I was just being stupid again.

topic solved, nothing to see here anymore, move along.
Title: Re: Question about planets, alpha and all that
Post by: Rodo on July 03, 2009, 08:34:27 am
Don't save on DTX5, use DTX3 and for .DDS formats you should replace the back surroundings with an alpha channel (transparency).
Title: Re: Question about planets, alpha and all that
Post by: FreeSpaceFreak on July 03, 2009, 09:48:23 am
DXT3 compression has only a four-bit alpha channel, as opposed to DXT5 with 8-bit. If you have the planet atmosphere transparent on a black background, or if you have no atmosphere at all: fine. If you have a fading-to-alpha quality atmosphere, use DXT5.

And, Spoon, what was the mistake? Others may benefit from the solution.
Title: Re: Question about planets, alpha and all that
Post by: Getter Robo G on July 03, 2009, 07:31:17 pm
In this community information is ammunition, "can you spare a clip brother?"

By posting the solution you found to your problem you increase the knowledge base of the community members who might run into the same problem on their own.


We really need to stick this little caveat into the READ ME STICKIES for the forum!
Title: Re: Question about planets, alpha and all that
Post by: Spoon on July 04, 2009, 08:04:19 am
Bah, didn't I told you people to move along?
instead you must insist that I tell my mistake which will only make me look (more) stupid in the progress, you heartless bastards you!  :p

I am using the Lunarcell plugin for photoshop (after doing a forum search here on planets, found a thread made in 2005 or so talking about it) which is great. It fills the background with black however. I figured this wasn't a problem and that freespace would make the black transparant if only I picked the right compression method. Then I started messing around from there, being completely on the wrong trail while the answer I was looking for was so close by. I merely had to put the 'map mode' in lunarcell to composite instead of normal.

Why DXT5 compression is giving me such a messed up result remains a mystery.
Title: Re: Question about planets, alpha and all that
Post by: chief1983 on July 06, 2009, 02:55:48 am
Can you post the .png or .tga of the original image and I can try to make a good DXT5 version?