Tutorial: Adding a Laser

inveigleinveigle Join Date: 2004-01-07 Member: 25117Members, Constellation, NS2 Playtester, Reinforced - Shadow, WC 2013 - Supporter
Hail brothers & sisters,
Would some 1337 modeler please post a quick milkshape tutorial on how to add lasers to V models, I am looking to customise the pack I am curently using.
My thanks in advance.

Comments

  • esunaesuna Rock Bottom Join Date: 2003-04-03 Member: 15175Members, Constellation
    Give me a few minutes, i'm doing one now. It won't be in depth, but it'll work.
  • esunaesuna Rock Bottom Join Date: 2003-04-03 Member: 15175Members, Constellation
    edited January 2004
    Ok, here goes.

    First things first, open Milkshape and make yourself a cylinder like the one in this image. [EDIT] Because some git can't shut the hell up, here, instead of doing a cyclinder you could think of doing a more low-poly solution like a box or a pyramid. It's up to you, i'm only using a cyclinder for ease of use when skinning and such, since it only took a second or two.
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial1.jpg' border='0' alt='user posted image'>

    Now skin that cylinder with a texture like this one, call it <b>laser.bmp</b>
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial2.jpg' border='0' alt='user posted image'>
    With the rendermodes we'll use later, the black will be made transparent, so don't worry about the black.

    So after that we'll have something like this.
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial3.jpg' border='0' alt='user posted image'>

    Now open the model you want to attach this to, merge in your laser cylinder, position / resize the beam wherever you want it to go then tie it to the relative bone.

    Now edit the .qc file of the model and add in this line

    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->$texrendermode "laser.bmp" "additive"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    And after you compile the model, you'll have something that looks like this:
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial4.jpg' border='0' alt='user posted image'>

    Except it will be tied to a model. I couldn't be bothered to do that, but the process of attaching it is so simple.

    Bear in mind, however, that milkshape won't be able to compile the model with the $texrendermode, you'll have to pick up the updated studiomdl, which should be available somewhere on <a href='http://collective.valve-erc.com/' target='_blank'>collective.valve-erc.com</a>.

    Hope this helps in some way, it's a relatively easy and painless process.

    *EDIT: The new studiomdl.exe can be downloaded <a href='http://collective.valve-erc.com/data/docs/1047496381-02062100/files/studiomdl.exe' target='_blank'>here</a>.
  • CoolCookieCooksCoolCookieCooks Pretty Girl Join Date: 2003-05-18 Member: 16446Members, NS1 Playtester, Contributor, Constellation
    i think that post deserves to be stickied <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • Mr_JeburtOMr_JeburtO Join Date: 2003-08-29 Member: 20340Members
    <!--QuoteBegin--dafox+Jan 14 2004, 12:08 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (dafox @ Jan 14 2004, 12:08 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> <!--QuoteBegin--MR.JEBURTO+Jan 14 2004, 06:41 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MR.JEBURTO @ Jan 14 2004, 06:41 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ignore again  <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo--> <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    spam <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    its not spam because i replied to the post twice then realised i was wrong so <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->
  • inveigleinveigle Join Date: 2004-01-07 Member: 25117Members, Constellation, NS2 Playtester, Reinforced - Shadow, WC 2013 - Supporter
    Thank you esuna,
    The tutorial is great but could you please add how I atatch the laser to a model. I apologise but I am very new at this.
  • CaptainChetCaptainChet Join Date: 2003-04-21 Member: 15737Members, Constellation
  • esunaesuna Rock Bottom Join Date: 2003-04-03 Member: 15175Members, Constellation
    edited January 2004
    <!--QuoteBegin--[]inveigle[]+Jan 14 2004, 08:36 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ([]inveigle[] @ Jan 14 2004, 08:36 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Thank you esuna,
    The tutorial is great but could you please add how I atatch the laser to a model. I apologise but I am very new at this. <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Consider it done. I'm writing it now, i'll edit this post to put it in. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->

    *EDIT: Here we go.

    First off, save your laser beam to laser.ms3d, or whatever and goto file new. Now import the model you want to add the laser too. In my case, i'm using the marine model, purely because i have that decompiled.

    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial5.jpg' border='0' alt='user posted image'>
    Now goto file > merge and select the "laser.ms3d", or whatever you called it. Whatever you do, make sure you don't import a skeleton, that just complicates things.

    Now you'll be left with something like this:
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial6.jpg' border='0' alt='user posted image'>
    It's ok that it's totally out of scale, you can work with that.

    Now deselect everything, and select the laser beam. Rotate it, scale it, do whatever you want with it until it's the right shape and size and in the right position. Just play with it until it's there.
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial7.jpg' border='0' alt='user posted image'>
    Here we go, mr marine now has a laser coming out of his head.

    Now to the bit that makes it work...
    <img src='http://www.btinternet.com/~diesirae/pictures/tutorial8.jpg' border='0' alt='user posted image'>
    Find the correct joint, or bone, that you want to attach the laser to, just keep using the "SelAssigned" button to check what's assigned. When you find the right one, deselect everything, then use the "SelAssigned" button to select the vertices attached to the bone, now use the select tool to select the laser <b>as well</b> (shift+drag) and then click the assign button. If you did it all right then the laser beam should be attached to the same bone. Deselect everything then use the "SelAssigned" button again to make sure.

    Now just add the following to the relevant .qc file:<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->$texrendermode "laser.bmp" "additive"<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->And you're good to go.


    *EDIT: Fixed wrong image linked. Also, i'm still extremely new to modelling, and, well, i'm crap at it. But i do know one or two small things. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
  • frostymoosefrostymoose Join Date: 2003-09-12 Member: 20799Members
    you can do this with 4 triangles and it probably will look no different if properly sized. that huge cylinder looks ridiculous
  • esunaesuna Rock Bottom Join Date: 2003-04-03 Member: 15175Members, Constellation
    <!--QuoteBegin--frostymoose+Jan 15 2004, 01:37 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (frostymoose @ Jan 15 2004, 01:37 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> you can do this with 4 triangles and it probably will look no different if properly sized. that huge cylinder looks ridiculous <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    I spent roughly .01 seconds making that. My interest wasn't in making it look good, it was in making a working example. Stop being such a critic.
  • CaptainChetCaptainChet Join Date: 2003-04-21 Member: 15737Members, Constellation
    GJ with the tutorial, i really love the laser effect even if it doesnt have anything beside aesethic appeal. Im gonna use that on my new Xm8 model.

    BTW: STICKY!!!!
  • inveigleinveigle Join Date: 2004-01-07 Member: 25117Members, Constellation, NS2 Playtester, Reinforced - Shadow, WC 2013 - Supporter
    My thanks to you esuna, you are a testiment to the heart behind the NS community.
  • CaptainChetCaptainChet Join Date: 2003-04-21 Member: 15737Members, Constellation
    I concur! Thx esuna.
  • esunaesuna Rock Bottom Join Date: 2003-04-03 Member: 15175Members, Constellation
    *bows*

    It's nice to know that something i've done is appreciated. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • frostymoosefrostymoose Join Date: 2003-09-12 Member: 20799Members
    I'm not commenting that 2 boxes would look better. it's just more efficient with polys. 2 boxes doesnt take very long either last time I checked <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
  • JimmehJimmeh Join Date: 2003-08-24 Member: 20173Members, Constellation
    Brilliant tutorial Esuna <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->

    Sticky Please
  • BigBullBigBull Join Date: 2003-04-02 Member: 15123Members
    heres the:

    <a href='http://www.nsarmslab.com/details/dodtrans.zip' target='_blank'>Dod Transparency Dlls.</a>

    If you need them soon.
  • FunkyFungusFunkyFungus Join Date: 2003-09-09 Member: 20691Members
    <!--QuoteBegin--frostymoose+Jan 15 2004, 08:18 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (frostymoose @ Jan 15 2004, 08:18 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I'm not commenting that 2 boxes would look better. it's just more efficient with polys. 2 boxes doesnt take very long either last time I checked <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo--> <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    did you ever herer the word example ?? <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->

    nice tut esuna <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
    keep up helping !
    and not flaming each other <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • coilcoil Amateur pirate. Professional monkey. All pance. Join Date: 2002-04-12 Member: 424Members, NS1 Playtester, Contributor
    Moved to a new home -- thanks for the report, cookie!
Sign In or Register to comment.