Tutorials:CAS Creation From Start-To-Finish - Meshing

From SimsWiki
Jump to: navigation, search
CAS Creation With Daluved1: From Start-To-Finish

Planning | Meshing | Creating A New Package | Texturing | Finishing Up | Glossary



We can technically make our Hello Kitty shirt using the already existing EA t-shirt. But what fun is that?! You are most likely reading this tutorial to learn how to really create custom clothing, and making you own meshes adds an extra kick to your creation!

Extracting Meshes

So now that we've decided which CAS part we are going to clone, it's time to extract some base meshes to build our custom mesh off of. Click Extract Meshes just under the CAS parameters. A window asking where to save your meshes will pop up. Choose whatever destination folder you want to save your work files in and click "Okay". You may close CTU for now.

I highly recommend you make an independent folder for all of your project work files, as CAS creation can get a little messy.

Looking where ever you saved your files, you should now see four new files:

There are three SIMGEOM files and one VPXY file. You can discard the VPXY file as it is not used. The three .simgeom files are the three lod meshes of the shirt.

The word "lod" is an acronym that stands for level of detail. Lod 1 is the highest level of detail, where as lod 3 is the lowest. You will see lod 1 during normal - up close - gameplay. But when you are viewing sims from a distance or the game is still rendering sims, you will most likely see them in lod 2 or lod 3 form.

Multi Lod Meshes

Often times you may see meshes with multiple lod pieces:

Never fear! This just means that the meshes come in parts. Usually lod1_0 is the main mesh and lod1_1 is something silly, like the index finger (dead serious). So you don't have to import both to edit the mesh. However this is a case-by-case thing, so you may or may not have to edit all the lod pieces.

Importing Meshes

Now that we have our meshes, it's time to start the physical meshing using our 3D Modeling program. Remember, you must have the GEOM import/export plugins installed in order to get the meshes into the modeling program. So, take a moment now to verify you have everything installed!

In Milkshape go to File -> Import -> Q Mesh Sims 3 Geom Importer. Let's navigate to our three mesh files and select the lod 1 mesh. A box saying "Unable to locate bone file. Default skeleton used." will pop up, simply click "Ok".

If you are greeted with...this..don't panic! You just need to adjust the joint size to something more suitable for TS3 meshes. Go to File->Preferences->Misc

Set it anywhere between 0.008 to 0.012 (less or more to your preference). Also, to ease confusion, go ahead and make the skeleton invisible by unchecking the "show skeleton" box on the Joints tab.

Blender users have a slightly different import/export procedure. Please read the instructions provided by the plugin coder or from the Blender website.


Upon successful import, we should be greeted by our mesh.
The method that we are going to use is the Scale and Move method, the same method I demonstrated in my Quick Meshing (YouTube) video tutorials. The basic idea is that we are going to reshape our mesh by scaling and moving bits and pieces of the mesh, ONLY. That means absolutely under NO CIRCUMSTANCE should you add or delete polys/vertices from the mesh. The reason why is because the scale and move method allows us to create fantastically custom meshes, without having to create new morphs for them, which is a pain.

Don't get me wrong, you can delete parts from meshes and even add new pieces from other meshes, this is called Frankenstiening. However, frankenstiening requires custom morphs to be made, as well as other intricate bits. So, that technique is best left for more advance creators, and will be covered in a separate tutorial. In short....Under NO CIRCUMSTANCE should you add or delete polys/vertices from the mesh. Are we clear?

So to begin our meshing, the first thing we want to do is TURN AUTOSMOOTH OFF. To do this, go to the Groups tab and uncheck Autosmooth. Next, we want to get our mesh into a workable view. So, right-click on the mesh window and set it to a front projection (Projection->Front). To make it easier to see what we're doing, let's put the mesh into smooth shaded mode by right-clicking and selecting Smooth Shaded. Then, apply a wireframe overlay by right-clicking again and choosing wireframe overlay.

I personally think that the torso of the female mesh is too square for a girl's frame, so I want to add a slight curve. To do this, I'm going to scale down the waist a bit.

We start by selecting a row of vertices, and click on the scale button. Make sure you have select-> by vertex chosen. In the three scale ratio boxes, we want to type .99 as the X and Z scale ratio.

Any scale ratio less than 1.00 will shrink the vertices along the selected axis. And, vice versa, numbers greater than 1.00 will expand the selected vertices. A scale ratio of 1.00 itself, will keep the mesh neutral in that direction.

Since our scale ratio is .99, that means we are scaling in our mesh 1 percent [(1.00 - .99) x100] inward on the X and Z axis.

Notice how the Y axis's ratio is set to 1.00. This means that we won't be scaling the Y axis, which you want to avoid. Alternatively, you can just click the Y button to deactivate that scale ratio altogether. The reason for not scaling in the Y direction is to avoid accidentally changing the meshes height, which can cause clipping and animation issues.

The X axis scales/moves the mesh from left to right. The Y axis scales/moves the mesh up and down. And, the Z axis scales/moves the mesh from front to back..


Once you have decided on the row you want to scale and the appropriate scale ratio, click the smaller scale button (the one by the scale ratio boxes). Notice how our mesh has been pulled in slightly. Repeat this process until you get the shape you desire. Remember you can also use higher values, such as 1.01, to widen the mesh as you see fit.

After a little toying around, my mesh now has a slightly curved waist to fit a more girlish figure.

MWSnap019 2011-08-06, 00 48 12.jpg

I also want to make my shirt longer, so I'm going to select rows of veritces (it's easier if you do them one-by-one) and pull them down until the shirt is the desired length.

To make sure you don't knock the mesh askew when pulling it down, you can set it to where you can only move the mesh in the Y direction. To do this click on the Move button, and deselect the X and Z button.

Since my shirt is now longer, I'll have to adjust to where it won't clip into pants and skirts. To do this open CTU and locate the child female nude mesh, or any bottom mesh for that matter; follow the same extract/import procedures used earlier to get the mesh into Milkshape/Blender. Use this bottom mesh to gauge the proper size of the bottom of the shirt. You can show and hide this mesh under the groups tab to get it out your way when adjusting the shirt.

After you've gotten your mesh to your desired shape, you can just delete the bottom mesh from the groups tab.

You've done a third of the meshing already, so now is a good time to save!

Adjusting the UV Map

When you make drastic - or even slight - edits to a mesh, you'll need to adjust the UV. What exactly is a UV Map? Well, it's basically information about the mesh that tells the game/program how to wrap the texture around it. If you have already done CAS creations, even small retextures, then you have seen the UV map in action - you just didn't know it! The easiest way to explain UV mapping, is to see it visually. But first, visit this thread by tiggerypum and download the templates-patternsforuvmap.zip file. Extract the two image files from the inside and drop them into your working folder.
Back in Milkshape, we need to go to the Groups tab and click Select. Your mesh should now be highlighted in red. Next navigate to the Materials tab and click New. You'll see a little sphere pop up. Now click the first <none> button, and navigate to the rainbow checked pattern that we extracted from tiggerypums tutorial. Press okay, then hit "Assign". This assigns the rainbow texture to the shirt. If your mesh does not immediately show the checked texture, simply right-click -> Textured.

Ideally we want the checks to be distributed evenly on the mesh. Well, we can clearly see that there is stretching on the chest and at the bottom. Luckily this is easy to fix! However, whatever you do, do NOT create a new map from scratch. Why? Because the game uses the same UV layout for the whole body, including skin and shoes. Basically, the UV maps of every piece of clothing on your sim should flow into each other.

Make sure that your entire mesh is still selected and open the Texture Coordinate Editor by hitting Ctrl + T. Alternatively, you can go to Window -> Texture Coordinate Editor.

When it pops up, you should see your mesh flattened on the rainbow texture. Before we touch anything, we want to Lock X position by checking the box. This prohibits us from accidentally knocking the UV map off center. Now, we need to select the rows that correspond to the SHIRT on the UV map where there is the distortion and move them up or down to make the checks uniform in size. Whatever you adjust on the UV map will be reflected, in real time, on the mesh. I suggest having the mesh in 3D view while adjusting the UV map. You should also remove the wireframe overlay to help you see the adjustments better.
So after a few moments, I adjusted the rows near where the stretching was on the chest - being careful not to mess up the arms mapping - to fix the stretching. Now, repeat to fix the bottom, or any other discrepancies you see.

After you've adjusted the UV map properly, it would be a good time to save!

If you want to see UV mapping done in real time, it is covered in my Quick Meshing: Advanced Steps (YouTube) video tutorial.

Dem Bones, aka Bone Assignments


After you've altered your mesh and adjusted the UV map, there's one more thing to check. When you make meshes longer - or shorter - you may have to adjust the bone assignments. Remember that big blue skeleton that I had you turn off earlier? Well that skeleton is actually used in game to locomote the sim. Each vertex on the mesh has certain bone assignments that tells it how to move in relation to the "skeleton" of the sim.

Like with UV mapping, bone assignments are better understood when they are seen visually. So, select any one vertex on your mesh and go to Vertex -> Sims 2 Unimesh Bone Tool. The particular vertex I selected was on the sims stomach area. It's movement is determined 62 percent by bone #3 - or "b_spine_1", and 38 percent by "b_spine_0".

So what does this mean to me? Honestly, even I don't understand bone weights and such. The good thing is, you don't need to know anything about which bone/weights to assign. You just need to be really good a copying other examples. :)

Before we go further, grab a pen and lots of paper!

Like we've done before, open up CTU and prepare to extract another mesh. This time we want a child female dress mesh, since this will give us the best example of how bone assignments should be done.

Import lod 1 of the new reference dress mesh into Milkshape.

Now, in order to fix our bone assignments we are going to examine the two meshes to find vertices that are in the same vicinity.
For example the row of veritces on the dress mesh (red arrow) are close - enough - to the row of vertices on the shirt mesh (blue arrow). This means that we have a relatively good enough reference row to copy bone assignments from. Here comes the tedious part....

You'll need to select one vertex from your reference mesh, write down it's bone assignments, and copy them to the corresponding vertex on the shirt mesh (via the Unimesh Bone Tool). This is VERY time consuming, but totally worth it in the end. The reason for good bone assignments is to have smoother animation of the mesh, and to minimize clipping.

To be honest, the shirt mesh alters we've done so far in this tutorial don't really warrant redoing the bone assignments. If anything, the only thing we really have to adjust is the bottom two rows. Even this is optional. The time that you really want to focus on redoing the bones is if you do drastic edits, such as making a short skirt longer. So, before you worry about changing bone assignments, test your mesh in game to see how it animates. If you notice a lot of clipping, or the mesh moves choppily, then you will need to adjust bone assignments.

After you've corrected bone assignments, if needed, you can save your mesh one last time, because you are done with meshing! Well...sorta...

You can also go ahead and delete the reference mesh you used to copy bone assignments from.


Once you're confident with your mesh, we can now export it out of Milkshape. To do this, go to File -> Export -> Q Mesh Sims 3 Geom Exporter. Give your mesh a name, making sure to include "lod 1" somewhere in the name.

If you are exporting a multi-part mesh, the the exporter will ask you which pieces you'd like to export. Just export/name them in order. That is, lod1_0, lod1_1, etc.


Now, I said you were "sorta" done with meshing. Good practice is to alter the other two lods to match the custom mesh you just finished. However, with such a small edit as the one we did, redoing all the lods isn't entirely necessary.

If you do decide to redo lod 2 and 3, just use the same scale/move method we just used.


Step 3: Creating A New Package

Personal tools

game select