Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Topgun on July 25, 2007, 01:07:09 pm

Title: palette plus 8bit alpha in dds
Post by: Topgun on July 25, 2007, 01:07:09 pm
I am making an animated beam. grayscale color and needs alpha (there are black parts in the bitmap that cannot be transparent) I was wondering if there are platted dds with 8bit alpha. if not I will just use u8888.
Title: Re: palette plus 8bit alpha in dds
Post by: taylor on July 25, 2007, 01:33:38 pm
There is luminance alpha, a 16-bit format that is 8-bit grayscale plus 8-bit alpha.  It's not supported in the current code though (but I have added support for it in my Xt builds for eventual commit to CVS).

You are going to run into a bigger problem however, it's not going to blend properly.  Using a real alpha channel in beam effects is going to look bad at the point of impact.  Some day that might be fixed, but it's not likely to be any time soon.
Title: Re: palette plus 8bit alpha in dds
Post by: Topgun on July 25, 2007, 01:44:00 pm
darn, what do you think I should do?
Title: Re: palette plus 8bit alpha in dds
Post by: Hades on July 25, 2007, 01:53:09 pm
Is this this the beam you will Defeat Goober with? :nervous: Just don't use alpha.
Title: Re: palette plus 8bit alpha in dds
Post by: Topgun on July 25, 2007, 02:02:04 pm
shh, that's a secret :nervous:.

and how does the beam look bad when it has alpha? can you give me an example? IE if it just looks "weird" then it might be a desired effect.
Title: Re: palette plus 8bit alpha in dds
Post by: taylor on July 25, 2007, 03:17:01 pm
and how does the beam look bad when it has alpha? can you give me an example? IE if it just looks "weird" then it might be a desired effect.
There is a screenshot somewhere, but I don't remember the thread that was in.  But if you want to see what it looks like, then just try it yourself.
Title: Re: palette plus 8bit alpha in dds
Post by: Herra Tohtori on July 25, 2007, 03:53:25 pm
(http://img128.imageshack.us/img128/893/bfred1jw1.jpg)

That's what alpha blended beams will look like. The brightness is not what it should be and the beam is actually less luminous than the explosion behind it which makes the beam kinda "shadow" it's background, which looks bad.

Use additive blending to avoid it. That is, make black the background colour of the texture and leave the edges black.