Post by Fwecka (Lolabellesims) on Oct 5, 2021 4:04:46 GMT -5
Part Three
Note: I messed up on step # 20. Instead of just appending S4Studio_Mesh_1 you should hold shift and select bottom, bottom_2, bottom_2_3, head, head_2, teeth, and top and append those, as well. Make sure the top in the rig is unhidden and selectable (the little arrow is ticked). Delete the bone_bone_shape that will get appended. I edited step # 20 to correct my mistake. Sorry if there was any confusion.
23. Select top.001 and enter edit mode. In the UV editor, press A to select everything, then in the image browser choose the CAS map you opened in step # 19. Now, top.001 will be assigned to the CAS map. Enter object mode. Select the custom mesh and enter edit mode. In the UV editor, press A to select everything, then in the image browser choose the CAS map you opened in step # 19. Now, the custom mesh has been assigned to the CAS map, as well. You need both top.001 and your custom mesh assigned to the CAS map; this is important for the next step.

24. Enter object mode. Select the custom mesh then select its uv_0. Press the plus sign to make a new map. You’ll have two maps now holding the uv_0 layout. The duplicated map will be called “UVMap” but that’s okay. Just leave it the way it is. Be sure to select “UVMap” as this is the map we’ll be working on.

25. Hold Shift and select top.001 first and then the custom mesh and enter edit mode. Do this in that order. The custom mesh should be the mesh that’s in edit mode. In the UV editor click View > Draw Other Objects. Now you’ll see an outline of top.001, and this will help when placing the UV islands. In the image below, the outline is red, but I’m using a custom theme. In your case, it’ll likely be a dark grey.

26. Arrange the UV islands. Since this is a full-body outfit, including the shoes, you can use the tops, bottoms, and shoes area. Just don’t cover top.001’s UVs or the mesh will pick up the skin’s texture. You can scale the UV islands with S and rotate them with R if you need to. I tried to put them on the body’s UV areas, but you don’t have to.

27. Save your file if you haven’t yet and be sure to make a new save file; don’t overwrite your previous one. In the UV editor, press A to select all of the UV islands. In the image browser press the plus sign to make a new image. Make your image 1024 x 2048. Press OK. Your UV islands are now assigned to a black texture. Be sure that “UVMap” is the map that’s been selected.

28. In the Scene tab (the one with the camera) change the bake mode to texture and set your margin to 3 pixels (this will bake the texture 3 pixels beyond the edges of your UV islands). Your UV islands should all be selected so make sure they are. Click the bake button and let Blender do its thing. If you did everything correctly the texture will be baked to your new UV layout. Neat!

29. In the UV editor, go to Image > Save as Image and save your new texture. Export your UV layout, as well. To do this, make sure your mesh is in edit mode then, in the UV editor, click UVs > Export UV layout.


30. Delete the old uv_0 by clicking the minus button and rename UVMap to “uv_0.” This is case-sensitive. Click the tiny little plus sign at the bottom of where the UV maps are listed. Click the arrow to move uv_0 to the top. You should have uv_0 listed first then uv_1 listed after.
Edit: I messed up this part. Blender has to have uv_0 listed first and uv_1 listed last but it's not enough to click the arrow; that just reorders it in Blender, but the order isn’t saved in your blend file. I discovered later that this messed up how the texture is displayed in Studio. Instead, here's what you should do. Delete the old uv_0 by clicking the minus button and rename UVMap to uv_0. Again, this is case-sensitive. The list will now show uv_1 first and uv_0 last. This isn't the correct order. Select uv_1 and press the plus sign to duplicate. This will make a new map called UVMap at the bottom of the list. Delete the current uv_1 by clicking the minus sign, then rename UVMap to uv_1. Now, the uv maps will be in the correct order. You can double-check this by clicking uv_0 and uv_1 to make sure they are the correct maps.

31. Make sure the custom mesh is unhidden and selectable (the tiny arrow has been ticked) In the Outliner, hold Shift and select top.001 and the custom mesh, in that order. The top.001 mesh will turn orange. Ctrl + J to join the two meshes. Right-click s4studio_mesh_1 and delete it. In the Scene tab, make sure Type says GEOM and Cut says 0000. If not, change it.

32. Go into solid viewport shading. Select your mesh and enter edit mode. Change the mode to Vertex Paint. If your mesh is white you will need to vertex paint it green (If everything is green you don't have to do this step). Press T to open the left side panel. In the tools tab click the color bar under the color slider. Click Hex and enter 00FF00. Click Paint > Set Vertex Colors. Your mesh will turn green. Note that in this case, we’re using the hands and neck from the rig and the rig’s body parts are not vertex painted. This is why we joined the neck and hands with the custom mesh before vertex painting. Sometimes, tutorials will say to clone a nude body and join its body parts with your custom mesh. In that case, the body parts will already be vertex painted and we would not join the body parts with the mesh before vertex painting. We would, instead, join the meshes afterward.

33. Now we need to split some edges to avoid unsightly shading. When geometry that’s facing in almost opposite directions are connected at their edges Blender doesn’t know how to shade those edges. The solution is to split the edge so that Blender shades the geometry separately. Select your mesh and enter edit mode. Select a few faces on the neck and hands. Ctrl + L and all linked geometry will be automatically selected. Press H to hide the neck and hands.

34. Switch to edge select and shift-select the edges of the faces you created to close the holes (in the neck, wrists, tops of the boots, and bottom of the jacket). You might have to shift-select the edges one at a time. Press T to open the left panel and under Shading/UVs mark the edges sharp (or Ctrl + E > Mark Sharp). The edges will turn blue.

35. Enter object mode and add an edge split modifier. Make sure Edge Angle is unchecked. Click the Apply button. Now the edges you marked have been split from the rest of the mesh. Again, this is necessary to avoid unsightly shading.

36. (Optional) There are other areas of the mesh that have dark shading. Select those edges, mark them sharp, and split them with an edge split modifier.

37. At this point, you should have transferred the weights, transferred the uv_1, vertex painted the mesh, assigned a cut number, split the edges, and joined the mesh with the TS4 body. Press Alt + H to unhide the hands and neck and save your file.
We’re going to have to clean up the weights in the legs area next. The pants are puffy, so the weights didn’t transfer perfectly. If we were to put the mesh in the game at this point you’d see odd stretching of the fabric in the legs when your sim walks.
Note: I messed up on step # 20. Instead of just appending S4Studio_Mesh_1 you should hold shift and select bottom, bottom_2, bottom_2_3, head, head_2, teeth, and top and append those, as well. Make sure the top in the rig is unhidden and selectable (the little arrow is ticked). Delete the bone_bone_shape that will get appended. I edited step # 20 to correct my mistake. Sorry if there was any confusion.
23. Select top.001 and enter edit mode. In the UV editor, press A to select everything, then in the image browser choose the CAS map you opened in step # 19. Now, top.001 will be assigned to the CAS map. Enter object mode. Select the custom mesh and enter edit mode. In the UV editor, press A to select everything, then in the image browser choose the CAS map you opened in step # 19. Now, the custom mesh has been assigned to the CAS map, as well. You need both top.001 and your custom mesh assigned to the CAS map; this is important for the next step.

24. Enter object mode. Select the custom mesh then select its uv_0. Press the plus sign to make a new map. You’ll have two maps now holding the uv_0 layout. The duplicated map will be called “UVMap” but that’s okay. Just leave it the way it is. Be sure to select “UVMap” as this is the map we’ll be working on.

25. Hold Shift and select top.001 first and then the custom mesh and enter edit mode. Do this in that order. The custom mesh should be the mesh that’s in edit mode. In the UV editor click View > Draw Other Objects. Now you’ll see an outline of top.001, and this will help when placing the UV islands. In the image below, the outline is red, but I’m using a custom theme. In your case, it’ll likely be a dark grey.

26. Arrange the UV islands. Since this is a full-body outfit, including the shoes, you can use the tops, bottoms, and shoes area. Just don’t cover top.001’s UVs or the mesh will pick up the skin’s texture. You can scale the UV islands with S and rotate them with R if you need to. I tried to put them on the body’s UV areas, but you don’t have to.

27. Save your file if you haven’t yet and be sure to make a new save file; don’t overwrite your previous one. In the UV editor, press A to select all of the UV islands. In the image browser press the plus sign to make a new image. Make your image 1024 x 2048. Press OK. Your UV islands are now assigned to a black texture. Be sure that “UVMap” is the map that’s been selected.

28. In the Scene tab (the one with the camera) change the bake mode to texture and set your margin to 3 pixels (this will bake the texture 3 pixels beyond the edges of your UV islands). Your UV islands should all be selected so make sure they are. Click the bake button and let Blender do its thing. If you did everything correctly the texture will be baked to your new UV layout. Neat!

29. In the UV editor, go to Image > Save as Image and save your new texture. Export your UV layout, as well. To do this, make sure your mesh is in edit mode then, in the UV editor, click UVs > Export UV layout.



31. Make sure the custom mesh is unhidden and selectable (the tiny arrow has been ticked) In the Outliner, hold Shift and select top.001 and the custom mesh, in that order. The top.001 mesh will turn orange. Ctrl + J to join the two meshes. Right-click s4studio_mesh_1 and delete it. In the Scene tab, make sure Type says GEOM and Cut says 0000. If not, change it.

32. Go into solid viewport shading. Select your mesh and enter edit mode. Change the mode to Vertex Paint. If your mesh is white you will need to vertex paint it green (If everything is green you don't have to do this step). Press T to open the left side panel. In the tools tab click the color bar under the color slider. Click Hex and enter 00FF00. Click Paint > Set Vertex Colors. Your mesh will turn green. Note that in this case, we’re using the hands and neck from the rig and the rig’s body parts are not vertex painted. This is why we joined the neck and hands with the custom mesh before vertex painting. Sometimes, tutorials will say to clone a nude body and join its body parts with your custom mesh. In that case, the body parts will already be vertex painted and we would not join the body parts with the mesh before vertex painting. We would, instead, join the meshes afterward.

33. Now we need to split some edges to avoid unsightly shading. When geometry that’s facing in almost opposite directions are connected at their edges Blender doesn’t know how to shade those edges. The solution is to split the edge so that Blender shades the geometry separately. Select your mesh and enter edit mode. Select a few faces on the neck and hands. Ctrl + L and all linked geometry will be automatically selected. Press H to hide the neck and hands.

34. Switch to edge select and shift-select the edges of the faces you created to close the holes (in the neck, wrists, tops of the boots, and bottom of the jacket). You might have to shift-select the edges one at a time. Press T to open the left panel and under Shading/UVs mark the edges sharp (or Ctrl + E > Mark Sharp). The edges will turn blue.

35. Enter object mode and add an edge split modifier. Make sure Edge Angle is unchecked. Click the Apply button. Now the edges you marked have been split from the rest of the mesh. Again, this is necessary to avoid unsightly shading.

36. (Optional) There are other areas of the mesh that have dark shading. Select those edges, mark them sharp, and split them with an edge split modifier.

37. At this point, you should have transferred the weights, transferred the uv_1, vertex painted the mesh, assigned a cut number, split the edges, and joined the mesh with the TS4 body. Press Alt + H to unhide the hands and neck and save your file.
We’re going to have to clean up the weights in the legs area next. The pants are puffy, so the weights didn’t transfer perfectly. If we were to put the mesh in the game at this point you’d see odd stretching of the fabric in the legs when your sim walks.
