[ Converted text/html to text/plain ]
Please excuse my last e-mail, Hotmail is a piece of sh*t... >:(

Anyway, I am working on a few features/additions for the compile tools and
wanted to use Half-Life's additive rendering to blend two textures together.
Not literally, of course, but simply use the same equation used in Half-Life
to blend two textures together additively.  Now, before you say "STFW!!!" I
already have, and to my surprise I couldn't find much info.  I did happen to
read that additive blending was like glBlendFunc(GL_ONE, GL_ONE), however I
couldn't decipher the MSDN docs to figure out what the actual equation would
be :)

One problem is that the texture miptex's in the WAD files are using 8-bit
palettes.  So while I can do the blending in 24-bit, I have to regenerate a
new palette based on the end blend.  Luckily, I am able to generate pretty
good palettes with NeuQuant, an algorithm which uses Kohenen's self-organizing
neural networks.  However it isn't perfect.  The problem I'm having here is
that whenever I test out a new blending algorithm in an attempt to emulate
Half-Life's, it's difficult to tell whether or not the error is with the
algorithm or with the palette generated.

I know a lot of Valve programmers hang out here, so if anyone could lead me in
the right direction for the additive blending in Half-Life, that would be much
appreciated.  I'm pretty sure it's a OpenGL/D3D thing, but I couldn't decipher
the docs and the web hasn't been helpful. :)

And if anyone knows of a good palette generation algorithm, I'd like to hear
about it :)  Neural networks are supposed to be pretty dang good, but the code
I'm using is from 1994, so who knows :P

------------------------------------------------------------------------------
Add photos to your messages with MSN 8. [1] Get 2 months FREE*.

===References:===
  1. http://g.msn.com/8HMBENUS/2749

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to