#Clothing Model

1 messages · Page 1 of 1 (latest)

lofty night
#

@primal current

#

it works now

#

mostly

#

but there is slight clipping in his butt

#

do you know why that could be?

#

it didnt happen in blender

primal current
#

make sure u dont have hidden faces in inside the model

#

solid model tho..

lofty night
#

thanks

primal current
#

reminds me of hte cube-heads from Gumby

lofty night
#

lmao

#

yeah in blender u cant see any clipping

#

but here its clearly visible

#

what i did was duplicate the character model and delete everything other than the pants

#

and then just added a solidify modifier

#

and just exported it

primal current
#

id either
1 - make his underwear a bit thicker...
2 - as someone else perhaps mentioned...

  • delete the faces of the legs that the underwear hides
lofty night
#

but the vertices of the pants match the vertices of the character perfectly

#

so it shouldnt happen

#

maybe its something with the bone remapping script

#
using UnityEngine;

public class RemapBones : MonoBehaviour
{
    [SerializeField] private SkinnedMeshRenderer sourceMesh;

    [ContextMenu("Remap")]
    public void Remap()
    {
        var targetMesh = GetComponent<SkinnedMeshRenderer>();
        targetMesh.bones = sourceMesh.bones;
        targetMesh.rootBone = sourceMesh.rootBone;
        targetMesh.sharedMesh.RecalculateBounds();
    }
}```
primal current
#

its just a quirk.. they can be perfect.. and clipping can still occur a bit.. the verts are exactly in the same place. and if they're bending and stuff.. theres times when overlaps can happen

#

even if very miniscule

lofty night
#

@primal current

#

is there any way to prevent it from making new edge cuts

#

it can create new vertices just not the edge cuts

primal current
#

idk nothing about the modifiers tbh 😦

#

u can manually add that edge loop to ur legs..

#

in teh same place as the pants.. see if that works

#

just make a loop.. and then select the edge on the inside and outside and drag it up / down to match

#

if ur gonna overlap objects that have to move (rig).. make sure they share a pretty similar geo

lofty night
#

its not really practical

#

my character will end up with having so many edge loops that its not even low poly anymore

primal current
#

maybe refer them to this thread

twilit wind
#

Additionally blender can support any number of vertex groups for bone deformation, while in Unity the maximum is 4 and the default is 2

#

So any geometry that's skinned for more bones than Unity's limit will appear different after exporting

#

For that reason if the goal is to eliminate clipping the practical solution is to remove the geometry under the clothes or to shrink it by decreasing bone scale

#

Or shrink body parts via shape keys / blend shapes

#

Bone scaling can be done programmatically so it doesn't require new assets, only a lookup table of bones and their scales for each article of clothing

twilit wind
primal current
#

very solid advice ^

lofty night
#

this is what happens when the solidify modifier is in complex mode

#

and this is in simple mode

#

it works in simple mode but

#

it doesnt solidify this bit properly

#

thats where the complex mode comes in

#

this is what it does to it

#

^ and this is the complex mode

#

it works properly

#

but as u can see it moves my old vertex down

#

instead of making a new one

#

which then causes the edges to be in the wrong positioin

twilit wind
#

Doesn't really matter
You need much bigger tolerances than that

#

Hence the bone scaling technique's importance

lofty night
#

once i figure it out

twilit wind
#

Maybe if your camera clipping planes were very conservative and weighting absolutely perfect but I doubt that's very feasible

twilit wind
#

@lofty night if you want alternatives you should generally just make thicker clothes
If you need something skin tight it would ideally be done as a texture swap for the character's body

lofty night
#

but it almost worked

lofty night
#

its more of a blender issue now

twilit wind
#

If solidify doesn't instantly produce ideal result you'd edit the mesh manually

#

Still, if you have a variety of clothes or a variety of possible character postures clipping is practically inevitable

lofty night
#

if the vertex of the clothes match with the body

#

then it will work

#

like it has

#

thats not the issue

#

i got the clipping part figured out

lofty night
#

i just gotta ask around in the blender discord now