Who knows details about decals?

Relic25Relic25 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!

Comments

  • KilltoyKilltoy Join Date: 2002-03-28 Member: 358Members
    And please post in here, as Relic isn't the only person highly interested in this subject.
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Here's an example of what I mean.
  • Hand_Me_The_Gun_And_Ask_Me_AgainHand_Me_The_Gun_And_Ask_Me_Again Join Date: 2002-02-07 Member: 178Members
    Looking at a few entries in <b>decals.wad</b> in Wally, I think I've worked it out.

    <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.
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    That's a good start, since it does seem true that the index 255 is the tinting color, but there is still something missing, since the white areas are still darkening when they appear on glass.

    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-->
  • Hand_Me_The_Gun_And_Ask_Me_AgainHand_Me_The_Gun_And_Ask_Me_Again Join Date: 2002-02-07 Member: 178Members
    <!--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-->That's a good start, since it does seem true that the index 255 is the tinting color, but there is still something missing, since the white areas are still darkening when they appear on glass.<!--QuoteEnd--></td></tr></table><span id='postcolor'><!--QuoteEEnd-->

    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-->
  • DanDaManDanDaMan Join Date: 2002-03-19 Member: 335Members
    I thought we couldn't modify the decals.wad
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    I should back up and correct myself.  When I said, "the white areas are still darkening when they appear on glass", what I meant was that the white areas of the decal are darkening ANY transparent brush they hit.  Glass func_breakables get a whole different decal applied to them when they are shot.  I have worked out how to make the breakable glass decals successfully, but I can't seem to figure out why my replacement "{shot" decal textures work fine on solid (opaque) surfaces, but not on tranparent/translucent surfaces.  No matter what I've tried, I still end up with the effect pictured above.



    <!--EDIT|Relic25|May 05 2002,16:11-->
  • ParasiteParasite Join Date: 2002-04-13 Member: 431Members
    wow I am completely lost now. I never use decals but I likened them to decals in truspace wich is like a layer over the origional texture (like a poster on a wall)
    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?
  • Hand_Me_The_Gun_And_Ask_Me_AgainHand_Me_The_Gun_And_Ask_Me_Again Join Date: 2002-02-07 Member: 178Members
    Have you tried an index 255 that's not black, but instead a very, very dark grey?

    Some of the explosion, scorch-mark decals are not quite black, and it might matter (they <b>do</b> work on glass).
  • realityisdeadrealityisdead Employed by Raven Software after making ns_nothing Join Date: 2002-01-26 Member: 94Members, NS1 Playtester, Contributor
    <!--QuoteBegin--Parasite+May 05 2002,15:12--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td><b>Quote</b> (Parasite @ May 05 2002,15:12)</td></tr><tr><td id="QUOTE"><!--QuoteEBegin-->wow I am completely lost now. I never use decals but I likened them to decals in truspace wich is like a layer over the origional texture (like a poster on a wall)
    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.
  • ParasiteParasite Join Date: 2002-04-13 Member: 431Members
    oic  <!--emo&:D--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'><!--endemo--> thx Ken
    now if we can fugure out Relics question I'll be a decal flamin super hero, exept...not
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    HMTGAAMA: Yes.  I tried that as well without any success. <!--emo&:(--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/sad.gif" border="0" valign="absmiddle" alt=':('><!--endemo-->  I've even exported the original {shot decal textures, and applied their exact palette to my own replacement {shot decals, and this still results in the same thing.  It's really driving me nuts.
  • Hand_Me_The_Gun_And_Ask_Me_AgainHand_Me_The_Gun_And_Ask_Me_Again Join Date: 2002-02-07 Member: 178Members
    Ummm... Do the original <b>{shot</b> textures work on transparent entities?

    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-->
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Arg.  So I'm an idiot.  I overlooked the fact that I had accidentally replaced the {bproof1 decal texture, which turns out to be the ONLY one that is applied to transparent/translucent non-breakable entities when they are hit with bullets.  Oh well, if nothing else, I did learn about how the decals are tinted.  Thanks HMTGAAMA! <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.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-->
  • Hand_Me_The_Gun_And_Ask_Me_AgainHand_Me_The_Gun_And_Ask_Me_Again Join Date: 2002-02-07 Member: 178Members
    <!--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-->Oh well, if nothing else, I did learn about how the decals are tinted.  Thanks HMTGAAMA!<!--QuoteEnd--></td></tr></table><span id='postcolor'><!--QuoteEEnd-->

    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...
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Yes, those are the bulletholes I was working on.  They are much better suited for use where plastic and metal textures are more prevalent.  Unfortunately, like everyone else, I have no means of testing damage decals in the NSTR2, so I had to just use a concrete wall in an HLDM map I made a year or so ago.

    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.
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Case in point:  Left screen uses the default HL decal (barely even visible), right screen shows one of the new glass hit decals.  It's not a milestone or anything, but it's the little touches that help sometimes.



    <!--EDIT|Relic25|May 05 2002,22:23-->
  • realityisdeadrealityisdead Employed by Raven Software after making ns_nothing Join Date: 2002-01-26 Member: 94Members, NS1 Playtester, Contributor
    Indeed.

    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-->
  • GreedoGreedo Bounty Hunter Join Date: 2002-01-24 Member: 37Members, NS1 Playtester, Contributor
    Revolutionary!  I mean, that looks really great, and I can't wait to see the rest of them!
  • Black_WolfBlack_Wolf Join Date: 2002-03-13 Member: 310Members
    that does look really cool, cant wait to see this in-game.
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    Looks like I missed this whole conversation.  Glad to see you have it worked out, I can't wait to see the results!

    We'll be sure to post the decals.wad for you guys to use when it's ready.
Sign In or Register to comment.