Create an account

Making a CAS slider with TS4MorphMaker using a Deformer Map

Upload: 13 Apr 2022, 14:30
Created by: CmarNYC [X]
Uploaded by: Aqxaro

What this tutorial will do: Show you how to use TS4 MorphMaker to create a custom body slider using a Deformer Map morph.

What it will not do: Show you how to use a mesh editor. It's assumed you know the basics.

Level: Fairly advanced. Warning for lots of technical stuff, but you don't have to understand everything to make a working custom slider.

Tools needed:

  • TS4 MorphMaker
  • Milkshape 3D (http://www.milkshape3d.com/ $35/25 Euros, 30 day free trial), Blender 2.75 or above (https://www.blender.org/download/) used with the correct OBJ import/export settings, or another mesh editor that handles OBJ meshes and exports them without changing the order of the vertices or composition of the faces. (Tested with Milkshape and Blender.)

First, some technical background. There are three morphing mechanisms in The Sims 4:

Deformer Map (DMap) - Uses information encoded as a bitmap image to tell the game how to modify vertex position and normals. The UV1 (second uv map) of the mesh is used to get xy coordinates to find the right location in the image. There are two DMaps for every morph: one for shape and one for normals. This method will work on any mesh with a correct UV1, including all lods. Only morph data for the sim's left side (your right side) is used and mirrored for the other side, so you can't make an assymetrical morph. DMaps are less precise than the other methods. They cannot be used for fingers or tongue and should be avoided for eyeballs, teeth, and possibly backs of ankles because of the way they're mapped in the UV1. (See notes.)

Blend Geometry (BGEO) - Uses vertex ID numbering to find information in a BGEO file which tells the game how to modify vertex position and normals. This method is more precise but requires that the vertices be numbered and that the numbering corresponds exactly to the data in the BGEO. In TS4 only head meshes are numbered, so BGEO morphs can be used only for heads/faces. However, all the head meshes in TS4 are constructed and numbered exactly the same way so one BGEO can be used for all ages/genders if it looks good in all of them. Each lod must be meshed separately but all lods are included in one BGEO. BGEO morphing is the most precise method.

Bone Delta (BOND) - Uses modifications to the location, size, and rotation of bones/joints. The locations of vertices are moved accordingly. This method can be used with all meshes, including all lods, and requires only correct bone assignments. Does not affect normals. For morphs involving simple adjustments to position or size of a part bone deltas are the most efficient method. It's also the only way to adjust height without deformation.

Making a CAS Slider:

In this tutorial we will make a new slider for the butt using a Deformer Map (DMap) morph. I'll cover the whole process but you can certainly skip the robe morph and/or only do one morph instead of both butt high and butt low.

Background on how TS4 DMap sliders work:

Every CAS Part that needs to morph has a second uv, the UV1. Here's the male nude UV1: (The female, child, and toddler UV1s are almost identical.)

There's an image in the EA game files called the CASHotSpotAtlas (TGI 00b2d882:00000000:acc70cc7299a9662) which is mapped to the UV1 of sim meshes. (Specifically to the right side only, the left side is mirrored.) This image defines which sliders are used on which areas of the sim's face and body. Each channel in the image corresponds to a different editing level:

Red: Unused
Green: Normal or macro mode.
Blue: Top level, used to select head, upper body, lower body, or feet. The only one that seems to be implemented is the head size slider.
Alpha: Micro mode when editing the face.

Each color value in the CASHotSpotAtlas channel corresponds to a HotSpotControl resource which defines which sim modifiers to use for each slider direction in each angle from which you're viewing the sim.

The HotSpotControl contains fields with a color value, the editing level, the type of cursor to use, the sim modifiers to use for each slider direction in various viewing angles, etc. Different HotSpotControls can be used for each age/gender/body frame.

The Sim Modifiers link to morph resources such as BGEOs, DMaps, and bone delta morphs.

HotSpotControl (linked to a color value in the CASHotSpotAtlas)
-Sim Modifiers
--Any combination of BGEO, DMaps, and/or Bone Deltas

What does all this mean? The CASHotSpotAtlas is compressed so the color values aren't completely precise when it's decompressed in the game. As a result colors are assigned at intervals of 10. There are 256 possible values, at intervals of 10, so there are only 25 effective slots in each editing mode. EA uses all the slots in normal/Macro mode and all but one in Micro mode. In top level mode it might be possible to use some vacant slots but I don't know how the game would interpret clicks in that area since the body macro mode is currently used. The Blue channel does have some colors set up for the body so experimentation could be done. At any rate, any significant changes to this setup would require replacing the CASHotSpotAtlas and possibly all the HotSpotControls which is not ideal.

However, many of the EA sliders don't use all four slider directions, and different sliders can be used from different viewing angles. (Viewing the sim from the front, side, or back.) For example, in my pointed ears slider I did default replacements of the Macro mode ears HotSpotControls, with the pointed ears morphs used from the side view while the default ear size and rotation morphs stayed in the front and back views.

You can list the EA HotSpotControls in the Search Game Morphs tab of TS4 MorphMaker to get a better idea of how they're set up and which ones could be modified to add custom morphs.

Note that according to my experiments only the Front, Profile_Right, Profile_Left, and Back views are actually used in the game but I could be wrong. The 'Flip Directions' flag reverses the right and left slider directions to make the left profile slider behave the same as the right profile.

In this tutorial I'll add butt height morphs to the butt slider by adding them to the unused up/down directions of the butt size slider.

More background, on how Deformer Maps work:

DMaps contain bitmap images in which the color data for each pixel (rgb) translates to a position or normal delta vector (xyz) for the vertices in a mesh. In less technical terms, the colors in the image tell the game how far and in what direction to move mesh vertices or change normals. The remainder of the DMap resource includes information describing the DMap: dimensions, offsets, compression, age/gender, and whether it contains robe data.

What's robe data? Say you do a morph making the thighs bigger. If the morph only takes the body itself into consideration, when the sim wears a skirt the morph will make the sides of the skirt bigger with a dent appearing between the legs where the vertices move closer together instead of forward or backward, the way they would for bare legs. The picture below is EA's illustration of how this would make a skirt look like shorts in the fat morph. The solution is to have a separate 'robe' morph that contains morph data using a robe/long skirt model as the base. Both skintight and robe (if any) data is contained in the DMap and the red component of the mesh vertex color is used to determine how much weight the robe morph is given.

Long story short, if you do a morph affecting the lower body you will probably need to do a robe morph. It may also be needed in some upper body morphs. In the case of the butt slider, a robe morph is necessary to prevent distortion of some clothing, especially skirts and dresses.

DMaps include only the right side of the UV1 map. Data for the left side is mirrored from the right side. You can't make an asymmetrical morph with a DMap and if you change only the left side in a morph mesh the change will not appear in the morph.

In a nutshell

Sliders and presets can use any of three morphing mechanisms: DMap, BGEO, or bone delta. Pick the right method for your morph.

For heads/faces a BGEO is usually best with these exceptions: Anything affecting the neck must use DMap or bone delta to avoid splitting at the neck seam. Teeth should use tooth CAS Parts.

DMaps should not be used on the fingers or backs of the ankles.

If your DMap morph affects the legs or (not as importantly) the breasts you'll probably need a robe morph.

Bone deltas are the only way to change height with acceptable results.

Okay, let's get this slider started!

1) Export the body and robe meshes that will be your base (unmorphed) meshes. In the TS4 MorphMaker 'Create DMaps' tab, in the first section, select the age and gender you want, in this case adult female. Select Skintight also, click the Export OBJ button and save the resulting obj mesh. Then (if you're doing a morph that needs it) select Robe and export and save that mesh. These are your base meshes. Don't modify or delete them.

2) Import the skintight mesh into the meshing tool of your choice and modify it to raise the butt. (Or any morph you prefer.)

Export to a new mesh file with a new name as an OBJ. Import the robe base mesh and repeat for the robe Butt High mesh. (The robe morph is optional if you don't need it or don't want to do it at this time.)

Note: If using Blender you should export with the options: Write Normals, Include UVs, Keep Vertex Order

3) Back in the MorphMaker 'Create DMaps' tab, go to the third section and select your base skintight mesh, morphed skintight mesh, base robe mesh, and morphed robe mesh. (If you're not doing a robe morph just leave those spaces blank.)

A word about the options:

  • The age/gender is self-explanatory. Adult includes teens. For some morphs you can select multiple ages and both genders, for others the morph won't look right for more than one age/gender. In this case the female butt morph looks awful on males so I'll select only female.
  • If you look at the choices in the BODYBLENDTYPE you'll see a few specific types are there. For all others leave it set at BODYBLENDTYPE_IGNORE.
  • DMap Size - set this depending on how much of the body is affected by the morph, from the whole body or most of it to a part of the body to a very small part with few vertices. If you're doing two or more spots on the body you should consider the size to be the entire area that includes those spots. The DMap dimensions will be set accordingly. For the sake of speed you can use the small part setting for testing but you're likely to see distortion if you're morphing more than a few vertices.
  • If you do not have a robe morph, you can choose to copy the Skintight morph data to the robe morph or not (drop robe data meaning leave robe morph zero). You would almost always leave this option checked.
  • Unless you have some reason not to compress the morph data, leave the compression option checked.
  • Use Ignore Normals if some reason you don't want the normals morphed.
  • You can experiment with Use 4 Ref Points which uses 4 reference vertices instead of 3 for interpolation but I haven't seen any noticable difference.
  • The Tight Boundaries option may help if you have a problem with your morph showing up on body parts it's not supposed to affect.

Click the Create DMaps button.

This process takes a LONG time. Seriously. What takes so much time is the calculations to interpolate delta values between the individual vertices of the mesh - basically to 'smear' the colors of the DMap image so it will do a smooth morph of differently shaped meshes. My PC is fairly fast and it takes around 8 minutes for a 'Part of Body' size DMap with a Robe morph. Speed is very significantly affected by size. I haven't tried a whole body morph size but you probably might as well go have lunch or take a nap. (Note: since writing this I added some support for multi-threading which seems to have significantly reduced this time for multi-processor computers.)

When the process is done you'll save two DMaps, one for Shape and one for Normals. You can prevew the morph in the Previewer tab.

I'll repeat for the Butt Low morph.

4) Go to the Create/Edit Sliders and/or Preset Package tab in MorphMaker. First we'll create Sim Modifiers and link the DMaps we just created. Go to the Add/Edit Sim Modifiers tab and click the Add New Sim Modifier button. Replace the generic name with a unique name for the morph, ideally one that includes your creator name. Click the Import buttons for DMap Shape and DMap Normals and select your Butt High DeformerMaps. Check the appropriate age/gender options and select the correct region. When done, click the Save Sim Modifier button. If you want you can click the preview button to see a preview model.

Again I repeat to create another sim modifier for the Butt Low morph.

5) Now go to the Add/Edit HotSpotControls (Sliders) tab. You can only clone HotSpotControls, not add blank ones. (In most cases you'll do default replacements. More below on doing new custom HotSpotControls.) Click the Clone HotSpotControls button and you'll get a list of the game HotSpotControls. You can click on the Region header to sort them by region. You'll see that there are four HotSpotControls for the butt, one for teen-elder (TYAE) male, one for TYAE female, and one each for toddlers and children that don't have any modifiers associated. In this case check the select box for the teen-elder female (TYAE Female) and click the Clone button.

Now you should see the cloned default replacement HotSpotControl, ready for editing. You don't need a new unique name for a default replacement but you can give it one for easier identification.

Look at the list in the Sliders box. In this case, we want to add the Butt High sim modifier to the Up direction and the Butt Low sim modifier to the Down direction in both entries. With the Profile_Right, Profile_Left entry selected, Click the Change button next to the Up: direction. Select the Butt High sim modifier. Do the same for the Down: direction, selecting the Butt Low sim modifier. Repeat for the Back view entry.

In this case the only other change is to the cursor that will be displayed for the butt sliders - look for the Cursor Style option and change it to HorizontalAndVerticalArrows.

Click the Save HotSpotControl button.

6) Save the package with the 'Save as New Package' button at the bottom.

7) Test in game.

Notes:

DMaps cannot be used for morphing ends of fingers or tongue because they overlap in the UV1, and should be avoided for eyeballs, teeth, and possibly backs of ankles since those parts are mapped very closely together and a morph applied to one may 'smear' onto the others. The option in the DMap creation screen for 'Tight Boundaries' may or may not prevent or reduce this problem depending on the situation. Bone morphs are more appropriate for fingers, BGEO or bone morphs for eyeballs and tongue, and teeth CAS parts for teeth.

Slider sim modifiers can use BGEOs (for head/face morphs), DMaps, or BoneDeltas - or a combination. I haven't seen any EA sim modifiers combining BGEOs with DMaps however.

It is possible to clone a HotSpotControl as a default replacement, restrict it to not affect a certain set of ages and/or gender, and then make a 'Custom Content' (not default replacement) clone of the same HotSpotControl and restrict it to those ages/gender. That way you could have separate morphs for teens, YA/Adult, and Elders, for example. You can also make a default replacement with one of the slider views not defined, then use a Custom Content clone to define that missing view with, say, a different cursor symbol.

I don't have a standard, EA supplied robe base mesh so I made my own. Making robe morphs with it is tricky and you'll have to experiment and fine-tune. I didn't make a robe mesh for child and toddler but will add them if there's demand for it.

Wicked Prostitution Placeholder

Wicked Prostitution Placeholder

17 Mar 2022
6
13 609
0

I use the same system that TURBODRIVER’s cum application uses. This means that the tattoos (the collar, the nail polish, blushing, and/or sex addict restraints) will find and use an unused CAS slot.

Comments
The minimum comment length is 10 characters.