How To Add Transparency to a Clothing (Adding a New Cut) Mar 28, 2019 20:05:22 GMT -5 MahoCreations, Mathcope, and 2 more like this
Post by jwofles on Mar 28, 2019 20:05:22 GMT -5
Hiya, this tutorial is on how to add a transparent part of your clothing (and keep the other part as non-transparent).
It can be done to any clothing/accessory (with any number of cuts) etc, as you create a new cut/meshgroup, and it's a lot easier than you think.
I'll be starting with a dress that only has 1 cut, and I'll be creating a completely new cut to put the transparent part of the mesh into.
As I said, this should work for clothing with any number of cuts, but like always I suggest only using 1 cut clothing to make your life easier.
You might want to pick up these skins to show alpha properly in S4S, they make life easier.
Also I'd like to credit untraditionalnerd as I used their tutorial as a base for this.
For your dress to be transparent, you need two things.
- A transparent texture, that's quite straight forward so I won't go through that here.
- A transparency-enabled mesh/meshgroup, that's what this tutorial is for!
STEP 1 - blender cuts
Go into edit mode, select the parts of the mesh you want to be transparent and press P to separate to a new mesh.
Then change the name (doesn't affect anything but stops you from going crazy), and change the cut number.
The cut number will be the next number after whatever is already used. For instance, my mesh started with one meshgroup, and its cut number is 0000. Therefore I gave the new mesh a cut of 0001 as it's the next logical number to use.
If your mesh uses cuts 0000, 0001, and 0002, then you make your new mesh 0003. Simple
STEP 2 - importing geometry & duplicating
Import your .blend with the new meshgroup/cut into s4studio.
Then, go to the warehouse page, and find your LOD0. It'll be the geometry with the biggest filesize, and you should be able to see your mesh in the preview.
As you can see above, the transparent group is not visible in the mesh preview, don't worry about this
First, you need to duplicate this geometry.
When the box pops up to duplicate, change the last character of the group to '1'.
If that doesn't work, just try any number/character until it's accepted.
It doesn't matter that the filesize of the duplicated geometry is 0b
Cool, now we've got the base for the transparent geometry.
STEP 3 - make new geometry simglass
This is a small but vital step. Go to the data section of your new geometry, and change the shader to simglass. This is the transparency shader Sims 4 uses.
STEP 4 - region map editing
This can be tricky so follow closely.
On your duplicated/new geometry, go to the data tab, and copy and paste the group, instance and type somewhere because you need these values.
Find your region map, go to edit items, then add a new entry. Select your new entry, enter the cut number that we gave the new meshgroup earlier in the blender step. Keep the regiontype as base.
Next, click the edit items button with your new cut selected. Then add a new model entry, and paste the values that you copied earlier for the new geometry you made into the boxes. Then save the models and entry, and save the region map entry.
This step has created the new cut number in the package, and linked the mesh we duplicated earlier to that cut.
After that, make sure you re-import your mesh.
As you can see the transparent part shows up in the 3d preview again, and it also shows up isolated in the new geometry in warehouse which is good (means you've done it right).
STEP 5 - adding new geometry to LODs / swatches
This process is much easier if you only have one swatch for the moment (you can add more swatches after this and that'll be fine), as if you already have multiple swatches you need to do this process for every swatch.
Go to your swatch (cas part), and scroll down till you find the Lods part, and click edit items.
Then, go to level 0 (LOD0), and click edit items. Then add a new entry, and again fill in boxes with the values that you copied earlier for the new geometry (the same ones you used earlier).
Once you enter the values, press save.
Ignore in the image that my entry says -000000000-, it just doesn't update instantly sometimes.
Now your transparent mesh is rendered for LOD0 and you're actually all done!!.... Except for LOD1, LOD2, and LOD3..
You now have two options to finish up:
(easy) Use the LOD0 transparent mesh for all LODs.
- In the LOD entries, for level 1, 2, and 3, do the same thing for what you did level 0, pasting that same information in. This adds the transparent mesh you made to each LOD.
- This means that your LODs will be like normal, except the transparent mesh will stay the same throughout all the LODs (it'll stay high poly in the lower LODs).
- This choice is not as good as the next one, but if you're not really confident with messing around with this stuff, just do this as it's easier since bad LODs for one item won't have a major performance hit.
(hard) Make a seperate LODs for the transparent mesh.
- This basically means repeating the whole tutorial for each LOD which can be a lot of work (however trust me when you know the process it gets really easy).
- It's all the same but you duplicate the corresponding LOD geometry for the start, and you when you change the last character of the group, instead of 1 you just use a different number. If you remember the numbers you change it to, when you're entering all the details into the different entry boxes, you can just copy existing entries, and change the last character of the group to the different numbers you used (that's what I mean it can get easy when you're doing the process, and you do like 3-4 meshes at a time).
- This is superior choice to the first one, as you'll have proper LODs, so the transparent mesh will get low poly in LOD 1, 2, 3 etc along with the other part of the mesh (if you imported lower poly meshes for lower LODs).
Andd after that, you should be finished! Woo!
- If your transparent mesh in game has triangles/alpha issues, follow this tutorial (u gotta triangulate and do alpha order). There are blender instructions in the replies.
- If your transparent mesh in game is shiny, make sure you have a proper spec map (with no shine) and a normal map (can be a blank normal map, just any normal map).
- Make sure you have laptop mode turned off, as this setting disables transparency.
- Use these skins to make alpha show in sims 4 studio.
If something didn't make sense or you want to ask a question, feel free to reply or contact me