PAVI Logo PAVI Logo
HOMELINK ZONE
  MilkShape Basics

 

MilkShape Modeling
Material Editor
Texturing

Animation
Modeling Basics
Game Mod's
Art Tutorials
Miscellaneous



Game Design































































































































































































































































MilkShape Basics
1) Basic Texture Coordinate Editor Tutorial

The Texture Coordinate Editor uses a process called UVmapping. When you build a model, you first place a vertices on one of the viewports. But what goes on behind the scenes? The program records the position of where you placed that vertices. Or in the case of a primitive like a box or cylinder...it records all the positions of the vertices. That way, any program that uses the model, knows exactly how to put the model together. In order to get a texture to show up on the model, it needs to do the same thing. And the way we get it to do that, is by telling the program where those coordinates (known as the U and V coordinates) should go. The Texture Coordinate Editor is a graphical way of moving your vertices around on top of an image in order to get the coordinates of both the model and texture aligned.

That's the basic behind the scene look, let's get down to some hands on. For this tutorial, I'm going to try and keep it as simple as I can. But the basic principle is the same. You can download the image I'm going to be using (Right Click Here and choose Save As) if you want to try this yourself.

Let's open up MilkShape. The first thing I'd like for you to do, go up to the Menu Commands and click on Window. Make sure that "Show Viewport Caption" is selected. That tells you what "view" you're looking at in the modeling windows. You can also change which "view" you are looking at by selecting it from the drop down list. I generally have my windows set up so that for the Top Left Window I have "Left" view selected, my lower left window is the "Top" view, my top right window is the "Front" view, and my lower right window is the "3D" viewport. You can set yours up the way you like, but this way when I refer to one of the views, you'll know which one I'm talking about.

We'll start by first creating a simple box. So under the Model Tab, let's click on Box. Holding down the left mouse button in the "front" viewport, let's draw out a box. Don't worry about the size, shape or position of the box for now.



If you've never worked with Groups before, or had problems selecting and de-selecting faces...this could get a bit confusing. So we'll take it slow and go over each. Let's work strictly from the Front view for the moment. Click on the Groups Tab and you should see your box listed as "Box01 ". A box is technically 6 sided, but for the moment Milkshape only see's it as one object or Group. We're going to break it down into 6 Groups for texturing (applying an image). Why? In order for each piece of the box to get a differen't part of the texture/image (assuming we have 6 differen't parts to the image), we need to work with each part of the model (or Group) separately. Otherwise you'll run into problems. Let's say that the front and back part of the box we're the same thing or you want to apply the exact same part of the image to each one. You could just make the front and back part of the same group and apply the material to one or the other..right? Nope. The texture would get applied correctly to the front, but the back would have a reversed copy of the image on it. The only way to resolve that is to make the back a separate Group and apply the texture to it. You can apply the same image, or parts of an image, to as many groups as you want. For example: you could assign only the part of the image that says "front" to every group in your model, and all the sides of the box would say "front" on it. But you can only do it one Group or piece of the model at a time in order for it to come out correctly.

So now that we know we need the box broken down into 6 separate groups in order to apply the image correctly, let's do that. Under the Model Tab, click on Select and make sure that "Face" is checked under the Select Options. In the "Front" viewport, hold down select...right click and drag over the left hand 1/2 of the box. You should now just have one side of the box selected.


Head back over to the Groups Tab and click on "Regroup". You should now have 2 groups listed. Box01 and Regroup01. Look for the text box right next to Rename and highlight the text in the box. Now type in right_side and click on Rename. You'll note in the Groups list you now have Box01 and right_side listed. Hit Ctrl+A (or under the Edit Menu Commands > "Select All") to select the whole box again. Let's repeat the above process, only this time hold down select then right click and drag over the right 1/2 of the box.


Under the Groups Tab click on Regroup and let's Rename this group left_side. Now you should have Box01, right_side, and left_side listed. Hit Ctrl+A again, to Select All, and then deselect the bottom 1/2 of the box. Only the top edge of the box should be selected.


Under the Groups Tab click on Regroup and then Rename this Group top. Ctrl+A to select all of the model again and then deselect the top 1/2 of the box. Regroup this and Rename it bottom. If you look in the Groups list you should now have: Box01, right_side, left_side, top, bottom. All that's left are the front and back.


Hit Ctrl+A to select the entire model again, but this time we're going to be working from the "Top" view instead of the front. Hold down shift...then right click and drag over the lower portion of the model in the "Top" view. Then under the Groups Tab hit Regroup and then Rename this to back.


You should now have in your Groups list: Box01, right_side, left_side, top, bottom, and back. Select Box01 from the list and Rename it front. We now have all six sides of the box separated into 6 separate groups. We can now apply an image, or parts of an image, to each group.
Hit Ctrl+A once again to Select All of the model. Head over to the Materials Tab. Click on New and you'll see Material01 pop up in the Materials List. We need to load the image you downloaded from above into the program. So click on the first box under Specular and Emmisive that says . Navigate your hard drive to find the image. Now click the Assign button at the bottom. Nothing happened? Well, it did but you just can't see it. Right Click on the 3D viewport and choose Textured from the context menu. You should see something similar to the image below. Before we move on, quickly look at the Groups list. Notice anything differen't? All of you're groups now have Material01 applied to them. That's what happened when you clicked the "Assign" button on the Materials Tab. It "assigned" the material, in this case an image, to all of the groups you had selected. For example; if you only wanted to apply that particular image to just the top of the box, you would have only selected the top of the model and hit "Assign", instead of the entire model (Ctrl+A)


Since we haven't coordinated each part of the image to each group yet, MilkShape defaults to placing a copy of the entire image on each group. That's what the Texture Coordinate Editor is for, telling MilkShape which part of the image goes with which group. So let's fire up the Texture Coordinate Editor. It should look a little like the image below:


Click Here for a complete breakdown of what each button is.   One thing to note: Before you open the Texture Coordinate Editor, you need to make sure that the groups you want to work with have been selected. Otherwise, the image you have assigned to those groups may not show up in the Texture Coordinate Editor Window. We've already done that by using Ctrl+A, Select All, when we assigned the texture/material to it.

Assuming you clicked on the link under the image of the Texture Coordinate Editor above, and know what each button does, we'll move on. Check the box that says "Redraw" so that we can see any changes we make in the 3D Viewport. In the first drop down menu choose the group, right_side. Then in the second drop down menu choose "right". Now click on "Region", then left click and drag a box around the part of the image that says right. You don't have to be perfect on getting the entire red box in which it says right since this is just a tutorial, plus you can use Select and Move to perfectly line up the vertices should you choose. Now hit the "Remap" button. In the Texture Coordinate Editor, you should now be able to see 4 red dots which represent the vertices for the Group right_side. Those red dots/vertices can be selected and moved around individually or collectively in order to get it to line up better with the image. If you look in the 3D viewport at the right side of the box you should see that the image has been replaced.


Now choose left_side from the 1st drop down menu, and "left" from the second. Make sure that "Region" is still selected (it should be unless you clicked on one of the other buttons). Left click and drag a box around the area of the image that says left then hit Remap. Again, you should see the vertices from the group and the 3D Viewport should show the new part of the image applied.


Continue doing this for each group of your model. Once you're finished, your model should look like the image below.


Hopefully that will give you a brief insight into the Texture Coordinate Editor. Will you use the same exact procedure for every model that you do? For the most part, yes. There may be times when you will want to use more than one texture image, or use a diffuse material color instead of an image. But we'll save that for another tutorial.

PAVI  
next