Tutorials:Unimesh 3 - Frankensteining
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 |
Overview
Unimesh 3 - Frankensteining | |
---|---|
Base Game | |
Author | HystericalParoxysm |
What this tutorial will teach you
This tutorial builds on the techniques learned in the Unimesh 1 - New Mesh Basics and Unimesh 2 - Editing and UV Mapping tutorials. Once you have completed the techniques in those tutorials (creating a new mesh, modifying a mesh, editing a uv map, and making a new texture to fit the edited mesh), you will be ready to complete this tutorial.
Here, we will be doing one of the most important and useful edits to a mesh: combining parts of two different meshes. This is generally called "Frankensteining" since it involves things like (as we'll be doing here), chopping the legs off one mesh and sticking them on another.
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 done the first and second Unimesh tutorials! This tutorial builds on the techniques learned in the first and second tutorials. This tutorial will -not- teach you the basics of making a new mesh as that is taught in the first tutorial, nor will it explain many of the functions you were meant to have learned in the second 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. You will also be using your project from the second tutorial as the starting point for this tutorial - so you must have that finished project ready!
See: Unimesh 1 - New Mesh Basics
See: Unimesh 2 - Editing and UV Mapping
Special Thanks
This tutorial is a revised version of Tiggerypum's Unimesh 3 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.
- A graphics editor - For making the recolour at the end. You should already have one of these and be familiar with its functions.
- 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 Base Recolour and Other Recolour
As in the first two tutorials, 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.
Because we are going to be doing an edit of the same dress we did in the second tutorial, you need to make sure to follow along exactly with this tutorial, too - use the same dress, and do the same project!
1. Run Body Shop, and Make a New Project: Open Body Shop, and once it's open, click Create Parts - Create Clothing - Everyday. Then select the teen female age group and select the same short sundress with flats that you selected in the last tutorial. We're going to be using this dress as our base for this tutorial, too. Click on the button at the bottom to Export Selected Textures.
2. Name Your Project: Let's call this project "TutorialDress3".
3. Tooltip: Type a tooltip for your project. "TutorialDressThree" is a good tooltip.
4. Copy Textures: We are going to be using the dress from the second tutorial as a base, so let's go ahead and copy over the textures from that dress onto this one. Open your My Documents\EA Games\The Sims 2\Projects\RetextureDress2 folder and copy the three .bmp files from that folder (body~stdMatBaseTextureName.bmp, body~stdMatBaseTextureName_alpha.bmp, and body~stdMatNormalMapTextureName.bmp) into your newly created My Documents\EA Games\The Sims 2\Projects\TutorialDress3 folder. When it asks if you want to replace the existing files, click Yes to All to replace all three files in the new project folder.
5. Import: Reload the project in Body Shop to make sure it's correct. Your texture will be extending down too far, onto the legs. That's fine - we'll be replacing the mesh with the one with proper UV mapping shortly, and that will fix this. You can leave it as everyday clothing. Then click the button at the bottom to Import to Game.
6. Make Recolour of Other Outfit: Because we're going to be changing the shoes on our outfit in this tutorial, we need to go make a recolour of the outfit with the shoes we want to use. Create a new project, and in teen female everyday clothing, find this outfit with the green top, brown capris pants, and little high heeled shoes with ankle strap.Make a new project of it, call the project "TeenShoes", leave it Everyday, and Import to Game - you don't need a tooltip.
We aren't going to be linking to this recolour - just using the information in it to find the mesh it uses so we can get those cute shoes, and using the shoe textures and alphas from it on our modified mesh. We'll get to that in a bit. For now...
4. Close Body Shop.
Okay, now we have our recolour ready...
Part 2 - Create a Folder
It's always good to stay organized and to keep the files from one project separate from another. So, as before, create a new folder somewhere you can find it, like your Desktop.
Call your new folder "TutorialDressThree Files".
Part 3 - Assemble a Mesh Package
Now, we need to assemble a fresh mesh package using the first recolour we made.
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 "5f84ea86_TutorialDress3.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 "TutorialDressThree_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 "TutorialDressThree Files" folder you made in Part 2. Call your file "TutorialDressThree_MeshFile.package" so you know exactly what it is.
Part 4 - Link the Mesh to the Recolour
Again, we're going 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 "5f84ea86_TutorialDress3.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 "TutorialDressThree Files" folder you made in Part 2. Select your mesh file that you made in Part 3., which is called "TutorialDressThree_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 "TutorialDressThree_MeshFile.package" file from your "TutorialDressThree 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 "TutorialDressThree" 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 Shoes 3D Model
Now is the part we usually extract the 3D model (GMDC) from our newly cloned mesh file. However, we already have a copy of that outfit from the second tutorial, and we're going to be using our modified mesh from the second tutorial anyway. What we want to do instead is get a copy of the 3D model for the -other- outfit we recoloured in the first step - the one with the cute shoes.
1. Create a New File: Still in SimPE, 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 for the outfit with the shoes - it should be named something like "5fcb4d96_TeenShoes.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. Extract GMDC: We just need to get the 3D model from this file out - we're not making a new, unique mesh package and linking it to anything. So right-click on the GMDC and choose Extract. Save the GMDC to your "TutorialDressThree Files" folder and call it "TeenShoes_GMDC"
6. Close SimPE: Close SimPE without saving the new file.
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" from your "TutorialDressTwo Files" folder 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.
7. Select Bottom Rows: Over on the right in the Texture Coordinate Editor, click on Select. Click once anywhere on the UV map to deselect everything. It will all go white, where it had been red before. Then, drag a box around the bottom two rows of the main body, both front and back (as shown in the image). Those two rows of vertices will turn red to indicate they are selected.
8. Drag Down Bottom Rows: Now, over on the right, click the Move button. Then check the box for "Lock X" - this will let us move the selected parts up and down, but not left and right. Then, on the UV map itself, click and drag downward to pull those bottom rows down. You'll want them to be close to the top of the legs, but not touching. Note that there is a small bit that sticks out the bottom on the left side, so make sure that part is still above and not touching the tops of the legs. When you've got it positioned properly, it should look like the image to the right.
9. Fine Adjustment: Click on the Maximize button at the top of the Texture Coordinate Editor window - because it's already Maximized, this should un-Maximize it. Then position and scale the window so you can see both your selected rows on the UV map, and the bottom of the dress in the 3D view. The Texture Coordinate Editor window will always be on top, so you can adjust the view in the 3D view below it without minimizing the Texture Coordinate Editor.Now, click and drag in the Texture Coordinate Editor window up and down. Because "Redraw" is clicked, you will notice the grid at the bottom of the dress change as you move those rows. Adjust the selected rows in the Texture Coordinate Editor until the grid at the bottom of the dress is as square as possible. This will be similar to the positioning you did in Step 8, but it may be a little bit higher or lower. Again, make sure that the selected parts don't overlap or intersect the top of the legs.
When you're satisfied with the positioning of that row, just close the Texture Coordinate Editor by clicking on the X at the top right. You don't have to press anything to save the changes in it before closing it - the changes happen to your document automatically as you work in it.
NOTE: You don't have to do the same changes for the UV map for the fat morph. Why? Because any changes you make to the UV map for the normal "body" automatically work on the fat morph. This also holds true for the pregnant morph as well, for meshes that have them too.
10. Save: File - Save As and save your document with a new name. Call it "TutorialDressTwo-6.ms3d"
11. Export Edited GMDC: File - Export - Sims 2 UniMesh Export V4.09. Save your edited file in your "TutorialDressTwo Files" folder as "Edited_GMDC-2"
12. Replace 3D Model in Mesh File: In SimPE, open your "TutorialDressTwo_MeshFile.package" from your "TutorialDressTwo Files" folder 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-2.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.
13. 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 before, you will need to say Yes when it asks you if you want to replace the existing file.
14. Check in Body Shop: Load Body Shop, and again, go to Create Sims, make a new teen female sim, and put your dress on her. The bottom of the dress should be fixed now - no more distortion... but you'll notice that skin colour is showing up on the bottom of the dress. This is because we pulled down the UV map, so now the map is covering part of the texture which used to be for the legs. You can also look at the fat body and see that the same change has happened to its UV map, despite not editing its UV map in Milkshape. In order to fix this, we'll have to make a new texture to fit our modified UV map.
Congratulations! You have just completed a substantial edit to a mesh including adjusting its UV mapping! Good job!
Part 8 - Make a New Texture to Fit the Modified Mesh
Now that we have a nice new mesh with a distortion-free UV map, we need to make a new texture to fit the new mesh. That old texture with the creepy blue babies just won't do!
You should be familiar with recolouring and retexturing from your experience with Body Shop before you started meshing, so I'm only going to explain the very basics about actually making the texture itself and will be focusing more on how you need to make the new texture to fit your modified UV map and mesh.
1. Get UV Map: You should still have Milkshape open from your editing the UV mapping. If you don't, reopen it, and open your last saved file, "TutorialDressTwo-6.ms3d". Click on the Groups tab, click on the "body" group in the list, and then click the Select button. The "body" group will go red in your views to indicate it's selected. You have to do this to get it to show up in the Texture Coordinate Editor.Bring up the Texture Coordinate Editor, and select the "body" group from the dropdown. Then click "Fit Selection." It should zoom out so you can see the whole body from neck to toe.
However, there's probably still a little edge that we can't see, and in order to create the best texture possible to fit the UV map exactly, we need the whole map. Look at the little box above the "Fit Selection" button. It should have a number in it. Mine says 0.83 - yours may be higher or lower depending on your computer's screen resolution.
I'm going to change mine to 0.8 which should give me a slightly more zoomed out view of the UV map. You change yours to a similarly slightly smaller number, and then click Scale. It will zoom out a bit. You can change the number and click Scale again if you need to zoom out more. You can also CTRL-click and drag if you need to move the UV map a little bit. Get the UV map centered in your view, with grey showing around all the edges. The grey around the edges indicates we have the entire UV map, with nothing cut off around the edges.
With the entire UV map showing in the Texture Coordinate Editor, press Print Screen (or Prnt Scn) on your keyboard. It should be above the Insert and Delete keys. This will copy the current screen to your clipboard - basically, taking a screenshot.
2. Paste UV Map: Now, you need to bring up whatever editor you use for making graphics. I'm using Photoshop CS3, but you can use Paint Shop Pro or whatever program you're comfortable with. You should already have been using a graphics editor before now to make recolours in Body Shop, so I'm not going to tell you how to do every little thing here.
Create a new, blank document the same size as your screen resolution - my resolution is 1440x900, so I'll make a new document at that size. Yours may be 1024x768, 1280x1024, or some other similar sort of number.
With the new document made, I'm going to Edit - Paste (or CTRL-V) to paste the contents of my clipboard (the screenshot I took) into it.
3. Crop UV Map: Now, use the rectangle select (or rectangular marquee) tool to select just the blue UV map part of your image. Make sure to get right up to the edge, grabbing only blue, no grey. Then crop your image so all of the extra stuff around the edges including all the grey is removed, so all you have left is just your UV map with the blue background, and nothing else.
4. Resize UV Map: Now, resize your document to 1024x1024. This is the same size as used by textures in Body Shop, and is the right size for a full body adult UV Map.
5. Save UV Map: Go ahead and save your document as a .bmp file in your "TutorialDressTwo Files" folder. Call it "TutorialDressTwo_UVMap.bmp" so you know what it is. You can always refer back to this UV map if you ever want to retexture your dress in a different way.
6. Close Milkshape: You can close Milkshape if you still have it open. We won't be needing it anymore.
7. Make a New Project in Body Shop: You should still have Body Shop open. Exit out of the sim stuff if you're still in there, and create a new project (Create Parts - Start New Project - Create Clothing - Everyday - Teen Female) by selecting the dress we made previously, with your TutorialDressTwo tooltip on it, and messed up bottom. You can call this project "RetextureDress2."
8. Resize Alpha: Open the alpha file (body~stdMatBaseTextureName_alpha.bmp) from your My Documents\EA Games\The Sims 2\Projects\RetextureDress2\ folder in your graphics editor.Select all, copy, and paste it as a new layer on top of your UV map. Lower the opacity on the alpha layer until you can see the UV map through it. You should see that the solid white alpha parts for the front and back of the dress don't go low enough to cover the very bottom edge of the dress.
Select the solid white at the bottom of the alpha and pull it down so it covers the parts you pulled down on the uv map on both the front and the back. Remember that there's a little rectangle in the middle of the back you need to make sure to select and pull down, too.
9. Check Alpha: Change the alpha layer on your UV map back to 100% opacity. Copy it, and paste it back into the actual alpha document (body~stdMatBaseTextureName_alpha.bmp) which should still be open. Combine the layers if necessary, and save over the original alpha file.
Then reload the project in Body Shop. You should see that the grey/skin part at the bottom of the skirt has changed now. It's turned solid black, but now it's using the texture, rather than turning into skin, which is what we want.
10. Fix Texture: Because the original texture for this is sort of creepy, I'm going to do a simple retexture of the dress. I've found a nice basic floral texture at The Inspiration Gallery which will look good on this sundress. You can open the actual texture itself (body~stdMatBaseTextureName.bmp) from your My Documents\EA Games\The Sims 2\Projects\RetextureDress2\ folder and paste it on top of the UV map on its own layer, same as you did with the alpha. That way, you can use the existing shoe textures, and any parts of the texture (like the edging around the top, and the straps) as a guide for making your new texture.
Make sure to extend the texturing for the bottom of your dress lower than the original texture, following the bottom of the dress on the UV map. Also, note that the very bottom part of the dress is actually the "modesty cap" - the underneath part that keeps you from seeing up the sim's skirt (and seeing that there's no legs under there!). Don't extend your texture down onto this - it's usually best to just texture that solid. If you look at the image to the right, you'll see both my actual texture (top) and it showing over my UV map (bottom).
Be sure to save a layer-separated version of your texture (like a PSD) when you're done so if you want to make changes later, you can.
NOTE: Exactly how to do all this editing is, again, something you should already know how to do. You're just using your new UV map as a guide to see where to put everything. If you're having trouble with editing your textures or are getting lost on this part, then you probably need to go refresh your skills on making recolours/retextures of clothing.
11. Fix Bump Map: Don't forget to fix your bump map too! Open the bump map file (body~stdMatNormalMapTextureName.bmp) from your My Documents\EA Games\The Sims 2\Projects\RetextureDress2\ folder in your graphics editing program and bucket fill 50% grey (RGB 128.128.128) into it to make a neutral bump map. This simple outfit really doesn't need a bump map.
12. Finish Project: Reload your project in Body Shop and make sure everything looks good. When you're ready, give your project a tooltip and click Import to Game to finish the project.
Yay! Now that you have a new texture made for your outfit, you're almost done! Take a deep breath, and let's do the last part...
Part 9 - Test In-Game
Now comes the moment of truth - the real test... in-game testing! While your outfit may look wonderful in Body Shop, it's always a good idea to test your work in-game before you decide that you're done. The more complex your edits, the more important this becomes - there can be issues that just don't show up in Body Shop that will be obvious when you carefully test in-game.
HINT: It's always best to test your work on an actual lot rather than in Create a Sim, so you can make your sim animate in a variety of ways to get a really good idea of how your mesh moves. You can make a test family for this purpose and put the clothes on them in Create a Sim, but why make extra sims just for testing to clutter up your neighborhood? Instead, grab yourself a hack that will let you buy clothes at home (so you don't have to send your sim to a community lot) like the InSIMenator and put it in your Downloads folder before loading the game.
1. Load a Lot: Load a lot with a teen female sim. I always use the Pleasant lot in Pleasantview if I'm testing teen stuff, since it has two teen females already living there I like using Angela specifically because she's quite playful which can be useful for this.
2. Check Your Settings: It's important you have your game's settings turned up so you can actually see your creation properly. Before continuing, go into the game's graphics settings and make sure both "Sim/Object Detail" and "Texture Detail" are set to high. Even if you have a crappy graphics card, you should be able to do this at least temporarily, long enough to test.
3. Buy the Outfit and Change Into It: Use your buy-at-home hack to buy your new dress - this is easy with the InSIMenator as you can do it all on the Wardrobe Adjuster - buy the outfit, plan the outfit, and change into it too. If you didn't get a buy-at-home hack, you'll need to send your sim to a community lot to buy the outfit, come home, and change into it. Plan Outfit on a dresser (you may have to buy a dresser too!) to change your sim's everyday outfit, and then change into it.
4. Test Thoroughly In-Game: Now, have your sim do a variety of animations in your outfit. Walk, run or skip. Dance. Play on the couch. Sit down on a couch. What you mainly want to look at with this mesh is any gaps that might appear between the bottom of the skirt (the "modesty cap") and the legs. You may notice some clipping of the sim's hands into the skirt, or the skirt into the couch when you have her sit - that's normal. If you notice any problems with your mesh or textures, you can always go back and edit them, and then try again.
Hopefully, everything went well, and you have a nice new working mesh with no major issues! Yay! Congratulations! Go have some cake!
Important Note
This tutorial shows how to make a small change to a skirt by removing a row of polygons in the leg and joining the skirt to the new top of the leg. This works because it is a relatively small edit - lengthening a short skirt into a slightly longer short skirt. It also works because the number of vertices in both seams to join (the holes in the underside of the skirt) and the top of the leg that's left after deleting are the same. This same technique could be applied to similar small edits - lengthening shorts or the bottom of pants, making a long skirt into a longer skirt, or making a sleeve a bit longer, as long as the two parts to join have the same number of vertices around.
However, this technique will NOT work on larger edits. You cannot use this same technique to, for example, make a short skirt into a long skirt, a short sleeve into a long sleeve, or shorts into long pants. The animations on such an edit would be extremely incorrect - the lengthened down part would be too stiff due to lack of vertices for it to flex with, and the bone assignments would be wrong, so it would move wrong in-game.
In order to do more substantial edits such as those mentioned above, you will need to learn to combine parts of different meshes together. That is covered in the next tutorial.
Homework
Now that you've edited a skirt, try editing another similar outfit. Suggested is the adult male swim trunks - try lengthening them so they're just above the knee rather than mid-thigh. Remember to edit all three morphs - normal, fat, and pregnant, and to adjust the UV mapping on the normal morph to fix the distortion caused by lengthening the shorts. You'll need to make a new texture for them, too, and then make sure to test in-game when you're done!Having trouble?
In a perfect world, everyone would follow this tutorial word-for-word and do everything just right and never have any trouble. But sometimes things go wrong. So here's a list of common problems and mistakes people make, and the most likely fixes.
Body Shop Shows Wrong Dress
If you are getting this in Part 4, Step 6:If you are getting this in Part 6, Step 30:
- Did you forget to put your "TutorialDressTwo_MeshFile.package" in your Downloads folder before running Body Shop?
- Something may have gone wrong with the linking. Go over the linking parts again.
If you are getting this in or Part 7, Step 14:
- Did you forget to put your "TutorialDressTwo_MeshFile.package" in your Downloads folder before running Body Shop, making sure to replace the existing file already there?
- Are you sure it's actually showing the wrong dress? Remember, the thumbnail will be wrong, but clicking on the dress should show you the right outfit.
- Maybe you accidentally replaced your GMDC with the original GMDC in Part 6, Step 28.
- Maybe you forgot to click Commit after replacing your GMDC in Part 6, Step 28.
- Maybe you forgot to save your edited file after replacing the GMDC in Part 6, Step 28.
- Did you forget to put your "TutorialDressTwo_MeshFile.package" in your Downloads folder before running Body Shop, making sure to replace the existing file already there?
- Are you sure it's actually showing the wrong dress? Remember, the thumbnail will be wrong, but clicking on the dress should show you the right outfit.
- Maybe you accidentally replaced your GMDC with the original GMDC in Part 7, Step 12.
- Maybe you forgot to click Commit after replacing your GMDC in Part 7, Step 12.
- Maybe you forgot to save your edited file after replacing the GMDC in Part 7, Step 12.
Body Shop Shows No Changes
If you are getting this in Part 6, Step 30:If you are getting this in or Part 7, Step 14:
- Did you forget to put your "TutorialDressTwo_MeshFile.package" in your Downloads folder before running Body Shop, making sure to replace the existing file already there?
- Are you sure it's actually showing the wrong dress? Remember, the thumbnail will be wrong, but clicking on the dress should show you the right outfit.
- Maybe you accidentally replaced your GMDC with the original GMDC in Part 6, Step 28.
- Maybe you forgot to click Commit after replacing your GMDC in Part 6, Step 28.
- Maybe you forgot to save your edited file after replacing the GMDC in Part 6, Step 28.
- Did you forget to put your "TutorialDressTwo_MeshFile.package" in your Downloads folder before running Body Shop, making sure to replace the existing file already there?
- Are you sure it's actually showing the wrong dress? Remember, the thumbnail will be wrong, but clicking on the dress should show you the right outfit.
- Maybe you accidentally replaced your GMDC with the original GMDC in Part 7, Step 12.
- Maybe you forgot to click Commit after replacing your GMDC in Part 7, Step 12.
- Maybe you forgot to save your edited file after replacing the GMDC in Part 7, Step 12.
Wrong Dress Shows In-Game
If you test in-game and you are getting an unexpected or wrong outfit showing up, the most likely cause is incorrect game settings. In the game's graphics settings, you must set "Sim/Object Detail" to high for custom meshes to show up properly. At this time there is no known way to edit the low detail meshes properly.
Milkshape Error: "Face Count Mismatch"
This error occurs if you try to export your edited mesh and your morphs have a different number of faces/vertices. This most often happens if you have deleted too much or not enough of the upper leg, or forgotten to remove it from the morphs, too. Start over the Milkshape editing part and make sure to delete the whole top of the leg section from all both morphs - normal and fat. Make sure there are not any holes or anything else selected before you delete to prevent deleting too much.
Blue Lines/Circles in Milkshape
If you are seeing a bunch of weird blue lines/circles all over the place after importing your mesh, then you forgot to uncheck Show Skeleton as described in Part 6, Step 4. Uncheck it to hide the skeleton.
Sharp Seams/Lines Down Arms and Sides
If you are seeing sharp lines, seams, or edges down the arms and sides either in Milkshape or once you're looking at your edited mesh in Body Shop, then you forgot to uncheck Smooth All as described in Part 6, Step 2, or at some point you accidentally hit "Smooth All" on the Face menu. This is not fixable once imported - you must start over the Milkshape editing parts, and import without Auto Smooth checked.
Strange Transparency or Holes
If your mesh appears to have invisible parts, things showing through that shouldn't, or holes, then you probably said No when asked if you wanted to correct underweight bones in Part 6, Step 3. Reopen your MS3D file in Milkshape that you saved before you went to check in Milkshape (whatever the last version is). Then on the Vertex menu, select "Sims 2 UniMesh Fix Underweighted Bones V4.09" and then click OK when it tells you how many were adjusted. Re-export your mesh and continue with the rest of the steps in the tutorial from that part onward.
Confused When Linking
If, on Part 4 when you open your recolour file, there are only 6 items in the Resource List rather than the correct number (8), and your file is just named "TutorialDress.package" rather than something like "5f9567f5_TutorialDressTwo.package" then you are likely opening the file from your My Documents\EA Games\The Sims 2\Projects\TutorialDressTwo\ folder. That is an unfinished file. Make sure you are opening the finished file from your My Documents\EA Games\The Sims 2\SavedSims\ folder instead.
DirectX Error on Part 5
If you get a DirectX related error when you try to export the GMDC in Part 5, then you didn't get the Managed DirectX 9.0c mentioned in the "What you will need" section. It's linked on the SimPE download page under "Needed software to run SimPE" and you must get it and install it before continuing.
Mesh Replaces Maxis Original
If you suddenly notice that the Maxis outfit you based yours on has had its mesh replaced by your modified one, then you have unwittingly made a default replacement by forgetting to do Fix Integrity properly and give your mesh a new name. Go back and repeat Part 3, Steps 5 and 6, and then replace the GMDC in your mesh file with your modified mesh.
Questions? Comments?
There is a discussion thread for this tutorial which is here: http://www.modthesims2.com/showthread.php?t=297768
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 |