Custom Shadows Hlrad Hack

hulluhullu Join Date: 2002-11-02 Member: 5289Members
<div class="IPBDescription">Changing color of light for some areas..</div> Well I did this hack year ago and it was going to be in MHLT 1.7.1 but it didn't get released. This hlrad hack allows you to change color of light before it hits wall by placing color changing BSP entity(s) between wall(s) and lightsource(s).

here's download link to new hlrad.exe:
<a href='http://hullu.xtragaming.com/mhlt/hlrad_fast_customshadowwithbounce.zip' target='_blank'>http://hullu.xtragaming.com/mhlt/hlrad_fas...wwithbounce.zip</a>

source:
<a href='http://hullu.xtragaming.com/mhlt/hlrad_fast_customshadowwithbounce_source.zip' target='_blank'>http://hullu.xtragaming.com/mhlt/hlrad_fas...unce_source.zip</a>

And here you can see what you can do with customshadows (example map sources included):
<a href='http://hullu.xtragaming.com/hlrad/' target='_blank'>http://hullu.xtragaming.com/hlrad/</a>

(multi0000.jpg: light is coming from celling, three bsp entities blocking out three main colors (r,g,b))
(window000?.jpg: multicolored window casting different color shadows)

Comments

  • TequilaTequila Join Date: 2003-08-13 Member: 19660Members
    I can make maps in the style of Mondrian!
  • ReeseReese Join Date: 2003-05-08 Member: 16143Members
    you may want to see if cagey will ship you a copy of his p13 source so you can add this there. I don't know how much use this would see in NS specifically, but people from all kinds of mods are using those tools and it would make a nice addition for some other mods.
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    I guess it would fit in with a funmap or circus mode, nice coding by the way.
  • BlackPantherBlackPanther Join Date: 2002-02-11 Member: 197Members
    Very nice!
    Makes it way more realistic imho.
  • AndosAndos Join Date: 2003-10-17 Member: 21742Members
    Isn't this the same as the custom shadow params in zhlt? <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
    It looks very nice and i hope to see a good use of this <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    I'm no mapper, nor am I experienced with this stuff. But after taking a look at the pics, the whole thing is looking quite promising. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • oOTOooOTOo Join Date: 2003-04-11 Member: 15401Members
    It a very surprising light effect,could you explain it a bit more ? (without being too supertechnical plz) <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • Vahn_PaktuVahn_Paktu Join Date: 2002-10-28 Member: 1666Members, Constellation
    edited December 2003
    I think a window has some parameter. Set it to a color. Then when the light goes through it, the light changes to that color.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    Is this a refinement of the custom shadows in the HLRAD source distribution of 1.7?

    I haven't looked at your source, but it seems like Merl had already placed some of your colored shadow code in what he made available to the public:

    <!--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-->
    #ifdef HLRAD_HULLU
    // Check for colored transparency/custom shadows
            VectorFill(d_transparency, 1.0);
            b_transparency = false;
           
            if (*(s = ValueForKey(ent, "zhlt_customshadow")))<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    If there's additional functionality that's been added, I'll roll it into p13. Either way, it's a neat addition to the tools and you deserve the recognition <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • WarpZoneWarpZone Join Date: 2002-11-03 Member: 6264Members
    I have a question. Would it be possible to make a hack that causes light to pass through the blue part of func_walls set to "Solid" rendermode? So like, if there was a railing, it would cast a shadow more or less kinda shaped like the railing texture? I guess you'd have to hella reduce the -chop value to make it look any good, but is it at least possible, in theory? Seems like it should be, but I could be wrong.
  • BigDBigD [OldF] Join Date: 2002-10-25 Member: 1596Members
    Hmmm...

    That would certainly be fun to play with. Some nice lighting effects could be made with that.
  • ReeseReese Join Date: 2003-05-08 Member: 16143Members
    Warpzone: I think the code actually applies light values to the face as a whole, then the game engine strips out anything 255 0 0 on a properly set entity. So, I don't really think it's possible. (that said, I don't know the half life source all that well, but the way I mentioned here seems like the cheapest one processing-wise) It might be better if we could get a rendermode-shadow setting that would render everything that was all blue as 255 0 0, and everything else as all black with light values applied. Then you could fake it at the cost of an additional entity using the same texture 1 unit from the floor/wall/whatever you are casting a shadow on.
  • AndosAndos Join Date: 2003-10-17 Member: 21742Members
    <!--QuoteBegin--WarpZone+Dec 18 2003, 03:42 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (WarpZone @ Dec 18 2003, 03:42 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Would it be possible to make a hack that causes light to pass through the blue part of func_walls set to "Solid" rendermode? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    That would be awesome but i think it would be quite CPU expensive. First it needs to find out the scale of the texture and stuff like alignement and then check if this is a blue spot and then send light through it <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
    /me like <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • hulluhullu Join Date: 2002-11-02 Member: 5289Members
    <!--QuoteBegin--XP-Cagey+Dec 18 2003, 02:19 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (XP-Cagey @ Dec 18 2003, 02:19 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Is this a refinement of the custom shadows in the HLRAD source distribution of 1.7?
    <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    This latest version was going to be included in never released mhlt 1.7.1.
    1.7 has old version of this, new version is 1000-10000 times faster than old code and has RGB bounce light.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--hullu+Dec 18 2003, 10:19 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (hullu @ Dec 18 2003, 10:19 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin--XP-Cagey+Dec 18 2003, 02:19 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (XP-Cagey @ Dec 18 2003, 02:19 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Is this a refinement of the custom shadows in the HLRAD source distribution of 1.7?
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    This latest version was going to be included in never released mhlt 1.7.1.
    1.7 has old version of this, new version is 1000-10000 times faster than old code and has RGB bounce light. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    I'll update p13 to the new version.
  • Lt_GravityLt_Gravity Join Date: 2003-04-28 Member: 15909Members
    its sweet!!!
    the window: each "shadow" needs a seperated brush, right? uhoh *thinks about maxnumber of entities*
  • BlackPantherBlackPanther Join Date: 2002-02-11 Member: 197Members
    The "light only through the blue parts" has been done before in a now dead mod called UNCROSSABLE PARALLEL... iirc... cuz i damn well remember a pic
  • BelgarionBelgarion Join Date: 2002-07-19 Member: 973Members
    *nod nod* this is indeed cool.
    now if you can get rad to let light go through those and the resulting light on the wall to be colored as the texture.... i'll be real impressed then
  • hulluhullu Join Date: 2002-11-02 Member: 5289Members
    <!--QuoteBegin--Lt.Gravity+Dec 18 2003, 07:50 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Lt.Gravity @ Dec 18 2003, 07:50 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> its sweet!!!
    the window: each "shadow" needs a seperated brush, right? uhoh *thinks about maxnumber of entities* <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    separate brush? no.

    You can group brushes to one entity normally (multibrush blue glass that is one single entity making for example).
Sign In or Register to comment.