Tutorial: Using Sims 4 Studio to Add an Accessory
Sept 23, 2014 10:04:19 GMT -5
midnightpearl, icemunmun, and 11 more like this
Post by orangemittens on Sept 23, 2014 10:04:19 GMT -5
Introduction
This tutorial will show you how to clone an EA accessory, switch out the mesh so that your new mesh takes its place, prepare your mesh for import back into the .package, and then get the .package ready for the game. This tutorial is meant for those who already know how to make a new accessory mesh and texture and will not show you how to create a new mesh. Instead the focus is on the Sims 4 specific elements of the process.
What you will need
Sims 4 Studio
Blender 2.7.0
Your fully mapped accessory mesh - note that your map should be in the same place on the image that EA's item is mapped in.
Textures for your accessory mesh
Instructions
1. Open Sims 4 Studio and enter your creator name if you have not already done so. Put a dot in the Create 3D mesh radio button.
2. Click the CAS button.
3. Use the filter boxes to limit the thumbnail list to the kind of item you want to make. This tutorial will use an adult female earring as the example item.
4. Click on the item you want to clone. If you would like all the swatches to be included in your .package hold down the shift key as you click. By default Studio will only include one swatch in a new mesh .package otherwise.
5. Click the Next button. Name and save your .package in your project folder.
6. Studio will open your new .package and the item you cloned will be displayed on the model in the model viewer. Click the Meshes tab to switch to the Meshes section.
7. This is the Meshes list box. By default it will show you LOD 0. If there is more than a single LOD in the .package this will contain a drop down list of all the LODs. LOD stands for Level of Detail and a CAS LOD consists of meshes, references to the bump image, and other data relevant to the item's behavior in the game. LOD 0 contains the meshes players see in CAS and when viewing the item close up in the game. The higher the LOD number the further away the player will be viewing the Sim when that LOD's mesh is displayed.
8. Leave LOD 0 selected and click the Export button to export it. Name and save the resulting .blend in your project folder.
9. Open the .blend using Blender. Scroll down on the right side until you see the S4Studio CAS Tools section. Make a note of the Type, in this case GEOM, and the Cut number, in this case 0000. When you add your new mesh to the scene it will need the same type and cut number in these fields in order for it to replace the original when you import this .blend back in Studio. If you do not enter the correct Type and Cut number Studio will not know that you want the original replaced and nothing will change when you import your .blend.
10. Create your new mesh, import your new mesh in, or, as shown here, append your new mesh into the scene.
11. With your mesh selected, scroll to the S4Studio CAS Tools section and enter the type and cut into the Type and Cut fields.
12. After assigning the type and cut the next thing necessary is to weight your mesh correctly. Weights are used by the game to determine which part of the Sim your item should move with. The first step is to see which bone or bones the EA item is weighted to so you can weight yours the same way. Left mouse click the Studio mesh in the meshes list on the right hand side. Click the small inverted triangle as shown to bring up the Object Data section. This will allow you to see the Vertex Groups section. This section contains a list of all the bones (aka joints) in the selected mesh group. This list will vary by item. Items like long hair will have numerous joints where simple items like this earring will have only one or two.
13. Select one of the bones by left clicking on it.
14. Switch to Edit mode and choose Solid shading because textured shading, which Studio exports as by default, will not show bone weights.
15. Click n on your keyboard to bring up the side bar menu if it is not already showing and put a check mark in the Show Weights box.
16. Look at the EA mesh to see what color it turns. In this case the mesh has turned blue. The blue color indicates that the mesh has 0% assignment to this joint.
17. Since the first bone I tried is not the correct bone I move on to the next by clicking on it in the list. This time the EA mesh turns bright red. The red color indicates 100% assignment to the joint. Now that I know which joint the EA mesh is assigned to I can assign the new mesh to the same joint. Double left click on the joint name so that it becomes outlined in black and then use Ctrl c to copy this joint name.
Note that some EA CAS meshes are assigned to more than a single joint. In this case any given section of the mesh will show colors that lie in a range between red and blue. In cases like these rather than manually assigning joints as this tutorial will show you are better off transferring weights from the EA item to your item using THIS TUTORIAL by Brujah.
Another thing to note is that any given vertex in your mesh should never have more or less than 100% weighting to any joint or group of joints. Over and under weighting of vertices will cause odd behavior in the game.
18. To begin assigning the joint to your accessory first left click on your accessory's name in the list on the right side of the 3D view box to select it. It will get an orange outline around it.
19. Click the + sign in the Vertex Groups section to add a new, unnamed vertex group. Double click the new vertex group (currently named Group) and paste the EA joint name in to overwrite the word Group.
20. Switch back into Edit mode. Make sure all the vertices of your mesh are selected. Selected vertices will be orange. If yours are not selected click the a key on your keyboard to select all vertices. If they do not all turn orange this means that some of the vertices were selected so Blender has deselected all vertices. In that case just click the a key again to select them.
22. Put a check in the Show Weights box.
21. Click the Assign button the the Vertex Groups section. Note that your mesh should now turn red indicating 100% assignment to the joint you added.
23. The next thing to do is make sure that your new mesh is vertex painted how EA's item is vertex painted. To begin you will first need to look at how the EA item you're working with is vertex painted. Left mouse click on the EA item's name in the mesh list on the right.
For CAS items EA uses vertex paint to tell the game whether the mesh should be considered a part of the Sim or not. For example, items like this earring will be vertex painted a dull green. This tells the game the earring is not a part of the Sim. If a player puts the earrings on a Sim in CAS and enlarges the Sim's head the earrings will not enlarge...they will stay the same size and in the same relative position to the Sim's head as they were in before the slider was used. Sim clothes on the other hand are painted a mix of bright yellow and green. If the slider is applied to a Sim the garment part that's painted yellow will expand as the Sim becomes larger and shrink as the Sim becomes smaller.
24. Switch to Vertex Paint mode and look at the EA earring mesh. You will see that it has turned a dull green color.
25. Now select your mesh in the mesh list and switch to Vertex Paint mode. Your mesh will be white which is Blender's default color for an item that has no vertex paint.
26. The Brush section will appear to the upper left side of the 3D view window. Select Hex.
27. Type 007F00 into the box below the menu bar as shown. You are selecting Hex because the green EA uses for this has a hex number of 007F00 and this is the most precise and easy way to get that color selected in Blender.
28. Click Paint in the menu bar below the 3D view box and select Set Vertex Colors from the popup menu that appears. This will set the vertex color on your mesh to the color you designated in the last step.
29. Right mouse click on the EA mesh's name in the meshes list on the right and select Delete from the popup menu. This will delete the EA mesh group.
30. Click File in the upper left corner of Blender and save your .blend.
31. Back in Studio click the Import button, navigate to where you saved your .blend, and import it into the .package. When the process is complete your new mesh will appear on the model in the model viewer window.
32. Click the small arrowhead in the LODs menu box and select the next LOD. Export that to Blender and check it to be sure it has the same mesh group setup as the LOD 0 has. If your LOD 0 had only a single mesh you can skip that. If the structure is the same you can use your LOD 0 mesh to overwrite the LOD 1. Before doing so you should decimating the mesh somewhat to lower the poly count. There is a tutorial HERE that shows how to use Blender's decimate modifier for this purpose.
If the LOD's mesh structure is different you will need to alter the cut numbers in your LOD 0 so they match the cut numbers in LOD 1 prior to using the LOD 0 to replace your LOD 1. Repeat this step for all the remaining LODs in the .package. Remember, the lowest LODs are only seen from a distance so it's fine to decimate them quite a bit.
33. Click the Swatch and Texture tab and import your first texture image.
34. If you want to add a second texture choice click the Add Swatch button.
35. If you want to select colors for your swatch thumbnails right mouse click in the first Swatch Thumbnails Color box to bring up the color picker. Drag that around your item in the model viewer to pick a color for the thumbnail. You can select up to three colors (one for each swatch thumbnail color box).
36. When you've added all your swatches click the Save button.
Test your item in the game.
If you have questions about this tutorial please post them in the thread below.
This tutorial will show you how to clone an EA accessory, switch out the mesh so that your new mesh takes its place, prepare your mesh for import back into the .package, and then get the .package ready for the game. This tutorial is meant for those who already know how to make a new accessory mesh and texture and will not show you how to create a new mesh. Instead the focus is on the Sims 4 specific elements of the process.
What you will need
Sims 4 Studio
Blender 2.7.0
Your fully mapped accessory mesh - note that your map should be in the same place on the image that EA's item is mapped in.
Textures for your accessory mesh
Instructions
1. Open Sims 4 Studio and enter your creator name if you have not already done so. Put a dot in the Create 3D mesh radio button.
2. Click the CAS button.
3. Use the filter boxes to limit the thumbnail list to the kind of item you want to make. This tutorial will use an adult female earring as the example item.
4. Click on the item you want to clone. If you would like all the swatches to be included in your .package hold down the shift key as you click. By default Studio will only include one swatch in a new mesh .package otherwise.
5. Click the Next button. Name and save your .package in your project folder.
6. Studio will open your new .package and the item you cloned will be displayed on the model in the model viewer. Click the Meshes tab to switch to the Meshes section.
7. This is the Meshes list box. By default it will show you LOD 0. If there is more than a single LOD in the .package this will contain a drop down list of all the LODs. LOD stands for Level of Detail and a CAS LOD consists of meshes, references to the bump image, and other data relevant to the item's behavior in the game. LOD 0 contains the meshes players see in CAS and when viewing the item close up in the game. The higher the LOD number the further away the player will be viewing the Sim when that LOD's mesh is displayed.
8. Leave LOD 0 selected and click the Export button to export it. Name and save the resulting .blend in your project folder.
9. Open the .blend using Blender. Scroll down on the right side until you see the S4Studio CAS Tools section. Make a note of the Type, in this case GEOM, and the Cut number, in this case 0000. When you add your new mesh to the scene it will need the same type and cut number in these fields in order for it to replace the original when you import this .blend back in Studio. If you do not enter the correct Type and Cut number Studio will not know that you want the original replaced and nothing will change when you import your .blend.
10. Create your new mesh, import your new mesh in, or, as shown here, append your new mesh into the scene.
11. With your mesh selected, scroll to the S4Studio CAS Tools section and enter the type and cut into the Type and Cut fields.
12. After assigning the type and cut the next thing necessary is to weight your mesh correctly. Weights are used by the game to determine which part of the Sim your item should move with. The first step is to see which bone or bones the EA item is weighted to so you can weight yours the same way. Left mouse click the Studio mesh in the meshes list on the right hand side. Click the small inverted triangle as shown to bring up the Object Data section. This will allow you to see the Vertex Groups section. This section contains a list of all the bones (aka joints) in the selected mesh group. This list will vary by item. Items like long hair will have numerous joints where simple items like this earring will have only one or two.
13. Select one of the bones by left clicking on it.
14. Switch to Edit mode and choose Solid shading because textured shading, which Studio exports as by default, will not show bone weights.
15. Click n on your keyboard to bring up the side bar menu if it is not already showing and put a check mark in the Show Weights box.
16. Look at the EA mesh to see what color it turns. In this case the mesh has turned blue. The blue color indicates that the mesh has 0% assignment to this joint.
17. Since the first bone I tried is not the correct bone I move on to the next by clicking on it in the list. This time the EA mesh turns bright red. The red color indicates 100% assignment to the joint. Now that I know which joint the EA mesh is assigned to I can assign the new mesh to the same joint. Double left click on the joint name so that it becomes outlined in black and then use Ctrl c to copy this joint name.
Note that some EA CAS meshes are assigned to more than a single joint. In this case any given section of the mesh will show colors that lie in a range between red and blue. In cases like these rather than manually assigning joints as this tutorial will show you are better off transferring weights from the EA item to your item using THIS TUTORIAL by Brujah.
Another thing to note is that any given vertex in your mesh should never have more or less than 100% weighting to any joint or group of joints. Over and under weighting of vertices will cause odd behavior in the game.
18. To begin assigning the joint to your accessory first left click on your accessory's name in the list on the right side of the 3D view box to select it. It will get an orange outline around it.
19. Click the + sign in the Vertex Groups section to add a new, unnamed vertex group. Double click the new vertex group (currently named Group) and paste the EA joint name in to overwrite the word Group.
20. Switch back into Edit mode. Make sure all the vertices of your mesh are selected. Selected vertices will be orange. If yours are not selected click the a key on your keyboard to select all vertices. If they do not all turn orange this means that some of the vertices were selected so Blender has deselected all vertices. In that case just click the a key again to select them.
22. Put a check in the Show Weights box.
21. Click the Assign button the the Vertex Groups section. Note that your mesh should now turn red indicating 100% assignment to the joint you added.
23. The next thing to do is make sure that your new mesh is vertex painted how EA's item is vertex painted. To begin you will first need to look at how the EA item you're working with is vertex painted. Left mouse click on the EA item's name in the mesh list on the right.
For CAS items EA uses vertex paint to tell the game whether the mesh should be considered a part of the Sim or not. For example, items like this earring will be vertex painted a dull green. This tells the game the earring is not a part of the Sim. If a player puts the earrings on a Sim in CAS and enlarges the Sim's head the earrings will not enlarge...they will stay the same size and in the same relative position to the Sim's head as they were in before the slider was used. Sim clothes on the other hand are painted a mix of bright yellow and green. If the slider is applied to a Sim the garment part that's painted yellow will expand as the Sim becomes larger and shrink as the Sim becomes smaller.
24. Switch to Vertex Paint mode and look at the EA earring mesh. You will see that it has turned a dull green color.
25. Now select your mesh in the mesh list and switch to Vertex Paint mode. Your mesh will be white which is Blender's default color for an item that has no vertex paint.
26. The Brush section will appear to the upper left side of the 3D view window. Select Hex.
27. Type 007F00 into the box below the menu bar as shown. You are selecting Hex because the green EA uses for this has a hex number of 007F00 and this is the most precise and easy way to get that color selected in Blender.
28. Click Paint in the menu bar below the 3D view box and select Set Vertex Colors from the popup menu that appears. This will set the vertex color on your mesh to the color you designated in the last step.
29. Right mouse click on the EA mesh's name in the meshes list on the right and select Delete from the popup menu. This will delete the EA mesh group.
30. Click File in the upper left corner of Blender and save your .blend.
31. Back in Studio click the Import button, navigate to where you saved your .blend, and import it into the .package. When the process is complete your new mesh will appear on the model in the model viewer window.
32. Click the small arrowhead in the LODs menu box and select the next LOD. Export that to Blender and check it to be sure it has the same mesh group setup as the LOD 0 has. If your LOD 0 had only a single mesh you can skip that. If the structure is the same you can use your LOD 0 mesh to overwrite the LOD 1. Before doing so you should decimating the mesh somewhat to lower the poly count. There is a tutorial HERE that shows how to use Blender's decimate modifier for this purpose.
If the LOD's mesh structure is different you will need to alter the cut numbers in your LOD 0 so they match the cut numbers in LOD 1 prior to using the LOD 0 to replace your LOD 1. Repeat this step for all the remaining LODs in the .package. Remember, the lowest LODs are only seen from a distance so it's fine to decimate them quite a bit.
33. Click the Swatch and Texture tab and import your first texture image.
34. If you want to add a second texture choice click the Add Swatch button.
35. If you want to select colors for your swatch thumbnails right mouse click in the first Swatch Thumbnails Color box to bring up the color picker. Drag that around your item in the model viewer to pick a color for the thumbnail. You can select up to three colors (one for each swatch thumbnail color box).
36. When you've added all your swatches click the Save button.
Test your item in the game.
If you have questions about this tutorial please post them in the thread below.