|
Post by mauvemorn on Oct 16, 2023 13:27:49 GMT -5
How to adapt alpha hair to The Sims 4
In this absolute-beginner-oriented tutorial, I will walk you through the process of adapting alpha hair to The Sims 4. It is suitable for those, who already have a textured hair model that requires transparency ( self-made, bought, extracted from other places, etc).
|
| This tutorial covers:
| This tutorial does not cover:
| - downloading, installing, configuring Sims 4 Studio and Blender;
- choosing and cloning a reference, exporting and importing resources;
- studying the structure of the hair .package and .blend files;
- fitting the hair to The Sims 4 body and preparing it to be adapted;
- re-arranging a UV map and a diffuse texture in accordance with The Sims 4 CAS template;
- making the hair move and morph by transferring weights, uv_1 and vertex paint;
- what is "transparency issue" and how to fix it;
- creating a temporary .package file, testing it in-game, troubleshooting;
- making hat chops;
- making hair one- or double-sided;
- studying and making diffuse, shadow, specular, and normal maps in Photopea;
- making LODs;
- sharing conversions;
- following this tutorial in Blender 2.7x.
| - modelling hair from scratch;
- editing hair or frankenmeshing;
- making a diffuse texture from scratch;
- extracting models and textures from games.
| If you will encounter problems while following this tutorial, do not hesitate to ask for assistance. However, please provide some relevant information to make it easier for me to identify the cause:
- description of your problem ( what is happening and when );
- picture of the problem, only if can be captured;
- .package file, with which the problem happens, and LOD 0.blend file you imported in it ( if you did );
- there is no need in providing anything else unless you have problems importing it.
To share these files, simply upload them on Mediafire, then copy and paste links in your post. You can delete these files after receiving a reply. If you will not receive a reply in 24 hours, please bump the thread, i just forgot ( write "bump" and post it )!
|
|
|
|
|
Post by mauvemorn on Oct 16, 2023 13:31:09 GMT -5
How to download, install, configure Sims 4 Studio and Blender 3.6+
Download the files:
- Go to Sims 4 Studio Beta version download section;
- Choose the correct version for your system;
- Scroll down to the Download links;
- Click on Download ( Installer ), download it in the opened window;
- If on Windows, click on Microsoft .NET Desktop Framework. The downloading process should start automatically;
- Click on the latest specified version of Blender, download it in the opened window.
|
| Install downloaded files ( NOT in Documents, Downloads, The Sims 4 game files, Desktop, other program's files ):
- Install Microsoft .NET Desktop Framework in the recommended location;
- Install Blender either in the recommended location or on the D drive;
- Install Sims 4 Studio either in the recommended location or on the D drive.
|
| Change Sims 4 Studio settings:
- Start Sims 4 Studio;
- If you're doing it for the first time ever, you'll be greeted with Sims 4 Studio settings right away;
- If not, in the top toolbar choose Settings;
- Choose a name;
- Navigate Sims 4 Path to the installation folder of The Sims 4. The path must end at \The Sims 4\, not \The Sims 4\Game\Bin\;
- Navigate Sims 4 Documents to C:\Users\(username)\Documents\Electronic Arts\The Sims 4;
- Navigate Blender path to blender.exe in the installation folder of the version of Blender that you will be following this tutorial in;
- Save;
- It is best to restart Sims 4 Studio.
|
|
|
|
|
Post by mauvemorn on Oct 19, 2023 11:34:07 GMT -5
How to choose, clone and export a reference Choose the right reference:
How your item should behave in-game depends on its shape. Choosing a reference that resembles your item, transferring all the data from it, recreating its structure and textures will ensure correct functioning and prevent 99% of problems. Disregard your item's texture and mentally describe its shape, answering these two questions:
- how long is it?
- what areas of the body it covers?
After that, find a maxis hair that fits the same description ( can be a bit longer ). It does not need to be of the same hair pattern, be Base Game compatible, have the same volume.
| Example: chin-length hair with curtain bangs ( covers the face a bit ).
| Find a suitable reference and clone it:
- In Sims 4 Studio main menu choose Create CAS Standalone* under CAS;
- Click on CAS;
- Filter** the catalog by Part type, Gender and age;
- Find a suitable item, Shift-click on one swatch to select them all;
- Click on Next;
- Name your new .package and save it somewhere.
** Hovering over an item shows its name. It includes the hair color as well. For convenience, you can filter the catalog by the hair color to see only one swatch instead of all.
|
| Automatically* extract all resources from the .package file:
- Open the console by pressing Shift Ctrl C **;
- Paste studio.exportall ***
* Once you enter this cheat, Sims 4 Studio batch exports all resources into a new folder, located in the same place as the .package file. It will be named (the name of your .package)Resources. Doing the extraction this way not only saves time, but allows to batch import everything back, so long the names stay the same;
** Same as in The Sims 4; *** If you will forget it, type in help to see all cheats. This one is at the bottom of the list.
|
|
|
|
|
Post by mauvemorn on Oct 19, 2023 11:38:03 GMT -5
The Sims 4 hair components
The hair .package contains the following resources: - Four LODs in .blend format. They define the shape and the functionality of the hair;
- Diffuse map is the base texture that includes color and shading information. Unlike other maps (by default ), it is unique to every swatch, so there are 24 of them;
- Shadow map contains a "shadow" that the hair casts on the body;
- Specular map comes in two files and is responsible for the shine on the surface of the hair;
- Normal map imitates and enhances details;
- Emission map is responsible for dynamic light ( not used with hair ).
|
| What functions the hair performs and what is responsible for each of them:
- Interaction with hats. Each .blend contains three versions of the hair: base shape and two hat chops. They have different cut numbers, which is what allows Sims 4 Studio to import them back in the correct order and replace corresponding parts of the original hair;
- Displaying textures. uv_0 controls how they are projected on the surface of the hair;
- Morphing ( change in shape during face/body customization ): uv_1 controls how deformation maps are applied and vertex paint defines their variation;
- Moving. When a sim moves, the hair must follow. Rigging is a process of defining how it will happen. Vertex groups named after bones are responsible for this.
All of this will be covered in greater details later in the tutorial.
|
|
|
|
|
Post by mauvemorn on Oct 19, 2023 11:40:01 GMT -5
Preparation
Clean up and re-export the file to remove unnecessary data ( extra uv maps, vertex groups, materials ) and de-clatter the scene ( from the rig and other objects ) without doing it by hand:
- If the file you have comes in .blend format, open it;
- If not, open a new scene in Blender and import the file with File - Import, choosing the correct format;
- If the hair is not the only thing imported, you need to get rid of everything else. Click on the hair in 3D view, switch to Edit mode;
- Most likely it will have a separate material assigned to it, so you can select the whole hair by material;
- If not, press C, LMB-click and drag to select some areas of the hair, press Esc. Then Select - Select linked to select the whole hair. If not everything was selected, change the view* and select more;
- Select - Invert to select everything else. Press Delete key, choose Faces;
- File - Export - Wavefront ( .obj ), enable Selection only. Exporting in .obj will remove all unnecessary data, leaving only the mesh ( shape of the hair ) and a UV map;
- If the downloaded file does not come with separate textures of the hair, switch Editor type to Image editor, click on Browse button to see all images, choose the hair one(s), only Diffuse and Normal ( purple map, if there is one), and Image - Save as ( save as .png ).
* Navigation and selection shortcuts:
- Scrolling mouse wheel - to zoom;
- Pressing mouse wheel and moving the cursor - to rotate;
- Pressing mouse wheel while holding Shift - to pan;
- LMB-click - to select;
- LMB-click while holding Shift - to add to selection.
|
| Import .obj into LOD 0.blend and assign textures:
- Open LOD 0 from the folder with resources;
- In 3D view click at the top of the hair to select it, double-click on its name to rename it to Reference;
- Hide Reference and both s4studio_mesh_;
- File - Import - Wavefront ( .obj ), choose the .obj file you exported;
- Renamed the imported mesh to Hair;
- With Hair selected, switch from UV editor to Shader editor;
- The hair should come with a material, so if you see nothing, make sure Use nodes is enabled. If there is no material at all, create it;
- Add - Texture - Image texture;
- Click on Open and choose the diffuse image you exported from a previous .blend ( or the one that came with the hair files );
- Click on the yellow dot next to Color, drag to connect with Base color;
- Click on the white dot next to Alpha, drag to connect with Alpha;
- Optionally change Roughness to 1;
- In Materials tab enable Backface culling;
- Change Blend mode to Alpha hashed for now.
|
| Reshape the hair to fit the head:
- Press NUM5 to switch to the orthographic view*, then NUM1 to switch to the front view;
- Switch to Edit mode ( transform** the mesh in Edit mode only);
- Select everything with A, press G Z on your keyboard and move the hair up ( or down ) to the head level;
- If the wireframe makes the process harder, hide overlays;
- Press S to make it bigger ( or smaller );
- Make sure the hair fits right from the front view first, ignoring the hairline clipping into the head;
- Switch to the side view with NUM3 ( or Ctrl NUM3, if you need the other side), press G Y to move the hair forward;
- Using aforementioned shortcuts, make sure the hair fits well, once again disregarding the hairline;
- Enable X-ray to see vertices hidden inside the scalp;
- Optionally change Transform orientation to Normal to move the vertex along its normal;
- Enable Proportional editing to move the surrounding area as well;
- Select one vertex in the area that sinks into the scalp. Press G Z and scroll the mouse wheel up until you see the radius. Move the vertex while adjusting the radius until the hairline does not clip anymore;
- Select different vertices along the hairline and move them freely or along axes/their normals until the mesh fits the head well enough.
* View shortcuts: - NUM5 - Perspective/Orthographic;
- NUM1 - Front;
- NUM3 - Left side;
- NUM7 - Top;
- NUM9 - The opposite view.
Preceded with Ctrl, these shortcuts show the opposite side.
** Transform shortcuts: - G - Move;
- S - Scale;
- R - Rotate.
Follow with an axis ( X - horizontal, Z - vertical, Y - depth ) to constrain the change to it. Follow with the number to change by that number.
|
| By default, geometry displays textures only on the front side, backface appears transparent. In Blender, it is possible to make it appear double-sided by disabling Backface culling. It is also possible to do that with objects in The Sims 4, but not with CAS item. In this case, you have to add the other side manually. The same problem and solution exist in other games as well, so your hair mesh may already come double-sided. If that is the case, you must remove the other side, otherwise it will create many problems later.
If a portion of the hair mesh disappeared when you enabled Backface culling, it is one-sided. However, you can double-check by enable Face orientation.
Case A: backfaces are red - one-sided mesh.
- Switch to Edit mode, select everything with A;
- Mesh - Merge - By distance, with Merge distance set to 0.0002 or so. Doing this removes unwanted gaps in the mesh.
Case B: mixed colors - double-sided mesh with identical sides.
In this case, the backside was created by duplicating, offsetting and flipping strands. While they are identical by vertex count, edges most likely differ ( the mesh is triangulated automatically after that ). Converting tris to quads ( Face - Tris to quads ) may not make them identical and would require re-exporting/re-importing the mesh ( for some reason, Sims 4 Studio does not like how Blender triangulates meshes, which manifest itself in triangles like this ). Anyway, you can try the following, but if it won't make the mesh look like in Case A, undo and remove the other side manually, as explained in Case C:
- Switch to Edit mode, select everything with A;
- Mesh - Merge - By distance, with Merge distance set to 0.0005 or so. Doing this removes unwanted gaps in the mesh and merges both sides into one;
- With everything still selected, Mesh - Normals - Recalculate outside;
- If it won't work, undo this and do as explained in Case C.
Case C: red pokes through blue randomly - double-sided mesh with decimated back side.
- When the other side is added, the number of tris the hair is made of doubles. Some creators decimate ( or manually remove edges from ) it to reduce the polycount. As a result, strands differ and do not merge into one fully. Unfortunately, there seems to be no way of selecting just these red areas automatically, so you will have to remove them manually;
- In Edit mode choose Face select;
- Select one red face, holding Shift, select a few more on other strands;
- Press Ctrl L to select whole strands;
- Delete - Faces;
- Continue doing this until the mesh looks like in Case A;
- Once done, select everything with A, Mesh - Merge - By distance, with Merge distance set to 0.0002 to remove unwanted gaps in the mesh.
|
| Polycount is a number of units an object is made of. As in most games, this unit is a triangle ( tri ). The more of them there is, the harder it is for the game to process and render them all. The most complex Maxis meshes almost never go past 10k tris and you don't want yours to exceed this number by a lot, otherwise they can increase loading time, worsen performance, crash the game ( around 60k), or even not import in Sims 4 Studio at all ( around 130k ).
Reduce the polycount, if needed:
- Select the hair, add Decimate modifier;
- You can see the polycount here;
- If it does not go above 10k, it's fine;
- If it goes above that, it is best to reduce it, because you will need to add the other side and hat chops later, all of which will add up;
- Lower Ratio, stopping just before the mesh starts to visibly change;
- Before you apply it, check the mesh from all angles to make sure it looks the same. This is a very destructive modifier, it can ruin not only the shape but UVs as well, which will change how textures are projected;
- If it starts to break while the number is still too high ( say, 30k and above ), it is best to either not add hat chops later or choose a different hair altogether.
|
|
|
|
|
Post by mauvemorn on Oct 26, 2023 5:49:16 GMT -5
How to re-arrange a UV map
UV mapping is a process of creating a two-dimensional representation ( UV map ) of a three-dimensional object, generally with the purpose of defining how textures are projected on its surface. In The Sims 4, CAS items have two UV maps and this function is performed by the first one in the list. Unlike objects, almost all of them share the same UV space that is divided into areas by category. So, your item's UVs must go into the space meant for its category, otherwise it will conflict with other CAS items.
In three-dimensional space there are three dimensions ( width, depth, height), so each point has three coordinates ( X, Y, Z ). In two-dimensional space there are two dimensions ( width, length ), so each point has two coordinates ( U, V ). This is why these coordinates are called UVs.
|
In the image you see a cube with 6 sides. Each of them displays a specific area of the texture. When you move UVs of one side to a different area of the texture, its color changes accordingly.
| Modify the existing UV map:
- Download all or a specific template from here. The hair area is the same for all humans;
- Switch from Shader editor back to UV editor;
- In UV editor select all UVs with A, click on Open and choose this template;
- Assigning a rectangular image to UVs, created in the square UV space, stretches them vertically. You must bring them back to their original shape before re-arranging. To do this, with all UVs still selected, press S Y 0.5;
- Use S Y 0.49 this time to shrink them a bit more than in half. Using G ( move ) shortcut, put your UVs in the space meant for hair;
- Make sure there are at least a few pixels between the borders of the UV space and the UVs;
- Once done, with all UVs still selected, UV - Export UV layout. You will use this image as a guide when editing textures.
|
|
|
|
|
Post by mauvemorn on Oct 26, 2023 12:40:26 GMT -5
How to re-arrange existing textures
- Go to www.photopea.com/;
- Click on Open from computer, choose the UV layout you exported after re-arranging uv_0;
- File - Open and place, choose the diffuse texture and the normal map ( if there is one );
- Click and drag the layout on top, change opacity to 20% and blending mode to Multiply;
- Select the diffuse, Shift-select the normal, Edit - Free transform, type in 49% ( if your image is 1024x1024 or bigger, do 98% if 512x512 );
- Align them with the UV layout;
- Hide the UV layout and the normal map layers;
- File - Export - .png;
- Hide the diffuse, unhide the normal map;
- File - Export - .png;
- You can close this file without saving and return to Blender;
- Change the image in the hair material to this one.
| |
|
|
|
Post by mauvemorn on Oct 26, 2023 13:11:34 GMT -5
How to make an item move and morph by transferring weights, uv_1 and vertex paint
The easiest way of making your hair move and morph is to transfer all data responsible for these processes from a maxis item. You do not need to understand how any of this works to be able to do it, but it would be beneficial to know what is responsible for what to identify causes of problems.
Movement is controlled with vertex groups. If an area is assigned to b__Head__, it will follow the head movements, and so on.
Morphing is controlled with multiple components:
- uv_1 defines how deformation maps are applied. For example, if a vertex is in the chest area of deformation maps, it will be affected by chest morphs;
- vertex paint defines according to which variation of deformation maps an area morphs, how it behaves when hovered over in CAS, what morphs affect it. Three vertex colors can be found on hair meshes:
- 007F3F along the hairline ( to morph with Details mode morphs );
- 007F02 from roots to the chin ( related to head width Dmap );
- 007F00 from the chin to tips ( to not highlight when hovered over ).
- some vertex groups. There is a limit to how far a Dmap can push the geometry, so vertex groups with _CAS_ in their names are used to exceed it.
|
| Prepare the reference ( done with hair meshes only ):
- Hair meshes are split in many places, which produces a very torn up uv_1 transfer result. It is best to remove those gaps;
- Select your reference;
- Switch to Edit mode;
- Select everything with A;
- Mesh - Merge - By distance, with Merge distance set to 0.0001.
|
| Transfer weights, uv_1 and vertex paint with Data transfer. The result may not always be perfect, but it is best to solve problems as they come:
- Unhide the reference. It must be visible* ( eye icon ) and selectable* ( cursor icon );
- Select your hair;
- In Modifiers tab add Data transfer modifier;
- Choose Reference as Source object;
- Enable Vertex data and expand it;
- Enable Vertex groups*;
- In Mapping choose Nearest face interpolated;
- Enable and expand Face corner data;
- Enable Colors*;
- Shift*-click to enable UVs as well;
- In Mapping choose Nearest face interpolated;
- Expand UVs, choose uv_1 in Layer selection ( don't forget, otherwise uv_0 will be overwritten as well);
- Click on Generate data layers*;
- Apply the modifier;
- In Data tab expand UV maps. Double-click on UVmap, rename it to uv_0;
- If uv_1 appeared, it most likely transferred successfully. You can edit it further, but it is not necessary;
- Expand Color attributes. If you see color0, it transferred;
- Expand Vertex groups. If you see names of vertex groups, they most likely transferred successfully. However, there is one ( or two ) more thing(s) you need to do;
- If you're using Blender 2.76 - 2.79, 3.6.1, switch to Edit mode, select everything with A, Mesh - Weights - Clean with Subset set to All groups to fix the result of a bug that exists in these versions;
- Regardless of your version of Blender, in Edit mode, with everything still selected, do Mesh - Weights - Limit total.
* Data will not transfer if you will forget to do these steps!!! | |
|
|
|
Post by mauvemorn on Oct 26, 2023 13:12:45 GMT -5
How to fix the transparency issue with alpha hair in The Sims 4
Important note: if you found this post by googling or it was linked to you, make sure to prepare your hair fist by assigning the material and removing the other side as explained in the second and third sections here, otherwise nothing will work!
Alpha is a grayscale channel that controls the opacity of the image, which is why this word is used to describe the style of CC hair, textures of which require transparency. Since Maxis hair is fully opaque, the default material ( Simskin ) it and most other CAS items use does not support transparency. For this reason, a different one ( Simglass ) is assigned to alpha hair.
Problem is, Simglass is meant for ... glass(es). Unlike hair strands, lenses are not meant to overlap, so the game is not programmed to render them by distance from the camera. This issue is called Z-sorting and, in simple cases, it can be dealt with through layering. If these conflicting areas are selected and joined from top to bottom, the game will render them in this order as well.
In more complex cases, the hair may be split into two parts: the one that needs transparency and the one that does not. This minimizes the amount of conflicts to sort.
|
Simskin l Z-sorting issue with Simglass l Fixed Z-sorting
| If your hair came in two parts ( if no, skip this section ):
- Enable UV sync selection;
- Select UVs of strands that do not need transparency;
- In 3D view press P, choose Selection;
- Optionally rename this separated meshgroup to Simskin and the other one to Simglass;
- Everything explained below should be done on Simglass part only.
If you made or will ever make your own alpha hair from scratch, try to do it this way. This is the only way of eliminating transparency issue completely.
|
| Separate the hair into layers to have an easier time re-ordering them:
- Switch Viewport shading from Material preview to Solid;
- If it is possible to select the tips, start from the bottom. If you can select them on both sides at once, enable X-ray;
- Switch to orthographic ( NUM5 ) side ( NUM3 ) view;
- In Edit mode press B, click and drag to select strands at the bottom;
- Press Ctrl L to select whole strands;
- Press P, choose Selection to separate them;
- Next, select flyaways. Disable X-ray;
- Switch to the top view ( NUM7);
- Hover a cursor over one thin strands, press L, select all of them like this, separate;
- You may be able to tell where the layer's UVs are by the texture and select them from UV editor;
- If that is the case, enable UV sync selection, selected them with B, then separated in 3D view;
- If strands do not form clear layers like in my case, group them yourself;
- Starting from the top, with X-ray disabled, select the root area, Ctrl L, separate;
- Continue until there's nothing at the top, then move to the sides;
- When you're done splitting the hair, rename layers in accordance with their order ( either with top/middle/bottom or numbers );
- Switch Viewport shading back to Material preview.
|
| Check each layer and join all in the correct order:
- In the Material tab change Blend mode to Alpha blend. Make sure Backface culling and Show backface are enabled;
- Now you should be able to see the transparency issue in 3D view;
- Hide all but one layer;
- Check from all sides if there are any strands that "stick out";
- If there are, switch to Edit mode, hover a mouse over it, press L to select it, separate;
- Switch to Object mode. In my case, the strand should be at the bottom, so I will select it last. In the outliner, select the main layer first, holding Ctrl, select the separated strand. In 3D view press Ctrl J to join. The issue should disappear. If not, undo and try selecting and joining in a reversed order ( depends on where the strand is);
- Once done, hide this layer, unhide another, repeat the same steps, if needed;
- Continue until all strands are sorted within their layers;
- Once done, unhide all layers;
- The idea is to join everything, starting from the top. Holding Ctrl ( not Shift), in the outliner select layers from the top one to the bottom one, then join in 3d view;
- If your hair is taller on one side, you may be able to see the smaller side through it. This issue is insignificant and can be ignored. Layering alone does not always give perfect results. If you want to minimize it further, you can split the hair in the left and the right sides, then join them in a way that makes sense.
| |
|
|
|
Post by mauvemorn on Nov 5, 2023 6:18:01 GMT -5
Testing and troubleshooting
If your hair is made of one meshgroup:
Your .blend file has one meshgroup, the package you cloned initially has three. If you were to import it back, only one meshgroup would be overwritten while the other two would stay. You can duplicate that meshgroup twice, assign different cuts and import it back to overwrite all three, but it can dramatically increase the loading time. Instead, you can create a temporary package made of one meshgroup:
- Hide the reference. Keep original hat chops hidden as well, neither will import this way;
- Give your hair 0 cut number;
- Make sure the hair itself is visible and selectable;
- Save it as LOD 0.blend in your resources folder;
- In Sims 4 Studio choose ymHair_BuzzCutNatural for the appropriate frame, clone it, name it test.package, save in C:\Users\(username)\Documents\Electronic Arts\The Sims 4\Mods;
- In Meshes tab, import your LOD 0.blend file. The hair will appear transparent because there's no texture;
- In Texture tab import the re-arranged diffuse texture;
- Optionally remove other textures with Make blank;
- If making hair for the feminine frame, in Categories tab enable Feminine fashion, otherwise it will be hidden in the catalog ( unless the fashion tag is removed );
- In the top panel choose Tools - Modding - Glass shader ( CAS );
- Save, start the game.
| | If your hair is made of two meshgroups ( opaque part separated ):
- Hide the reference. Keep original hat chops hidden as well, neither will import this way;
- Assign 0 cut number to Simglass meshgroup, 1 to Simskin;
- Make sure both meshgroups are visible and selectable;
- Save the file as LOD 0.blend in your resources folder;
- In Sims 4 Studio choose ymAcc_GlassesSquare ( unisex glasses ), clone it, name it test.package, save in C:\Users\(username)\Documents\Electronic Arts\The Sims 4\Mods;
- In Meshes tab import your LOD 0.blend file. The hair will appear transparent because there's no texture;
- In Texture tab import the re-arranged diffuse texture;
- Save, start the game.
|
| In CAS, do the following:
- Choose a default sim, no custom presets or any other CC;
- Choose your hair;
- Change the width of the head to see if the hair follows tightly;
- If the hair reaches breasts, change their size and height to see if it morphs smoothly;
- Check if it clips into ears ( the ears on the avatar in Blender differ from in-game ones );
- Assign different traits while zoomed in on a sim's face to see how/if facial bones affect the hair or how it bends in the neck area;
- Check if strands are layered correctly.
Troubleshooting:
- If the mesh moves or morphs in an odd way, check out this post;
- If there are still some solvable layering issues, try experimenting with layering.
|
|
|
|
|
Post by mauvemorn on Nov 11, 2023 13:33:47 GMT -5
How to make hat chops
Proper hat chops prevent your hair from clipping into hats. However, if you don't mind that, you don't have to make them. What to do in this situation will be explained later, just move onto the next post.
| | To make proper hat chops:
- Open LOD 0;
- Select your Reference, check its cut number ( usually 2 ), then delete this meshgroup, you no longer need it;
- To avoid confusion, just this time, rename your hair to Base_shape_2 and give it 2 cut number. Then rename two remaining meshgroups of the reference hair to Reference_hat_chop_( its cut number );
- Select Base_shape_2. If your hair is made of two meshgroups, just treat them like one object, always selecting both. In 3D view press Shift D to duplicate, then Esc to confirm, then hide it;
- Rename the duplicated version to Hat_chop_0 and give it 0 cut;
- Unhide Reference_hat_chop_0 while keeping the other one hidden;
- You can switch Viewport shading to Wireframe to see the reference better or you can make only your hair be displayed as wire. I find the latter more convenient, so with Hat_chop_0 selected, switch to Object tab and Change Display as to Wire;
- Switch to Edit mode;
- Enable X-ray;
- Proportional editing should still be enabled, disable Connected only;
- Hats generally push the hair closer to the scalp, so you may need to adjust the shape before cutting. Don't try too hard at this point, it would be easier to polish the result later, when it's cut;
- Switch to the side view, press C, click and drag to select the top of the hair, press Esc;
- Press S Y and scale down the selection a bit while adjusting the radius;
- Switch to the front view and shrink the mesh with S X;
- In Object mode duplicate Hat_chop_0 to not repeat the process for a second hat chop. Rename the duplicated one to Hat_chop_1, give it 1 cut, hide it;
- Back to Hat_chop_0. In Edit mode click and hold on the Knife tool to choose Bisect instead;
- With everything still selected, click and align the cut with the hat chop underneath. Use the yellow arrow and the blue circle to adjust it further, if needed;
- Mesh - Split - Face by edges to cut the mesh;
- Press Alt A to deselect everything;
- Press B, roughly select some faces above the cut, press Ctrl L to select the whole area, Delete - Faces;
- Hide Hat_chop_0 and delete Reference_hat_chop_0;
- Unhide Hat_chop_1 and Reference_hat_chop_1. Repeat steps 17 - 20;
- Unhide Hat_chop_0. Select it, Ctrl-select Hat_chop_1, switch Display as from Wireframe back to Textured;
- Switch to edit mode and adjust places where the mesh clips into head. It is faster to do this on both meshes at once;
- You should be left with Base shape ( cut 2 ), Hat_chop_0 ( cut 0), Hat_chop_1 ( cut 1 ). If your hair had the opaque part, there will be 6 meshgroups. Assign cut numbers to them the following way:
- First hat chop - 0 (opaque) and 3 (with transparency);
- Second hat chop - 1 and 4;
- Base shape - 2 and 5.
- All meshgroups must be visible. All parts of the original hair should be deleted. Do not touch the rig, though. Save.
|
|
|
|
|
Post by mauvemorn on Nov 12, 2023 16:56:44 GMT -5
How to make hair double-sided
- This step should be done after hat chops are made, otherwise proportional editing will make strands clip into each other;
- Adding the other side to the whole mesh doubles the polycount. If your hair is low poly ( below 5k tris ), you can do this, so skip steps 4 - 5. But it would be a better idea to add it only where it is visible, otherwise it serves no purpose;
- Switch shading to Solid;
- Enable Face orientation;
- Hide hat chops, select the base shape. Switch to Edit mode. While panning around it, hover the cursor over every red strand you see and press L to select it;
- With all of them selected, press Shift D to duplicate, Esc to confirm. The next three steps are done without deselecting;
- Press Alt S -0.0001 to offset along normals;
- Mesh - Normals - Flip to change their orientation;
- P - Selection to separate;
- Switch to Object mode;
- In the outliner select the first mesh, Ctrl-select the second ( separated, with .001 ), Ctrl J to join;
- Hide the base shape, unhide one hat chop, repeat.
| |
|
|
|
Post by mauvemorn on Nov 14, 2023 15:17:10 GMT -5
How to recolor diffuse textures ( in 24 default hair colors )
Diffuse map defines colors and patterns of the item. In The Sims 4, it also contains shadows and highlights. Note that diffuse maps are the only ones you can preview in Sims 4 Studio, everything else must be checked in-game.
|
| In the corner of diffuse textures of yfHair_FrenchBraidBun, you can find the exact colors maxis hair textures are drawn with. As you can see, they are not of the same hue, which is particularly noticeable in white, hot pink and green swatches. This means Maxis developers do not create them by overlaying one color on the grayscale image, as it is done in most other games.
Unfortunately, it is not possible to recreate their process while starting from existing textures. However, you can get good enough results using the file I made below.
|
Exact colors used in making maxis textures, sampled from yfHair_FrenchBraidBun | - Go to Photopea again;
- Download this .psd file, File - Open;
- File - Open and place, choose the diffuse image you made previously;
- Click and drag your diffuse texture to move it to the bottom of the list;
- Ctrl-click on the thumbnail of your diffuse layer to select its content;
- Select Colors folder;
- Add Raster mask to bring back the transparent background;
- Double-click on the Desaturation layer's thumbnail, adjust lightness to match the Maxis blond texture. It will not be perfect and does not need to be, just get it close enough;
- Hide the maxis texture;
- Expand Colors folder, hide Swatch_14_Diffuse_1, unhide Swatch_1_Diffuse_1;
- Double-click on the name of this layer, copy it with with Ctrl C;
- File - Export as - PNG;
- Paste Swatch_1_Diffuse_1 into the Name field, increase the quality to 100;
- The file will be downloaded into your Downloads folder, leave it there for now;
- Hide Swatch_1_Diffuse_1 folder, unhide Swatch_2_Diffuse_1;
- File - Export as - PNG, paste Swatch_1_Diffuse_1, change 1 to 2 ( Swatch_2_Diffuse_1 );
- Continue doing it until you reach Swatch_23_Diffuse_1.
| | Make Salt and pepper swatches:
- Make Swatch_23_Diffuse_1 visible;
- Create a new layer;
- Choose white color;
- If you have a tablet, draw it in a way you know. If not, draw a line, then spread it along the strand using the Smudge tool;
- Use the Eraser tool with a soft brush to erase unwanted areas;
- Once done, duplicate the layer and remove some of the paint to create white highlights;
- File - Export as - PNG;
- Hide Swatch_23_Diffuse_1, unhide Swatch_24_Diffuse_1, export as .png;
- It would be best to export .psd file as well ( File - Save as PSD ) that you can reuse later, if needed.
|
|
|
|
|
Post by mauvemorn on Nov 17, 2023 10:20:31 GMT -5
How to make a normal map
Normal map alters how light interacts with a 3D model's surface, thus enhancing the appearance of existing details or faking non-existent ones.
Note that normal maps can be previewed only on Medium and higher graphics settings in-game.
Study the original normal map:
- Open Shared_Normal_1;
- Unlike the diffuse, this one is square, so you will need to crop yours;
- Unlike the standard normal map, it is grayscale, not purple, so you will need to convert it;
- The background is not transparent, but it is see-through.
|
| If your item did not come with a purple normal map, make it first: - Open a desaturated version of your diffuse ( either from the previous file, or Swatch_17_Diffuse_1) in Photopea;
- Filter - 3D - Normal map, enable Invert;
- Increase Blur a bit, click Ok.
| | Convert a standard purple normal map to a TS4-specific one:
- Open the purple normal map;
- New adjustment layer - Color fill;
- Type 848484 in the #: field, hit Ok;
- Click and drag the added layer down, so that it comes first;
- RMB-click on either of them and choose Flatten image to merge;
- Switch to Channels;
- Select the green channel;
- Hover a cursor over the image, press Ctrl A to select everything, then Ctrl C to copy;
- Select the RGB channel again;
- Switch back to Layers;
- Press Ctrl V ( Shift Ctrl V for Photoshop ) to paste the copied channel as a new layer;
- Select it, click on Add Raster mask;
- Hide the pasted layer so that the purple one is fully visible again;
- Switch to Channels again, select the red channel, copy it as you did the green one, switch back to RGB and Layers tab;
- Unhide the hidden layer, select the mask;
- Paste the copied red channel in this mask as you did previously;
- Select the original purple layer, delete it;
- Image - Canvas size;
- Disable Keep aspect ratio;
- Change Height to 1024;
- Change Anchor;
- Click Ok to crop;
- File - Export as - PNG, name it as Shared_Normal_1.
|
|
|
|
|
Post by mauvemorn on Nov 17, 2023 10:21:38 GMT -5
How to make a specular map
Specular map defines type, strength and placement of shine on the item. Note that specular maps can be previewed only on Medium and higher graphics settings in-game.
Study the original specular maps: - There are two files, Shared_Specular_1.png and Shared_Specular_1.mask.png. The first one defines the type of shine the item has, the second one controls the layering of specular maps of different CAS items;
- Both of these maps are half the size of the diffuse;
- The first one needs transparency, the second one does not;
- I took a look at specular maps of different hair items and they all seem to be made the same way, so you can follow blindly, without converting transparency to a mask and sampling colors.
| | Make Shared_Specular_1.png first:
- Open a desaturated version of your diffuse in Photopea;
- Image - Image size, change width to 512, the height will be changed automatically, click Ok;
- Ctrl-click on the Layer thumbnail to select everything this layer contains;
- Press Ctrl C to copy;
- Without deselecting, add a new Color fill layer, paste 005d00 into the hex code field, click Ok;
- Alt-click on the mask to switch to it, press Ctrl V to paste;
- Edit - Adjustments - Layers;
- Adjust the levels to make the image much darker until it looks somewhat like in the picture;
- Click on the layer thumbnail to exit the mask window;
- Hide the original texture;
- The result will look almost invisible, this is how it should be;
- File - Export as - PNG, name it as Shared_Specular_1. Do not close the file;
|
| Make Shared_Specular_1.mask:
- Choose the Rectangle select tool;
- Select the area of the texture meant for hair;
- Create a new fill layer, choosing white color;
- Hide the green fill layer and the original diffuse;
- Create a new fill layer, choose pure black, move this layer to the very bottom;
- Now you should have a black and white image;
- File - Export as - PNG, name it as Shared_Specular_1.mask;
- File - Save as PSD. If the shine is too strong, you may need to return to this file to make the green layer's mask darker. Shared_Specular_1.mask must stay black and white.
|
|
|
|