Lesson 3 part 1 and Part 2 up now - almost done.
Lesson 3 - Finishing up

Now that we have an outside mesh, from wherever it came from, we need to get it working in FF. We'll start with "The Movies Game" capture, then "The Sims 2 " and then go into the "anything else" area
 
In your saved Ripper directory, there should be 3 things we need.
 
1) the .obj file that holds the 3D data
2) the .mtl file - used by the .obj data to hold info on what texture goes where
3) the .dds files - the actual textures needed
 
Open up Blender and delete the cube primitive. Click on the Files menu and select Import->wavefront (.obj). Navigate to where your .obj file is and select it. Hit the "import" button on the upper right.
 
There are 3 ways to group meshes inside the .obj file when being brought into Blender. Not really sure how everything works on this yet.
 
1) By material. All meshes with the same material group together. If more than one seperate object uses that material, delete one and you delete all. IE you have 10 cars in the capture and you only need one. If they all use the same materials for their tires, deleting the other 9 cars will leave you with your car with no tires.
 
2) By group. Each group will come in as its seperated parts. In this case, each car would have its own seperate set of tires and other parts. This way makes lots more objects than the first method because of this.
 
3) By object - Will import each object as a single object. If the mesh is made of parts, it will be imported as a single mesh. It may also make everything a single mesh, IE in the Sims capture, the sim and the stage and everything else came in as a single mesh.
 
In this case we'll be using the object method. Once the .obj is fully loaded, you'll see the character and a few extra items, captured with him from the makeover screen. We'll delete these as they're not needed.
 
Update on this - the second time I tried this I ONLY got the sim and nothing else. Not sure what changed - maybe what was clicked on last, maybe because I was on the base costume select screen, but helpful that it worked out that way.


After import, you'll be in top down mode, but you won't see him because his X/Y/Z origin point is off of center. Hitting the "1" hot key, you'll see he's also facing backwards and he's half underground. He'll have few other problems we need to fix as well.

 If you hit the "3" key you'll also see he's a bit thin. Ripper captures the X and Z axis okay, but has problems with the Y. With the character selected, hit the "N" key to bring up the transform panel and change the Y value from 1 to 2.5. This probably won't be perfect, but will do for now. You'll notice that as you do, so, he also moves on the Y axis as well.
It also looks like he's leaning forward a little bit. lets change his X axis to 3 degrees and his Z to 180 to rotate him around to match the normal view. This will also rotate him around the main origin point to the other side.
Now, lets look at him at front view again by hitting "1" and moving the view to center on him, zooming in as well. He looks a little rough compared to how he looked before.
 To make him look a little better, go to Edit mode, leave everything selected (yellow lines and pink faces) and go up the "mesh" button to the left of the "Edit Mode" button. Click on it and from the popup menu, select faces -> set smooth. Going back to object mode, he looks a bit different.
One last thing to do on the mesh before we move on to the next part is to look at it textured. As you can see, he looks a little strange. ".dds" files have a transparency setting set in what's called an "alpha channel". In this case, some of the textures have this turned on, making them invisible. I don't know how to turn it off, but if you export the texture to a type that has no alpha channel (like jpg or bmp) and then back to .dds or .tga, the channel is gone or turned off. In this case, his eyes and teeth are okay, but the face is transparent. Turning off the alpha channel will fix this.

The other thing that can cause this is facing. Each poly is like a flat piece of paper with 2 sides. Normally, one side will have the texture applied to it as skin, and the other one will not. if the poly has been "flipped", the sides will be reversed with the textured siding facing inward. The nontextured side will be transparent and appear to be missing. You can check this be selecting a poly and going to the normals menu under edit and selecting "flip". "recalculate inside" or "recalculate outside" will try to fix facing for the entire selected mesh, as some meshes will import looking like a checkerboard with random groups of polys facing the wrong way.

To see what textures are being used by the mesh, click on the "Window Type" button on the far left. We'll leave 3D view and got to Outliner view. You'll probably have to scroll wayyyy over to the left, by holding the middle mouse button down, to see what we're looking for. Once you scroll over, click the arrow key to open up the mesh info. You'll see the various parts of the mesh by material and what textures are being used for them. These are the only textures we need - the rest in the ripper directory were for the background areas.
Delete the unused .dds files. There's different ways to convert art files, but for .dds one of the best is DDS Converter 2. We'll run the program, convert the .dds files to .jpg and them back to .dds
 
Now looking at the mesh textured, he appears the way he should. Go ahead and go back to "solid view"
 
Next we'll bring in our FF source file.We're going to be using a modified male_basic for our nif source, in this case Beyonder's male_basic_boots. Click on the file menu on the upper left and pick import->NetImmerse/ Gamebryo. Find the character.nif location for the mesh we'll be using and hit import. Use the default selections on the import screen and hit "OK"

Once the nif is loaded, we're hide everything but the main nif and the armature. They're not needed right now and will just obscure our view. Select the armature and main mesh on the nif, plus the obj import. Then on the object menu, select Show/ Hide Objects -> Hide unselected
You should see the 2 characters on screen - the imported nif  and the imported .obj. We're going to bring the .obj up to the .nif and match size and location between the two. Hit "Ctrl" +"A" to set your size and rotation to default first. Turn on the link button and adjust him to close where he needs to be.
 Select the .obj and if its not up already, hit "N" to bring up the transform panel. Adjust the location of the .obj by changing its X/Y/Z values until its in the same place as the nif. Next, adjust the X/Y/Z sizes so its as close as possible to the .nif. As you do this, its position may move and you might have to readjust.
 He's about the same size, but still too thin. Note the current position and size on the transform panel. Any other mesh brought in from TMG will probably come in the same size and these settings would probably work for them as well. Move him so he's right on top of the nif and adjust the Y scale alone to match.

This looks like a close match for the Y. Go to front view and adjust the X to make him a little broader.
This looks like a pretty good match for all 3 directions. Take note of the X/Y/Z numbers again for location and size. This would also be a good spot to save.
 
When you've got it as best as it can get, hit "Ctrl" +"A" to set your new values as default.
 
Now that they are as close as possible, we need to adjust their poses to be as exact duplicates as we can. Select the .nif and enter pose mode. Turn on X-ray to see the entire armature. Adjust the position of the individual bones with the "R" rotate key. The main body should be all right and just the arms and legs might have to be adjusted. Adjust one limb at a time, doing the upper portion first and then the lower ones. Adjust each limb in both front view and side view. Last, some of the bones might be too long or short to match the new mesh, so we can adjust the length of the bone to extend or shrink the mesh to match. Changing the length of the bones also changes the size of any mesh attached to it. This doesn't matter for the main mesh, but will for the other items. You'll have to rezero the size of any that's been changed with "Ctrl" +"A" You can adjust the length of a bone by selecting it in Pose mode and changing its Scale Y value on the transform panel.
 
The right arm adjusted down in front view. It appears shorter than the obj arm.

Side view shows its still not aligned. Bringing it down will give a closer match. Adjust first the upper arm, then the lower. If you do the same on the other arm, the left arm bones should sit right on top of the right arm bones in side view, since X-ray shows them both. Adjust the arms and repeat for the legs.
When done with adjusting pose, you need to set the new position of the .nif as default. In Pose Mode, "Ctrl"+"A" sets the new pose as the default "rest pose" Failure to do so means that the new pose isn't really applied. Once you do so, you'll see the nif "snap" back into its original position, but not the armature. Thats okay - its supposed to.
Edit; Looking at the arms, I went ahead and extended both upper arms by changinging their Y scales to 1.1 and readjusting them and the lower arms. This lowered the elbows a bit and brought the hands more in line with each other.
Part 2: Weight Painting Rigging.

 Probably the most difficult part of the lesson, and the most time consuming. We have to set up the vertex groups on the .obj to match the donor and be able to animate with its kfs.

There are 3 basic ways to do this;

Method 1) We can copy the vertex groups from the donor to the obj. You can only do this if the receiving mesh has no vertex groups already.
   Select the obj, then, holding shift, select the nif. Both should be selected and highlighted.
 
 Go to the Windows select on the far left and go to the Scripts Window.

In scripts, select object -> bone weight copy from the popup menu
Change quality to 3, ignore the other 2 buttons and hit "OK"
It will take a minute, but the program will copy all vertex groups from one to the other. There will be a progress bar at the top of the screen.

You can now delete the nif. The last step we need to do here is attach the obj to the armature and make the armature the "parent"

Return to the 3D view. Next, select the obj, then with shift held down, select the armature. Hit "Ctrl"+"P"

Select Make Parent to -> Armature from the first popup

Select "Don't Create Groups" from the next popup

The obj is now controlled by the armature and the kfs. You can now move the obj in pose mode.

Usually, the transfer does a little better than this. Only part of the upper arm transferred, and none of the lower arm/hand at all. I might have done something wrong since its as if the donor mesh didn't match up well. Tried to correct a few times but always got the same result.
If you check what the vertex group for the upper arm looks like in Edit mode, compared to what it looked like in lesson 1, you'll see what you'll have to correct.

You'd have to go thru a lot of tweeking, comparing the original nifs vertex groups to the objs and adjusting them one by one. In this case, its probably better to reload your save from before you did method 1 and try one of the other methods.

Method 2 -  usually a lot of work as well and I hardly ever use it.

 Delete the nif. As above, select the obj and then the armature

 Hit "Ctrl"+"P" and select "Make Parent->armature from the 1st popup, and this time, "Create from Bone Heat" on the second menu.

A couple of things can happen here. One, every bone has a radius of influence around it. Any vertex within range of the bone "heat" will be assigned to that bone. This includes bones not usually associated with the mesh itself - bones like weapon, Omni, bounding and selection box, etc. You'll have to go into edit mode and remove those groups, and tweek the required groups to have the right vertexes in them.

The other thing that could happen is there's an error (as in this case when I tried) and the vertex groups are created, but no vertexes are assigned to them at all. Then you'll have to add every vertex to each group by hand. This is actually the way I do it usually to make sure I get it right, but by method 3 instead.

Method 3 - Simular to the error method of method 2 above. Delete the nif. Select the obj. With the transform panel up, move the obj away from the armature far away in any direction by changing the X/Y/Z location. Join with "Ctrl"+"P" as above, selecting bone heat on the second popup. You are far enough away that the vertex groups will form, but no vertexes will be assigned to them. Move the obj back onto the armature.

Bring up the list of all the vertex groups and delete the ones that don't belong. Then select any one you're comfortable with, and start adding vertexes to it by right clicking on them with "shift" held down. Rotate the view around. Some vertexes are inside the mesh and are hard to see, and some might have to be clicked on multiple times to make all lines radiating from them turn yellow. You can open a second Blender and import the nif there for reference. Putting it in edit mode, you can use it as a guide for what the vertex groups should look like. When you think you have the group complete, hit the "assign" button to add them to the group. Repeat till all groups are added.

What a corrected upper right arm group looks like. It probably will need to be tweeked still. The lower arm is still in place since it hasn't been assigned to its group yet.

This paricular armature has 29 bones that deal with the mesh, and you'll have to set them all up. With practice though, this could only take an hour or two.
While you're adding vertexes to a group, turn and rotate as needed to make sure you get all the vertexes in the area. Keep an eye out that you don't select a vertex behind the area you're working on. Make sure all of the vertex group polys are pink and there are no pink vertexes or black lines in the group.

As you finish each group, you can test it in pose mode by selecting that bone and moving it. this should show you if you missed anything or assigned a vertex from another area in error. Try to conpare left and right groups and keep them as mirror like as possible - IE the left upper arm group should be equal to the right.
The pic below shows a vertex missed on a finger and another from the jacket assigned in error.

For a joint area, you can either have the two vertex groups meet or overlap at the joint. I find overlapping the groups a little seems to help the animation.

Hands - The hardest part of rigging is probably the hand. Each hand consists of 5 bones;

1) The hand - covers from the wrist to the first knuckle

2) Finger 0 - Base of the thumb to the joint

3) Finger 01 - (thumb) From the joint to the fingertip

4) Finger 1 - From the knuckle to the first joint of the fingers

5) Finger 11 - Fingers) From the first joint to the fingertip.

Since you are bringing in a different mesh, sometimes no matter how you adjust you'll still wind up with a "claw". If you can't get it right, I use a simplified version;

Don't use finger 0 or 01 - assign the thumb vertexes to the hand.

Don't use finger 11 - assign all finger vertexes to finger 1

This still looks good in most poses.

Lesson 3 - Part 2

When the mesh is rigged, it's time to see how it looks in the Character viewer.

In object mode, unhide the hidden objects. Hit the "A" hotkey to select all.

Hit the File menu on the upper left and go to export ->NetImmerse/ Gamebryo
Use the explorer to find the new male_civilian directory you made and tell Blender to create a "character.nif" there. Hit the export button on the top right.
On the export options screen, leave everything at default. The only exception is turn off the "force .dds extention" button. This will make the nif look for .dds textures even if it uses .tga. Hit "OK"
If you've changed the length of any of the bones, you'll be getting errors during the export. The editable meshes assigned to the armature will have changed length as well and are now uneven in size. You'll need to click on each one in object mode and hit the "Ctrl"+"A" hotkeys to reset their values. If they're hard to see, you can hide the main mesh again till you're done. You can also go to outliner view, select the mesh to be resized and return to 3D view. Once you've reset the values on the editable meshes, go back and export again.

A second error you might get is if you've missed any vertexes. You'll get an error message and Blender will put you in edit mode with all unassigned vertexes lit up and selected. note where they are and select them one by one and assign them to the vertex group where they belong. Go back to object mode, select all, and try to export again.

Assuming you finally get it exported, open up the Character Viewer and view the mesh in the male_civilian directory.

There he is, but he's not responding to the kfs. It seems like I assumed that male_civilian would use male_basic kfs, and it looks like I assumed wrong. Close character viewer, copy some male_basic kfs into the male_civilian directory and try again.
As you can see, he doesn't look too bad in idle mode, but in action, he needs his vertex groups at the joints adjusted. Yours might look different, but in any case, go back into edit mode and try moving vertexes from one group to another, adjusting how much adjacent groups overlap each other, and export as many times as needed till you're happy with the way he looks.

Two last things when you're done with tweeking. First, you'll need to copy the textures from your ripping directory to the skins/standard directory. Make sure transparency has been turned off. Check in nifskope to make sure the texture location and file types are correct. I was still having problems with the .dds so I went ahead and converted all the textures to .tga and that fixed it.

Second, set up some alternate skin directories and go back into TMG with Ripper on. Put Mr. Patriot back into makeover and select some different color combinations for his outfit. Capture, copy the new .dds files in to the alt skin directory, and repeat for all the combos you want to make. Now, when you open up the Character Viewer, you should see the new alts available for use.

That completes the TMG transfer and setup. Read on for the Sims setup or skip on to the "Other" and "Odds and Ends" section.

The Sims 2 Capture.

Bringing in your capture from the bodyshop is almost the same as from TMG, with a few differences at the beginning. Import the object file into Blender using the middle choice, by group. After the import is complete, you'll be looking at the object in top down view. The object includes the female mesh, the stage and a back wall. Hit "1" to go to front view and then rotate the view 180 degress with the "4" or "6" key. 180 degrees is equal to hitting the key 12 times.

We only need the female sim, so lets get rid of the rest. She's in a few parts, so right click on part of her and then, holding down the "shift" key, all of the other parts you can see. Use the "hide selected" function to remove her from view. Repeat with any parts of her you missed till she's totally hidden. Hit the "A" hot key to select all the items making up the room and then "X" to delete them. Unhide the sim and she'll be on screen by herself.
We want to bring all the pieces together and make her a single sim. Hit "A" to select all, and then "Ctrl" +"J" to join all selected pieces into a single mesh.
The procedure after here follows the one for TMG above. Bring in your female_basic mesh, move and resize the sim to match, pose the female basic to match the sim, delete the nif mesh and weight paint.



Other file types and odds and ends.

"Ctrl" +"Z" will undo your last action.

Ripper won't work with every porgram, but Blender can import many file types besides .objs and .nifs. Some types come with the basic Blender install and some can be downloaded and added. There are many sites out there with free 3D models to download. If you see something you want to use, chexk the file type and do a Google search for it and "Blender". One huge site is Google's own 3D Warehouse for their sketchup program.

kf compatability. Why does a character animate with one set of kfs and not another? The kfs have a series of steps in them to move bones to certain positions. Since the vertex groups are tied to the bones, the figure moves as well. the kf file moves the bones by name, and the vertex groups are moved by name as well. If the bones or groups are named different than what the kf is looking for, the figure won't animate.

To get a figure to animate to a new set of kfs;

1) Import the figure you want to change kfs for. Delete everything but the main mesh.

2) As in the TMG procedure above, import the figure with the kfs you want to use. Move the 1st mesh to the second and have the second mesh match poses. delete the second mesh.

3) Use Method 3 from the TMG example above for rigging by moving the mesh away from the armature and then hitting "Ctrl"+"P" to parent the armature to the mesh. If you go into edit mode and check vertex groups you should see TWO full sets, the original set with vertexes assigned to them, and the groups from the donor mesh with no vertexes assigned to them.

4) Pick one of the original vertex groups and hit the "select" button to see the vertexes, lines and faces for that group. Delete that group. Now, with everything still lit up, pick the new vertex group of the same area from the second mesh. Hit the "Assign" button and the vertexes now belong to the new group. You've just reassigned a vertex group ffrom one armature to another.

5) Repeat with the rest of the vertex group. When you're done, the mesh should now animated with the new kfs.
 
6) Check with character viewer to make sure he works. This will probably NOT work if the second donor mesh had the skin breakage problem described by Ewzzy, so check and make sure the donor is good before wasting time and effort. This should also work for any nif pulled from any other game. Some tweeking of vertex groups will probably have to be done, as well as texture type/ location and lighting in nifskope.

Capturing with Ripper in some games gets a little complicated since it might capture an entire level or complex scene. If you can move the chracter to an easy to find spot on the map, like an entrance or large object, it will make it easier to find. Use the Sims 2 method to isolate the figure and delete the rest.

I've also noticed that some maps are tilted instead of being flat. The figure will be upright, but the feet might be at an odd angle. try capture the figure in front, back or side angle to the floor to see if that helps.

Changing vertex count up or down - You may want to increase the vertex count in a area and move them around to create bootcuffs, horns, spikes or anything else. You can go into edit mode and select some vertexes to highlight one or more faces, then choosing the subdivide option under "edges" in the drop down.

You can decrease the total mesh count in edit mode by selecting "A" in edit mode to highlight everything and then choosing the poly reducer option under "scripts" in the drop down menu. Choose the amount you want to decrease by - default is .5 (50%) - and hit go.

When a mesh is made of multiple parts and then joined into a single mesh, there may be places where yo have have multiple vertexes in one spot. You can select the "remove doubles" line under vertexes in edit mode to get rid of them. This may change things for the worse though so make sure you save in Blender before hand so you can go back to the way it was before.

When you apply the texture to the mesh, portions may seem missing. Each face on the mesh has a front and back to it with the texture normally applied to one side. The missing parts of the texture may mean some of the faces have been "flipped" and are facing inside out.

The End - Lesson 3 complete.

BACK TO MAIN