Difference between revisions of "Tutorials:Unimesh 2 - Editing and UV Mapping"
Line 42: | Line 42: | ||
You must download and install all of the following programs and utilities before beginning this tutorial. If you are having any trouble or questions on installing them, please look for info on their individual sites/pages. | You must download and install all of the following programs and utilities before beginning this tutorial. If you are having any trouble or questions on installing them, please look for info on their individual sites/pages. | ||
− | You SHOULD already have most of these from the first tutorial (except Vertex/Normal Data Merge), but in case you've uninstalled them or whatever since, here's the links again: | + | You SHOULD already have most of these from the first tutorial (except Vertex/Normal Data Merge and the Blue Grid), but in case you've uninstalled them or whatever since, here's the links again: |
* '''[http://chumbalum.swissquake.ch/ Milkshape]''' - Current version as of this writing is 1.8.3. We will be doing our mesh editing in Milkshape. This is not a free program! It will allow you to use it free for 1 month, but after that you will need to pay $25 to register it. It is worth the money. There is no version of this tutorial using free programs - nothing else uses Unimesh and allows you to make major edits for such a low price. | * '''[http://chumbalum.swissquake.ch/ Milkshape]''' - Current version as of this writing is 1.8.3. We will be doing our mesh editing in Milkshape. This is not a free program! It will allow you to use it free for 1 month, but after that you will need to pay $25 to register it. It is worth the money. There is no version of this tutorial using free programs - nothing else uses Unimesh and allows you to make major edits for such a low price. | ||
Line 53: | Line 53: | ||
* '''[http://www.modthesims2.com/showthread.php?t=227858 Vertex Data Merge/Normal Data Merge Plugins for Milkshape]''' - A great little plugin by Wes_H which will make the edit we're doing much, much easier. You should also follow [http://www.modthesims2.com/showthread.php?t=228095 Wes's instructions] on how to set up the plugins as shortcuts in Milkshape before continuing as it will be much easier to use them as keyboard shortcuts than through the menu. | * '''[http://www.modthesims2.com/showthread.php?t=227858 Vertex Data Merge/Normal Data Merge Plugins for Milkshape]''' - A great little plugin by Wes_H which will make the edit we're doing much, much easier. You should also follow [http://www.modthesims2.com/showthread.php?t=228095 Wes's instructions] on how to set up the plugins as shortcuts in Milkshape before continuing as it will be much easier to use them as keyboard shortcuts than through the menu. | ||
+ | |||
+ | * '''[http://www.modthesims2.com/showthread.php?t=135136 Tig's Blue Grid] - This is just a .bmp image which we'll be using for the UV mapping part. You can get it from that link there - it is attached to the end of the first post, in the "templates-patternsforuvmap.zip" file. | ||
* '''1-3 Hours to complete this tutorial''', assuming you do it right the first time. It may be quicker or slower depending on how fast you read and work. | * '''1-3 Hours to complete this tutorial''', assuming you do it right the first time. It may be quicker or slower depending on how fast you read and work. | ||
Line 226: | Line 228: | ||
Make sure to also click on the Change Body icon along the left side of the controls to change your sim from fit to fat, to make sure your fat morph is working properly. If all went well (and it should have), you should have a properly working normal and fat morph, with nothing having exploded or gone strange. | Make sure to also click on the Change Body icon along the left side of the controls to change your sim from fit to fat, to make sure your fat morph is working properly. If all went well (and it should have), you should have a properly working normal and fat morph, with nothing having exploded or gone strange. | ||
− | You will notice, if you look closely, that the bottom of the skirt is looking stretched - the textures of the babies are elongaged. This is due to the UV mapping - we changed the shape of the skirt, but we haven't changed the way the textures will be applied to it. We'll need to go back into Milkshape and do that, next.</blockquote><br><br> | + | You will notice, if you look closely, that the bottom of the skirt is looking stretched - the textures of the babies are elongaged. This is due to the UV mapping - we changed the shape of the skirt, but we haven't changed the way the textures will be applied to it. We'll need to go back into Milkshape and do that, next.<br style="clear:both" /></blockquote><br><br> |
'''Take a Break:''' Now that we've got our major mesh changes done, it's a good time to take a little break. Go get a cup of coffee or a glass of water, have a stretch, maybe get a snack, and come back in a bit. Remember when you're doing a long, complex edit to remember to take breaks often - it can be tempting to just sit and work until it's done, but you'll work a lot better and with a clearer head if you go easy on yourself! When you're ready, come back and we'll go on to the rest of the editing - editing the UV map. | '''Take a Break:''' Now that we've got our major mesh changes done, it's a good time to take a little break. Go get a cup of coffee or a glass of water, have a stretch, maybe get a snack, and come back in a bit. Remember when you're doing a long, complex edit to remember to take breaks often - it can be tempting to just sit and work until it's done, but you'll work a lot better and with a clearer head if you go easy on yourself! When you're ready, come back and we'll go on to the rest of the editing - editing the UV map. | ||
− | ===Part 7 - Edit the UV Map | + | ===Part 7 - Edit the UV Map in Milkshape=== |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | == | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | Now comes the part that a lot of people get confused on - adjusting the UV mapping. | |
− | + | ||
− | ' | + | A UV map (also called a texture map) is what tells the mesh how to apply the flat texture to the 3D shape. When the UV map is correct and done well, it makes the mesh easy to texture - patterns applied to it don't get too distorted by being wrapped around a 3D shape. But when the UV map is incorrect and/or done poorly, it makes the mesh much harder to texture - patterns applied to it get stretched, distorted, or don't work properly. |
− | + | In the last part of the last step, you looked at your edited mesh in Body Shop, and you should have noticed that the bottom part of the skirt was stretched due to how we moved it. When you change the shape of your mesh, you usually will have to edit the UV map to compensate for those changes. Even if you don't change the shape substantially, it's usually worth it to check your mesh's UV map to make sure it is distortion-free... Some Maxis meshes have surprising amounts of distortion that you can reduce or eliminate if you remember to check your mapping each time you make a new mesh. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | <blockquote>1. '''Open Last Version in Milkshape:''' If you've closed Milkshape, go ahead and open the MS3D file you saved in Part 6, Step 26 - "TutorialDressTwo-5.ms3d" If you haven't closed it, then you should already have your last version open.<br><br> | |
− | + | [[Image:Unimesh2-19.jpg|right|300x300px]]2. '''Import Blue Grid Texture:''' Now, we're going to import a texture into Milkshape so we can apply it to our mesh and see just how distorted our mapping is. In the "You will need" section, you should have gotten Tiggy's Blue Grid from the link. If you haven't already, unzip the contents of the file to your "TutorialDressTwo Files" folder. | |
− | + | Then, in Milkshape, flip to the Materials tab. Click on the New button toward the bottom. You'll see it creates a new material, called "Material01" in the list. Then, click on the first button labeled <nowiki><none></nowiki>. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | This will bring up an Open Texture dialog box. Browse to your "TutorialDressTwo Files" folder. You should have unzipped the file to this folder, so you will likely have a subfolder called "templates-patternsforuvmap" - open that folder, and then select the "templatecheckpattern.bmp" within and click Open. | |
− | + | You'll notice the orb under "Material" on the Materials tab will go blue, showing the texture you just imported.<br style="clear:both" /> | |
− | + | [[Image:Unimesh2-20.jpg|right|300x300px]]3. '''Apply Texture to Mesh:''' Now, switch over to the Groups tab. Select the "body" group, and then press the Select button (it's to the left of the Hide button). You will see the whole "body" group go red in the four view panes. Go ahead and hide the fat morph if it's showing while you're here. | |
− | + | Then flip back to the Materials tab, and click on Assign, below the New button. If your mesh doesn't turn textured in the 3D view, right-click in the 3D view and in the top section where it says Wireframe, Flat Shaded, Smooth Shaded, and Textured, select the last option - Textured. Your mesh should go all blue with a grid in the 3D view, with a rather festive looking red overlay.<br style="clear:both" /> | |
− | + | [[Image:Unimesh2-21.jpg|right|300x300px]]4. '''Identify Distortion:''' Right-click in the 3D view and uncheck the option for Wireframe Overlay. This will let you see your textured mesh without anything in the way. Now take a look at it in the 3D view. Remember you can right-click and choose Maximize to get the 3D view full screen. | |
− | + | If you take a look at the main body of the dress, you can see that it has a pretty decent blue grid going - the squares are basically square, and don't stretch or distort too much into rectangles anywhere. But down toward the bottom where we pulled down the hem, the squares turn into rectangles and get elongated. The same thing happened with the texture in Body Shop, remember? The texture of the blue babies was stretched and elongated. Any texture you apply to this mesh right now will get stretched in the same way, and the more patterned the texture, the more obvious that distortion would be. This is what we're going to fix on the UV mapping.<br style="clear:both" /> | |
− | + | [[Image:Unimesh2-22.jpg|right|300x300px]]5. '''Texture Coordinate Editor:''' Click on the Window menu, and then bring up the Texture Coordinate Editor. Go ahead and maximize the window that pops up. | |
− | + | In the dropdown on the right, make sure the "body" group is selected. Because you still had your whole "body" group selected from Step 2, you should now see the UV map for the body showing up on the blue grid texture. However, it probably can't fit fully on your screen, so click Fit Selection over on the right to zoom out and see the whole thing. Go ahead and also click the checkbox for "Redraw" which will make any changes show up on the 3D view as you make them.<br style="clear:both" /> | |
− | + | [[Image:Unimesh2-23.jpg|right|300x300px]]6. '''Examine UV Map:''' Just take a moment while you're here to look at the UV map before we start making any changes. This is a pretty standard, straightforward UV map. You have the back over on the left, the front on the right. The arms (front and back) are on either side of the body, with the legs below that. The feet are split into two pieces and are at the very bottom, with the inner part of the foot (containing the big toe) on the right side, and the outer part (containing the rest of the toes) on the left side. UV maps may vary some, but most of them will look basically like this. | |
− | + | If you look at the top of the legs, you'll see there's a gap in the UV map between the bottom of the skirt and the top of the legs. Remember how we deleted a row from the top of the leg in Part 6? That's where the top row of leg would be if it were still in the mesh. | |
− | = | + | The image to the right is labelled with what parts are what, and point out that gap. If you're confused as to what part is what, take a look at the image.<br style="clear:both" /> |
− | |||
− | |||
− | |||
− | |||
− | |||
==Questions? Comments?== | ==Questions? Comments?== |
Revision as of 20:39, 14 August 2008
Tutorials by Category | |
---|---|
Body Shop: Recolouring | Meshing | Modding | Sims Objects: Object Creation | Recolouring Building: Building | Landscaping | Walls & Floors | Other: Careers & Majors | Hacks and Game Mods |
Contents |
Overview
Unimesh 2 - Editing and UV Mapping | |
---|---|
Base Game | |
Author | HystericalParoxysm |
What this tutorial will teach you
This tutorial builds on the techniques learned in the Unimesh 1 - New Mesh Basics tutorial. Once you have learned the skills taught in that tutorial (creating a new mesh, doing a simple edit on it in Milkshape, and getting it to show up properly in Body Shop/in-game), you can begin doing more complex edits as explained in this tutorial.
Here, we will be doing a simple edit to a dress: making the hem longer, and flaring the bottom of the skirt. We will also be learning how to adjust the uv/texture mapping so that the textures are not distorted on our edited mesh. We will also learn how to do the same edit to the fat morph at the same time when doing simple edits.
Warning!
Meshing is difficult! Meshing is hard! Meshing is time consuming and frustrating! This is not an easy process. Though everything will be fully explained, it's possible that you may miss something or it won't work the first time. If that happens, start over from the beginning after taking a break and try again. There is no easy 5 minute meshing technique that we're not telling you - this really is the easiest, best way to do it.
If you get completely stuck, scroll to the bottom - there's a "Having trouble?" section which goes over common mistakes and errors you might get in doing this tutorial, and how to fix them.
Prerequisites
You MUST have prior knowledge of creating clothing using Body Shop. This is not for absolute beginners at Body Shop - experience in creating clothing recolours/retextures will serve you well going forward. We will not be going over how to make new textures or change colours on your new mesh - you should already know all that stuff! If you do not have that preexisting knowledge, do not continue with this tutorial. Instead...
See: Body Shop Recolouring Tutorials
You MUST also have gone through the first Unimesh tutorial! This tutorial builds on the techniques learned in the first tutorial. This tutorial will -not- teach you the basics of making a new mesh as that is taught in the first tutorial - I will be mostly skipping over those parts as you should already know how to do them. If you have not already completed the first Unimesh tutorial, you -must- do that tutorial before attempting this one or you will be completely and utterly lost.
See: Unimesh 1 - New Mesh Basics
Special Thanks
This tutorial is a revised version of Tiggerypum's Unimesh 2 tutorial. It utilizes updated tools to make the editing easier, but still does the same project and builds on what she wrote originally. Many thanks to Tig for her original tutorial, and everything she's taught me about meshing.
What you will need:
You must download and install all of the following programs and utilities before beginning this tutorial. If you are having any trouble or questions on installing them, please look for info on their individual sites/pages.
You SHOULD already have most of these from the first tutorial (except Vertex/Normal Data Merge and the Blue Grid), but in case you've uninstalled them or whatever since, here's the links again:
- Milkshape - Current version as of this writing is 1.8.3. We will be doing our mesh editing in Milkshape. This is not a free program! It will allow you to use it free for 1 month, but after that you will need to pay $25 to register it. It is worth the money. There is no version of this tutorial using free programs - nothing else uses Unimesh and allows you to make major edits for such a low price.
- Unimesh Plugin for Milkshape - Current version as of this writing is 4.09. This plugin allows proper import/export of Sims 2 meshes into Milkshape. Unimesh is free. Read the included "UniMeshReadMe.txt" file for installation instructions.
- SimPE - Current version as of this writing is 0.68. Get whatever the latest version is. SimPE allows creation of a new mesh package linking the mesh to a recolour file.
- Needed Software to Run SimPE - This is listed as a heading on the SimPE download page with links there. You will need both the Microsoft .NET Framework Version 2.0 (this is different from .NET 1.0!) and Managed DirectX 9c (this is different from regular DirectX!) - make sure to download and install both or you will get errors on the SimPE parts.
- Vertex Data Merge/Normal Data Merge Plugins for Milkshape - A great little plugin by Wes_H which will make the edit we're doing much, much easier. You should also follow Wes's instructions on how to set up the plugins as shortcuts in Milkshape before continuing as it will be much easier to use them as keyboard shortcuts than through the menu.
- Tig's Blue Grid - This is just a .bmp image which we'll be using for the UV mapping part. You can get it from that link there - it is attached to the end of the first post, in the "templates-patternsforuvmap.zip" file.
- 1-3 Hours to complete this tutorial, assuming you do it right the first time. It may be quicker or slower depending on how fast you read and work.
The Tutorial:
You may click on any image below for a larger version. Images are shown thumbnailed here for faster page loading, but all images will display full-size if clicked.
Part 1 - Create a Recolour
As in the first tutorial, we will need to start by creating a recolour in Body Shop of the base mesh we want to edit. We will then use this recolour to find its associated mesh, and will link to it for our modified mesh in subsequent steps.
As with the first tutorial, please follow along using the same mesh that is shown here - it will make it much easier for you to complete this tutorial. Do not attempt to use a custom mesh - please use the original Maxis mesh which is being used here.
1. Run Body Shop, and Make a New Project: Open Body Shop, and once it's open, click Create Parts - Create Clothing - Everyday. Then make sure to select the teen female age group - we're going to be editing a teen female dress this time. Scroll toward the end of the catalog until you find the dress pictured. It comes in several clothing options, but I'm choosing the blue one with babies, mainly because I find it confusing and creepy, but also because it will be good to show whether our texture is distorted in subsequent steps. Click on the button at the bottom to Export Selected Textures.
2. Name Your Project: Let's call this project "TutorialDressTwo".
3. Tooltip and Import: Type a tooltip for your project. "TutorialDressTwo" is a good tooltip. You can leave it as everyday clothing. Then click the button at the bottom to Import to Game.
4. Close Body Shop.
Okay, now we have our recolour ready...
Part 2 - Create a Folder
Again, as we did in the first tutorial, we're going to be editing, importing, and exporting a lot of different files, and we need to keep them organized. So as you did in the first tutorial, make a new folder on your computer's Desktop, or whereever you can easily find it. Don't use the same folder as the first tutorial - create a new, empty folder so we can keep all our parts straight.
Call your new folder "TutorialDressTwo Files".
Part 3 - Assemble a Mesh Package
Now it's time to put together our mesh package, using the mesh used by the recolour we just made. This should be familiar from the first tutorial, but here's a quick overview.
1. Run SimPE.
2. Create a New File: File - New to create a new, empty file.
3. Run PJSE Mesh Tool: Tools - PJSE - Body Mesh Tool - Extracting Stage
4. Browse for Your Recolour: In the popup you get, click on the Browse button. In the next popup, browse to your My Documents\EA Games\The Sims 2\SavedSims\ and find your recolour file - it should be named something like "5f9567f5_TutorialDressTwo.package" - Select it and click Open. PJSE Body Mesh Tool will find the four parts for your mesh and put them in your new file. You will see a GMDC, GMND, SHPE, and CRES once it's finished.
5. Fix Integrity: Make this mesh file a new, unique mesh by giving it a name in Fix Integrity. Tools - Object Tools - Fix Integrity. In the box at the top, type a name for your project. Call it "TutorialDressTwo_YourNameHere" and then click Update. The entries should all change names. Then click OK. You now have a new, unique mesh file.
6. Save Your Mesh: File - Save As and save your mesh file into your "TutorialDressTwo Files" folder you made in Part 2. Call your file "TutorialDressTwo_MeshFile.package" so you know exactly what it is.
Part 4 - Link the Mesh to the Recolour
And as in the first tutorial, we now need to link our new, unique mesh made in Part 3 to the recolour file we made in Part 1.
1. Open the Recolour File: In SimPE, open the recolour file you made in Part 1. Remember, it should be in My Documents\EA Games\The Sims 2\SavedSims\ and called something like "5f9567f5_TutorialDressTwo.package".
2. Look at the 3DIR: Select the 3DIR (3d ID Referencing File) in the Resource List. This is the resource which contains the information that links your recolour file to your mesh.
3. Use PJSE Body Mesh Tool - Linking Stage: With the 3DIR still selected, click on Tools - PJSE - Body Mesh Tool - Linking Stage. Click OK to the warning message popup you get. In the Open dialog, titled "Select Custom Mesh Package" browse to your "TutorialDressTwo Files" folder you made in Part 2. Select your mesh file that you made in Part 3., which is called "TutorialDressTwo_MeshFile.package" and click Open. You'll get a popup telling you to not to commit, but to select any other resource. Click OK, and click on any other resource besides the 3DIR in the Resource List.
4: Save: File - Save to save changes to your recolour file. Your recolour file should now be linked to your new, custom mesh.
5: Copy Mesh File to Downloads: Copy your "TutorialDressTwo_MeshFile.package" file from your "TutorialDressTwo Files" folder to your My Documents\EA Games\The Sims 2\Downloads folder.
6: Check in Body Shop: Run Body Shop, go to Create Parts - Start New Project - Create Clothing - Everyday - Teen Female. Your recolour should be the first thing showing up, with your "TutorialDressTwo" tooltip. When you select it, it should look like the same dress it was before. That means your linking has worked properly. Close Body Shop.
Part 5 - Extract the 3D Model
The last step before editing is to extract the GMDC (mesh file) so we can import it into Milkshape.
1. Open Your Mesh File in SimPE: Open SimPE if it's not already still open and browse to your "TutorialDressTwo Files" folder. Select your "TutorialDressTwo_MeshFile.package" file and open it.
2. Extract the GMDC: In the Resource List, right-click on the GMDC resource and choose Extract.
3. Save the GMDC: Save the GMDC to your "TutorialDressTwo Files" folder. Call it "Extracted_GMDC" - then close SimPE.
Part 6 - Edit the Mesh in Milkshape
Now, we're going to edit the mesh. This time, we'll be lengthening the skirt, and making it flare outward. We'll also need to edit the UV Map to compensate for that edit, so the textures aren't distorted. Let's get started...
1. Run Milkshape.
2. Use Unimesh Import: Make sure Smooth All (on the Groups tab) is still unchecked. Then File - Import - Sims 2 UniMesh Import v4.09. Browse to your "TutorialDressTwo Files" folder and select your "Extracted_GMDC.simpe" file. Click Open.
3. Answer Popups: You will get two popups as you did in the first tutorial. The first is "Create blend groups?" Say Yes - this will import the fat morph. The second popup will say "Some Skin Weights do not equal 100%. Do you want these corrected?" Click Yes to this one to fix any incorrect bone assignments.
4. Check Morphs: Click on the Groups tab. You will see that you have two morphs this time - "body" will be listed first - this is the normal body used by fit/normal fitness stages. The second is "~00MORPHMOD.1" which is the fat morph, used when the sim gets fat. For now, we're going to leave both morphs visible.
5. Zoom In: We're going to be editing the hem of the skirt, pulling it down more toward the knees. To do that, we're going to remove a row of polygons in the leg. So we need to zoom in on the area we'll be editing. On the Model tab, click Select, and then make sure Vertex select mode is on. Draw a box around the bottom of the skirt and knee area in the side view. It doesn't have to be exact - just make sure you've got the top of the leg selected too. Then right-click in the side view and choose Frame Selection to zoom in on that area.
6. Select Row of Vertices: Now, still on Select mode, change from Vertex to Face, and select the "By Vertex" option. This will allow us to select polygons by selecting the vertices at their corners. Make sure "Ignore Backfaces" is unchecked. Now drag a box around the first row of vertices on the leg under the hem of the skirt to select them. The polygons above and below this row will turn red to indicate they're selected. That's because the polygons above and below are all connected to that row of vertices.
7. Deselect Unwanted Polygons: We don't want to remove all of those selected polygons, however - just the top section above the row of vertices we selected. So we need to deselect the bottom part. To do that, press and hold the Shift key and right-click and drag a box around the bottom row of vertices connected to the red, selected part (above the knee). If you need to move the view down a little bit, you can CTRL-click and drag first.
8. Double-Check Selection: When you've deselected the bottom row, you should just have one section of polygons selected - the very top part of the leg. You can look in the other view panes to confirm that you have just that part selected. If you've made a mistake, just start over selecting until you are sure you have only the top section of the leg selected.
9. Delete Selection: Now, press the Delete key on your keyboard (or Edit - Delete Selection). The top part of the leg which you have selected will disappear, leaving a gap between the skirt and the remaining part of the leg. This may look strange for the moment, but this is actually what we want to happen.
10. Select Bottom of Skirt: On the Model tab, click back onto Vertex select mode. Then, drag a box around the bottom part of the skirt, which will select both the very bottom edge of the skirt, and the "modesty cap" part underneath.
11. Move Down Bottom of Skirt: On the Model tab at the top, click Move mode.Toward the bottom of the Model tab, you'll see three boxes, with three buttons underneath: X, Y, and Z. Click on X and Z so they are both unselected, leaving Y as the only button there still pressed down. This will make it so when you move your selection, it will only move on the X axis (up and down) and not on the Z axis (front and back) or X axis (left and right).
Then in the side view, with the bottom part of the skirt still selected, click and drag to move the bottom of the skirt down till the bottom of the hem is just below the top of the leg.
12. Check Moved Bottom: In the side view, your moved skirt bottom should look basically like the picture shown. If you look in the 3D view, you'll see that the bottom of the skirt almost matches up with the top of the legs, but there's still some small gaps around the edges. We need to fix those gaps so everything matches up perfectly.
13. Save: Let's go ahead and save our MS3D document. We have a lot of steps still to go, and if we periodically save our work, we won't lose anything we've worked on if Milkshape crashes, the power goes out, or our cat runs across the keyboard. File - Save As and save your file to your "TutorialDressTwo Files" folder. Call it "TutorialDressTwo-1.ms3d"
14. Hide Fat Morph: On the Groups tab, select the "~00MORPHMOD.1" morph (your fat morph) and click Hide. This will make your "body" morph (your normal, regular morph) the only visible part. We are going to fix the gaps on each of them separately, so we need to have the "body" group as the only one showing for now.
15. Position Camera to View Gaps: Now, we need to position things right so we can see where the gaps are, and fix them easily. The best way to do that is in the 3D view, as it lets us see the gaps in the best way. Position the camera in the 3D view so you're looking at the front of the dress from above, looking down somewhat. Then shift-click and drag to zoom in until the camera goes inside the dress, looking down on top of the legs. Remember the Milkshape movement controls from the first Tutorial?
- CTRL-click and drag to move up, down, left, and right.
- SHIFT-click and drag to zoom in and out.
- Click and drag to change the angle of the camera in the bottom right (3D view pane).
- If you get lost and lose your model, don't panic! Right-click in the pane and choose Frame All.
You should be able to clearly see the gaps between the bottom of the skirt and the top of the legs once you get your camera positioned properly, as shown in the bottom image to the right.
16. Select Matching Vertices: If you look closely at the top of the leg and the hole in the bottom of the skirt, you'll notice that they both have the same number of vertices going around, and that they are roughly positioned in the same way. What we're going to do is select each pair of vertices and put them in the same place, one by one.
On the Model tab, you should still be in Select mode, with Vertex selected. Look closely at the 3D view, and identify the first set of matching vertices. It may be a bit hard to see them, so if you want to make the 3D view fill the Milkshape window, right-click in the 3D pane and choose "Maximize" at the bottom of the menu. In order to select in the 3D view, you'll have to hold down ALT and click. Don't drag around the vertices (as you may accidentally grab vertices in the feet or skirt hem underneath too) - just ALT-click the first vertex, and then ALT-SHIFT-click to select the second of the two vertices as shown in the image to the right. They will turn red to show that they are selected.
Un-Maximize the 3D view and check to make sure you don't have any other vertices in the dress selected. The only red spots should be in the very bottom of the skirt.
17. Vertex Data Merge: Now we want to match up the location of those two vertices so they are in exactly the same place. To do this, we're going to use Wes's Vertex Data Merge plugin, which you should have gotten before beginning (in the What You Will Need section). You also should have set up the Milkshape shortcuts as advised so you can just press a key and have it do what you want it to.
With those two vertices still selected, press the C key on your keyboard. If you have the shortcuts set up right, the vertex selected in the top of the leg should jump over to the same spot as the vertex in the bottom of the skirt. If you -don't- have the shortcuts set up right, you can still use the plugin as long as you installed it properly by going to the Vertex menu and selecting Sims2 UniMesh Vertex Data Merge V4.09. That handy little plugin makes it very easy to match up seams!
18. Save: Now is a good time to save your work in case you mess up at all on the next step. File - Save As and save your file as "TutorialDressTwo-2.ms3d" - don't just File - Save and save over the original. Get in the habit of making numbered (incremental) saves, so if you realize you've messed up somewhere along the way, you don't have to start over from the beginning.
18. Fix Remaining Gaps: Now you'll repeat steps 16 and 17 for the remaining vertices around the top of both legs. ALT-click/ALT-SHIFT-click to select pairs of matching vertices, and C (or Vertex Data Merge from the Vertex menu) to match up each set, one by one. If you need to reposition the camera to see the pairs better, you can do so with the camera controls as explained in step 15. Make sure after selecting each set that you don't have anything extra selected!
It can help sometimes to switch to Wireframe view if you're having trouble seeing what matches up with what. To do that, right-click in the 3D window, and at the top part of the right-click menu, you'll see four options: Wireframe, Flat Shaded, Smooth Shaded, and Textured. Select Wireframe to go into Wireframe view. You can always right-click again and go back to Textured to get out of Wireframe.
When you're done matching up your gaps, your mesh should be nice and gap free. Make sure to check from all angles both on the inside of the skirt, and on the outside. If you've messed up anywhere (like accidentally grabbed part of the skirt hem too) then either Undo until it looks right again, or go back to the file you saved in Step 18 and start that part over.
19. Save: Again, File - Save As to save your changes. This one will be "TutorialDressTwo-3.ms3d"
20. Hide Normal Morph, Unhide Fat Morph: On the Groups tab, select the "body" group and click Hide. It should disappear, leaving nothing showing. Select the "~00MORPHMOD.1" group (fat morph) and click Hide to unhide it. It should appear, and be the only group showing.
21. Temporarily Rename Fat Morph: There's a little quirk of the Vertex Data Merge plugin that won't let you use it on a fat morph normally. There's good reasons for this, but we need to use it to fix the fat morph's gaps. We need to rename the fat morph for now, so the plugin doesn't think it's a fat morph. On the Groups tab, select the fat morph. There will be a blank down below with the fat morph's name. Click in that box, and just delete the first character of the name, the ~ and then click Rename. You'll see the name change in the list of groups up above. Now you can use Vertex Data Merge on the fat morph without it complaining.
22. Fix Gaps on Fat Morph: Repeat steps 15 through 18 to fix the gap on the fat morph the same as you did for the normal morph. Make sure to double-check your work when you're done to make sure you've done it properly. If you mess up anywhere, Undo until it looks right, or go back to the file you saved in Step 19.
23. Rename Fat Morph: We need to make sure the fat morph has the name it originally had, or it won't be read properly. Go back to the Groups tab, select the fat morph, and in the little box below, click and put the ~ back in. On a QWERTY keyboard, the ~ will be to the left of the 1 - you will have to press Shift to get it to work. Or you can just copy-paste the proper name from this tutorial. Click Rename and you'll see it goes back to being called "~00MORPHMOD.1" as it should be.
22. Save: Again, File - Save As. This time, call it "TutorialDressTwo-4.ms3d" - sensing a pattern yet?
23. Unhide Normal Morph: On the Groups tab, click on the "body" group (normal morph) and click Hide to unhide it. You should now have both the normal and fat morphs showing at the same time.
24. Select Bottom of Skirt: On the Model tab, Select should be pressed, and Vertex mode selected. In the side view, drag a box around the very bottom row of vertices in the skirt. You'll have to be careful to just grab this bottom row, and nothing in the leg. If you do happen to grab something in the leg, you can SHIFT-right-click to deselect those vertices. Double-check that you have only the bottom of the skirt, the ring around the very edge of the hem selected, before continuing. Looking at the 3D view is a good place to double-check.
25. Flare Bottom of Skirt: On the Model tab, click on Scale. Down toward the bottom, you'll see three blanks, with buttons underneath for X, Y, and Z. Click on Y to deselect it. Then in the blanks above X and Z, type "1.25" - these settings will make it so we scale by 1.25 on both the X (left and right) and Y (front and back) axis, but not on the Y (up and down) axis. When you have the settings set up properly, click Scale once. This will flare the skirt outward.HINT: When you're scaling something and you don't know exactly how much you want to scale it by, you can always scale multiple times. For example, if you know you want the skirt flared but not by how much, you can always choose to flare it by 1.1 or 1.05 and click Scale multiple times until it's the right size. Same with if you want to un-flare something - you can use .99 or .95 to do it by just a little bit at a time.
26. Save: Again, File - Save As. This time, call it "TutorialDressTwo-5.ms3d"
27. Export GMDC: File - Export - Sims 2 UniMesh Exporter V4.09. Browse to your "TutorialDressTwo Files" folder, and save your edited GMDC. Let's call it "Edited_GMDC-1" - remember, incremental/numbered saves!
28. Replace 3D Model in Mesh File: In SimPE, open your "TutorialDressTwo_MeshFile.package" and click on the GMDC in the Resource List to select it. Then, in Plugin View, select the line that says "Filename" and copy it. Right-click on the GMDC in the Resource List and choose Replace. Select your "Edited_GMDC-1.simpe" file in your "TutorialDressTwo Files" folder and click Open. When it asks if you want to reload the resource, say Yes. Paste back the name you copied into the Filename line and then click Commit. File - Save and save your edited file.
29. Copy Mesh to Downloads: Copy the "TutorialDressTwo_MeshFile.package" file from your "TutorialDressTwo Files" folder to your My Documents\EA Games\The Sims 2\Downloads folder. As you have already done this once, you will need to say Yes when it asks you if you want to replace the existing file.
30. Check in Body Shop: Run Body Shop. This time, instead of going to Create Parts, click on Build Sims - Build or Clone Sims, and then click on the first icon, the big green +. Switch to a teen female sim, and click on the Clothing icon along the top to put her in your clothing. It should be the first item showing up under Everyday. With any luck, it should look correct, the way you edited it in Body Shop, with a lengthened, flared bottom to the skirt.
Make sure to also click on the Change Body icon along the left side of the controls to change your sim from fit to fat, to make sure your fat morph is working properly. If all went well (and it should have), you should have a properly working normal and fat morph, with nothing having exploded or gone strange.
You will notice, if you look closely, that the bottom of the skirt is looking stretched - the textures of the babies are elongaged. This is due to the UV mapping - we changed the shape of the skirt, but we haven't changed the way the textures will be applied to it. We'll need to go back into Milkshape and do that, next.
Take a Break: Now that we've got our major mesh changes done, it's a good time to take a little break. Go get a cup of coffee or a glass of water, have a stretch, maybe get a snack, and come back in a bit. Remember when you're doing a long, complex edit to remember to take breaks often - it can be tempting to just sit and work until it's done, but you'll work a lot better and with a clearer head if you go easy on yourself! When you're ready, come back and we'll go on to the rest of the editing - editing the UV map.
Part 7 - Edit the UV Map in Milkshape
Now comes the part that a lot of people get confused on - adjusting the UV mapping.
A UV map (also called a texture map) is what tells the mesh how to apply the flat texture to the 3D shape. When the UV map is correct and done well, it makes the mesh easy to texture - patterns applied to it don't get too distorted by being wrapped around a 3D shape. But when the UV map is incorrect and/or done poorly, it makes the mesh much harder to texture - patterns applied to it get stretched, distorted, or don't work properly.
In the last part of the last step, you looked at your edited mesh in Body Shop, and you should have noticed that the bottom part of the skirt was stretched due to how we moved it. When you change the shape of your mesh, you usually will have to edit the UV map to compensate for those changes. Even if you don't change the shape substantially, it's usually worth it to check your mesh's UV map to make sure it is distortion-free... Some Maxis meshes have surprising amounts of distortion that you can reduce or eliminate if you remember to check your mapping each time you make a new mesh.
1. Open Last Version in Milkshape: If you've closed Milkshape, go ahead and open the MS3D file you saved in Part 6, Step 26 - "TutorialDressTwo-5.ms3d" If you haven't closed it, then you should already have your last version open.
2. Import Blue Grid Texture: Now, we're going to import a texture into Milkshape so we can apply it to our mesh and see just how distorted our mapping is. In the "You will need" section, you should have gotten Tiggy's Blue Grid from the link. If you haven't already, unzip the contents of the file to your "TutorialDressTwo Files" folder.Then, in Milkshape, flip to the Materials tab. Click on the New button toward the bottom. You'll see it creates a new material, called "Material01" in the list. Then, click on the first button labeled <none>.
This will bring up an Open Texture dialog box. Browse to your "TutorialDressTwo Files" folder. You should have unzipped the file to this folder, so you will likely have a subfolder called "templates-patternsforuvmap" - open that folder, and then select the "templatecheckpattern.bmp" within and click Open.
You'll notice the orb under "Material" on the Materials tab will go blue, showing the texture you just imported.
3. Apply Texture to Mesh: Now, switch over to the Groups tab. Select the "body" group, and then press the Select button (it's to the left of the Hide button). You will see the whole "body" group go red in the four view panes. Go ahead and hide the fat morph if it's showing while you're here.
Then flip back to the Materials tab, and click on Assign, below the New button. If your mesh doesn't turn textured in the 3D view, right-click in the 3D view and in the top section where it says Wireframe, Flat Shaded, Smooth Shaded, and Textured, select the last option - Textured. Your mesh should go all blue with a grid in the 3D view, with a rather festive looking red overlay.
4. Identify Distortion: Right-click in the 3D view and uncheck the option for Wireframe Overlay. This will let you see your textured mesh without anything in the way. Now take a look at it in the 3D view. Remember you can right-click and choose Maximize to get the 3D view full screen.
If you take a look at the main body of the dress, you can see that it has a pretty decent blue grid going - the squares are basically square, and don't stretch or distort too much into rectangles anywhere. But down toward the bottom where we pulled down the hem, the squares turn into rectangles and get elongated. The same thing happened with the texture in Body Shop, remember? The texture of the blue babies was stretched and elongated. Any texture you apply to this mesh right now will get stretched in the same way, and the more patterned the texture, the more obvious that distortion would be. This is what we're going to fix on the UV mapping.
5. Texture Coordinate Editor: Click on the Window menu, and then bring up the Texture Coordinate Editor. Go ahead and maximize the window that pops up.
In the dropdown on the right, make sure the "body" group is selected. Because you still had your whole "body" group selected from Step 2, you should now see the UV map for the body showing up on the blue grid texture. However, it probably can't fit fully on your screen, so click Fit Selection over on the right to zoom out and see the whole thing. Go ahead and also click the checkbox for "Redraw" which will make any changes show up on the 3D view as you make them.
6. Examine UV Map: Just take a moment while you're here to look at the UV map before we start making any changes. This is a pretty standard, straightforward UV map. You have the back over on the left, the front on the right. The arms (front and back) are on either side of the body, with the legs below that. The feet are split into two pieces and are at the very bottom, with the inner part of the foot (containing the big toe) on the right side, and the outer part (containing the rest of the toes) on the left side. UV maps may vary some, but most of them will look basically like this.
If you look at the top of the legs, you'll see there's a gap in the UV map between the bottom of the skirt and the top of the legs. Remember how we deleted a row from the top of the leg in Part 6? That's where the top row of leg would be if it were still in the mesh.
The image to the right is labelled with what parts are what, and point out that gap. If you're confused as to what part is what, take a look at the image.
Questions? Comments?
There is a discussion thread for this tutorial which is here: http://www.modthesims2.com/showthread.php?t=296915
Please make sure you've checked the "Having trouble?" section above and re-read anything you're stuck on before posting. Also remember that the discussion thread is -only- for questions directly relating to this tutorial. If you're having trouble with or have questions regarding something else, please post in the main Body Shop Meshing Forum.
Related Links
Tutorials by Category Body Shop: Recolouring | Meshing | Modding | Sims Objects: Object Creation | Recolouring Building: Building | Landscaping | Walls & Floors | Other: Careers & Majors | Hacks and Game Mods