|
Difficulty: Moderate
Tools you'll need:
- The first thing you need to do when making a hilt is to have an idea of what it is you want to make. Reference images are a dream, so if you have an idea for a hilt try drawing it on a piece of paper, using your image editing software to sketch out a rough design, or use a third-party site like saberBuilder. I'll use the last option for this tutorial, since it's a quick easy option for those of us who may not be the best artists when it comes to drawing.
- After a few minutes I came up with a simple lightsaber design that we can use to base our hilt on. Remember, you can make your hilt as simple or complex as you like, but remember to make sure you only make your design up to the level of skill you posess. The more you model the better you'll get, but there's no sense in trying to make a model you're simply not skilled enough to make, otherwise you'll get frustrated!
This should be a simple hilt for starters to attempt, so if you're interested in following along make sure to download the image.
- The next thing we need to do is open GMAX and get ourselves ready to model. I recommend doing most of your work from one of the FRONT viewport. Click on it once, then click the Views menu at the top, then choose Viewport Background (or skip all that by hitting ALT+B). Under the Background header click Files and navigate to where you saved your reference file. Under the Aspect Ratio header make sure you click Match Bitmap, which will allow the Lock Zoom/Pan option to be selected. Check that box so our background won't move with us as we zoom or pan.
- Your screen should look something like the following:
Now we can start building our hilt from this image. Almost all modders in the Jedi Academy modeling community strongly recommend eight (8) sided cylinders for lightsaber hilts and other cylinder-based models. This allows your model to still look round in-game, but will reduce the amount of stress the model puts on the engine by keeping the hilt efficient. Make sure when you use the cylinder tool to set the sides to eight and the height segments to one.
Return to the front viewport and let's make a cylinder by clicking on the Create tab . To get a better look at what you're doing you may want to maximize your viewport. Once you're ready to start click on the Cylinder button and make a cylinder roughly the width of the hilt in your drawing or reference. We will have to rotate it when we're done so it matches the shape, size, and orientation of our image, but you should see something like this when you finish:
- Now we have our basic shape, but we need to make it look like our reference. I am going to extrude those small rings so they stick out a little, even though that's not exactly how they look in our reference. This is personal preference, but it will give our model some depth instead of just being a flat cylinder. I have counted that I will need five additional edge loops -- one for each side of those rings -- so I will just go back into the Modify tab and change the height segments to six (6).
This isn't exactly what we want, so I'm going to right click on the model and choose Convert to: and then select Convert to Editable Poly. You can also choose Convert to Editabe Mesh, but I am more used to working with polies. NOTE: Once you do this you will not be able to change any more parameters for your cylinder because it will no longer be considered a cylinder anymore, but instead an editable mesh or poly (depending on what you chose).
Now that I've converted it I can use the vertex tool to move those edges where they belong.
- Now we're going to take these polygons we just created and extrude them. Select just the polygons in the ring, then right click and select Extrude. Click and drag until they are extruded to your liking. If the polygons are extruding strangely you may need to click on the Modify tab and scroll down until you see Extrusion type. Make sure Local Normal is selected. You can see before an after image below.
- Now we'll work on the emitter -- the bit the blade will come out of. To make it look like the emitter in our reference we'll have to move some vertices around. Just move them to the left until they line up with the outline of our reference. Once you've done this it will look like the image below.
Finally! It's looking good now. One last detail we should add is to hollow out this part of the emitter. To do this you may want to go into perspective mode by hitting the P key. There are a variety of ways you can do this, but not being very familiar with GMAX myself I decided to do some beveling. By clicking the Bevel button and choosing a small number for the Extrusion value and a larger, negative number for the Outline value I was able to somewhat mimic what the Inset polygon tool does in 3DS Max. I then extruded the inner portion backwards (click and drag, or use a negative value for your Extrusion value. You can then either leave the lip portion as it is or you can move those vertices you beveled back in line with the outside ones. So what you'll have now is:
- Now it's time to UV map. Not my favorite part of modeling either, especially in GMAX which has some pretty poor tools. But we'll give it a try together. Luckily it does have some tools that will make unwrapping our cylindrical hilt about 1000x easier, so in your modifier drop down menu select UWV Map. In the roll-out click Cylindrical (and check Cap to make things easier for yourself), then scroll down and select the Fit button. This probably won't appear to do anything, which is actually good. It means the modifier was applied perfectly without us having to mess with it any more.
Now in your modifier list select Unwrap UVW. Click edit and look at your map. Looks a little odd, but it's definitely workable! This will take some by-hand tweaking, though, so get ready to learn a thing or two about mapping your hilt the hard way (also known as "the right way").
The first thing we're going to do for ourselves is apply a checkered pattern to our hilt. This will help us figure out which parts of the texture will stretch. The idea is, when you're done with your map, all the squares should be squares (as opposed to rectangles, triangles, blobs, minesweeper mines, etc). Hit M to enter the material editor, then apply the checkered texture of your choosing. If you don't have one, this is the one I used. To create a texture click New, then choose Standard. You'll now see a bunch of stuff, but click where it says Maps to expand that roll-out, then click the none button next to Diffuse Color and select your checker pattern by clicking on Bitmap and then navigating to the texture. You can then drag the new texture onto your model (make sure to click the little button with the box covered in blue and white checks to make sure you can see it in the viewport!).
- Now for the hard part. You need to separate your UV map. Remember, you ideally do not want any parts overlapping, and you can scale, rotate, and move any pieces you want. If the checkered background is bothering you, you can also turn it off by clicking the box with the blue and white checks in the Edit menu in the Unwrap UVW roll-out. The first thing you want to do is select those big circles and move them out of the way. Just move them off to the side for now so we can work on the rest of the map.
As you can see if you zoom out a little on our map, we have some strange parts sticking out to the right and left. Don't worry about these parts; they are the edges of our rings and they are on a different plane, so we will have to fix them later anyway. I am going to carefully select them and detach them from the main map (right click, select Detach Edge Verts) and move them out of the way as well.
When cleaning up your UV map make sure you don't have any overlapping sections, and that all the checks on your model at the very least look the same. If they are all slightly stretched make sure they are equally stretched. That way when you finish you can universally scale them all together to get them square. What I noticed when I was working with this UV map that the curved part was actually upside down, since it is the inside of the emitter. Simple select the bottom vertices and drag them up, then you can make sure the polygons below them are wide enough (these are the lip on the emitter). The flat portion on the very inside you may want to select and use the planar mapping feature on. It should be set to Averaged Normals by default, so you can choose that face and click the Planar Map button. You can also use this feature on the portions of the rings that we moved off to the side, but make sure to select the Z plane instead of Averaged Normals. You can then move these out of the way again.
Once you are satisfied with your map, scale it so it fits in the black box. Mine looks like this:
- Okay, we're done UV mapping so now we need to texture our hilt. You'll need to export your skinmap and we'll have to do this the hard way since it's GMAX. With your UV map open, hit the Print Screen key on your keyboard (sometimes PrtSc or similar) and past this into your photo editing software. You will now only want the bits inside the black box, so crop it to those dimensions and then resize the whole image to 512 x 512, which are the dimensions we need to use for the game.
Now make a folder on your hard drive (prefereably in the root directory of your hard drive, to keep the pathway short -- this will help you avoid errors in ModView and MD3View) an call is base. Then inside this folder make a folder called models. Inside that folder make a folder called weapons2. Inside that folder make a folder with the name of your hilt (I will use sabertut). The following directory structure for me, for instance, is C:\base\models\weapons2\sabertut. Put your UV map here (you can call it anything you want).
- Now we're going to paint our texture over this map and we'll use the edges as a guideline. Feel free to paint a little outside of the lines to make sure you don't accidentally miss some spots right around the edges. I'm just going to make this simple and make the whole thing chrome and I'll only use three colors -- white, black, and silver. The silver I'm going to fill the background with, then I'll use the black and white to paint on the hilights. Even if you want your hilt to be chrome you don't have to make it look like chrome. Chrome is a result of light on the metal, so painting on chrome will just make it look fake. Let your shader do the work for you here, but we'll need a little depth, so we'll just do some hilights and shadows by painting big lines on the texture and blurring them. See how I did it below:
- Now we need to apply this texture to our hilt to see how it looks, otherwise we're just shooting in the dark. You can make a new texture just like we did for the checkered texture and apply it to your hilt to see roughly how the model will look with your custom texture. You can also keep working on it and see it change as you update the texture. I'm going to make a few more alterations then we'll see how it looks!
- Alright, our hilt is now modeled and textured. Now comes the important part: getting it in-game. We need to import an existing game hilt so we can figure out how big to make our hilt. We also need to get the tags from an original hilt (otherwise we would have to make our own). Let's use PakScape to open up one of Jedi Academy's assets PK3's and grab a hilt to use as a reference. I am going to pull the folder called "saber" out of assets1.pk3, then I will use the MD3 import script to import the MD3 into our scene. Make sure when you're using the script you choose Load All under the Tags heading.
Hey, I don't see my saber! That's because the saber we imported is so small it's inside our model! Click on your mesh and hit ALT+X to go into xray mode and you should see it. We'll need to scale our model down and rotate it so it is the same size and orientation as the model we just imported. It's okay if our hilt isn't quite as long as the original, so make sure when you're scaling your hilt you base it on the width of the original hilt, not the length, otherwise your character will look like he or she is holding a giant, thick flashlight instead of a lightsaber. Now I've got it scaled, so our scene should look like this:
- Just to be safe, hit Reset XForm in the Utilities tab. Jedi Academy is not as picky about model transforms as some games are, but it's still good to be safe. Now we can delete the original hilt (just the hilt, not the tags!). You should see that a little triangle is left over. This is our tag and the game needs it to know where to put the saber blade (otherwise you'll get the dreaded crotch-saber). There should be one tag called tag_parent, which you can ignore, and another called tag_blade1 -- that's fine, so leave the name as it is. You maybe need to move it up or down, depending on the size and orientation of your model, so in our case we'll either need to move the tag down, or we'll need to move the hilt up. I am going to move the hilt up slightly, just to make sure we get good hand placement.
- Now we'll export. This is the easy part, assuming you've done everything right up to this point. Go to File, then Export. Select Quake III MD3 as your filetype if it's not preselected and name your model saber_w.md3 and save it to the folder we made earlier for our model (C:\base\models\weapons\sabertut for me). Make sure when you export you choose the following options:
- Done with GMAX. Phew! Navigate to the folder you saved the MD3 to and open it with MD3View (if this is the first time you've used it you may have to tell the file to open with MD3View. When you open the hilt you may sometimes get spewed a bunch of long funny-looking errors and you will find your model is displayed white, without its texture. Sometimes this will happen and sometimes it won't, but I find it easiest to pretend like it always does and always take the following corrective steps.
Jedi Academy does not automatically know what texture you want applied to your model so we need to tell it. With a basic text editor (like notepad, which comes with Windows) we'll quickly tell it where to look for our texture. The format the game will look for is meshname,pathway. Some tutorials will tell you that you must name your mesh a certain thing, such as saber_w. In all honesty I didn't bother changing the name of my mesh, so it's still named Cylinder01. That's fine; Jedi Academy doesn't care. I just need to make sure my text file reads as Cylinder01,models/weapons2/sabertut/sabertut.tga. You'll want to note two things here. First, you always start the path from the top folder under base. In this case it's models. Secondly, we always use .tga as our filetype, even if your texture isn't a targa. Mine is a jpg, for instance, but the game always looks for a .tga ending in these files and it will be angry if it doesn't find it.
When you're done making your text file save it as saber_w.skin (make sure if you're using notepad you set the filetype to All files otherwise instead of saber_w.skin you'll get saber_w.skin.txt, which won't work). Save this in the same folder with your model, then back in MD3View go to the File menu and select Import skin and choose your .skin file that you just made. Now select Export MD3 from the file menu and overwrite the MD3 you made with gmax. Now select Export as GLM (Ghoul 2) *without* 90-degree skewing ( added for JKA ) and save this new file in the same directory with the same name.
- You should have three important files now if you've been following along: saber_w.md3, saber_w.glm, and the texture we made earlier (I named it sabertut.jpg). You will not need the .skin file we just made anymore, so you can forget about it. It has done its job. We're not quite ready to put this in-game yet because we need to make another file to help Jedi Academy know what to do with our hilt. We need to make a saber file.
Open assets1.pk3 back up and look for single_1.sab in ext_data/saber. Pull this out and save it to the folder you made for your hilt and rename it sabertut.sab. This file will probably be labeled as read-only, so right click on its icon and select properties, then uncheck read-only. Now open the file with a text editor (such as notepad). The top line should say single_1 -- this is what the game knows the hilt as. We need to change this so that our saber doesn't overwrite one of the game's default sabers. I will change it to sabertut. The next line with text should say name. Change the name from @MENUS_SINGLE_HILT1 to whatever you would like your saber to be called in the game. I will name mine "Tutorial Saber". The last thing we need to do is change the model to ours.
Your file should look like this:
sabertut
{
name "Tutorial Saber"
saberType SABER_SINGLE
saberModel "models/weapons2/sabertut/saber_w.glm"
soundOn "sound/weapons/saber/saberon.wav"
soundLoop "sound/weapons/saber/saberhum4.wav"
soundOff "sound/weapons/saber/saberoff.wav"
saberLength 40
saberColor random
}
- Now we're ready to finally put this in-game! Open up PakScape and we'll get everything packaged up and ready to go. You will need the following directory structure if you've been following along:
Put your MD3, your GLM, and your texture into the sabertut folder. Put sabertut.sab into the sabers folder. Now save your PK3 to your base folder (/Star Wars Jedi Knight Jedi Academy/GameData/base or similar). You can give the PK3 any filename you want. Now let's try it out in-game!
- As you can see below, the hilt turned out okay! More advanced modders might be able to add shaders to make the hilt shine or have a chrome look, and you can see the hilt is probably just a little bit too thick, but with the knowledge you've gained you could go back and tweak it until the model is just the way you want it. Congratulations, though. You just made your first hilt and got it in-game!
|
|