Who knows details about decals?
Relic25
Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
I really need to know the technical ins and outs of decals. Not the spraypaint decals, mind you, I mean the decals such as the ones in the decals.wad. They <i>seem</i> to be just 8 bit grayscale, but when I make them, they seem to work fine on everything but transparent or semi-transparent brushes (like glass). When I modify the bullethole decals ({shot1 through {shot5) and shoot glass, a darker rectangle appears where white in the decal surrounds the bullethole. Are certain color registers reserved for certain purposes? Also, how is color dealt with? I know things like the blood smears in HL are tinted a color, but I have no idea what determines this or if this color can be modified. I haven't had a lot of experience making and using decals in mapping (obviously), so I can use any information or links to information that anyone knows of.
Thanks!
Thanks!
Comments
<b>Index 0:</b> 255,255,255 white.
<b>...</b>
<b>Index 254:</b> 0,0,0 black.
<b>Index 255:</b> colour of rendered decal.
Indices 0-254 are the alpha, with white fully transparent and black fully opaque, and 255 is the actual colour.
Hope that helps... <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
Incidentally, !WATER textures use some much more complex system, which can define fog colour and intensity. I haven't figured it out, but I'm sure someone will have.
I just saw some detail info on the water texture color registers. I'll look again and post the link if I can relocate it.
EDIT* Here it is:
<!--QuoteBegin--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td><b>Quote</b> </td></tr><tr><td id="QUOTE"><!--QuoteEBegin-->Fog color is handled by certain color registers in the texture: a color register is a palette location. Color register 0 is the first color of the palette, color register 255 is the last. Fog color is handled by color register 3 in a water texture, and the fog density is handled by color register 4. The density value is drawn from the R value of that register (G and B are ignored), so pure red is the densest fog and black is the least dense fog.<!--QuoteEnd--></td></tr></table><span id='postcolor'><!--QuoteEEnd-->
<!--EDIT|Relic25|May 05 2002,15:19-->
That's weird - it seems for the effects-on-glass decals, index 0 is black, and there's a smooth gradient up to 254, white. Again, 255 is the tint colour.
I've no idea why it would have to be backwards, since blood-on-glass effects work fine in-game, using the normal method.
Odd. <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
<!--EDIT|Relic25|May 05 2002,16:11-->
and why if I use decals in WC can I use any texture(again like a poster on a wall) and why dont they render after compile?
SO what exactly do decals do, and what are they used for?
Some of the explosion, scorch-mark decals are not quite black, and it might matter (they <b>do</b> work on glass).
and why if I use decals in WC can I use any texture(again like a poster on a wall) and why dont they render after compile?
SO what exactly do decals do, and what are they used for?<!--QuoteEnd--></td></tr></table><span id='postcolor'><!--QuoteEEnd-->
Right, decals are just as you describe. An extra layer over an existing texture. Mostly used for adding details like burn marks, bullet holes, blood, etc. The only catch is that you can only place decals from the "decals.wad" in your level. A decal placed from any other wad will show up in VHE but not ingame after a compile. So you're kinda limited there.
now if we can fugure out Relics question I'll be a decal flamin super hero, exept...not
It might be some engine thing... <!--emo&;)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/wink.gif" border="0" valign="absmiddle" alt=';)'><!--endemo-->
By the way, for anyone who might be curious, I'm not trying to use decals outside if the decals.wad (or decals <i>in</i> the decals.wad for that matter) in the map itself. I'm trying to engineer a more appropriate decals.wad for NS, one that will hopefully include scratch marks, better bullet holes, etc. for use in-game.
<!--EDIT|Relic25|May 05 2002,21:00-->
Glad I could help. <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
I think I've figured out the 'backwards' palette - it looks like the actual colours of indices 0-254 are ignored, and the index number itself is used for the alpha. Some of the decals are round the 'wrong way' just to more accurately simulate what they'll look like, such as the glass-smash ones.
Are they the new bullet holes visible in the screenshot? They look somewhat better than the standard dark smudges...
I've made some cracked glass decals too that should work nicely. I've never been fond of the standard HL ones, mostly because they come out looking like undefined smudges in anything but software mode.
<!--EDIT|Relic25|May 05 2002,22:23-->
Looking forward to that decals.wad! <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
We'll be sure to post the decals.wad for you guys to use when it's ready.