Layered clothing is messing up custom vertex normals in a skinned UGC mesh

I am writing this new topic because this one has been inactive for about 4 months, and the issue seems to be there still. I don’t know if the bug has been fixed already or not, or if maybe I’m doing something wrong.

Simply put, I have a body I am working on that I’ve used custom vertex normals on to give an unified look to the separate parts and make them look like a solid piece. The parts looks fine when I am not using any layered clothing on it:
image

But as soon as I put on any clothes, they mess the custom normal data (neck and shoulders):
image

I’ve tried setting up different methods on the custom normals, I’ve tried resetting XForm and ensuring the rotations are properly set, I’ve also made sure it’s exported with tangents and binormals in the FBX export panel, reworking the normals and even triangulating the mesh as well.

It also seems like setting body type scale to higher than 0 in a Classic proportions avatar makes it even worse (but it still only happens when you wear layered clothing)

Edit: Further experimentation reveals that areas that change with the different sliders will mess up the normal data. The elbows and knees seem to remain intact, but given that the head, feet and hands scale a bit independently from the rest of body parts, it resets the normals there. Same happens for the upper leg parts and the lower torso.

In general, it seems that Custom Normal data is destroyed if the two vertex positions aren’t the exact same after slider/scaling changes have been applied, which makes me think said data is ignored and rebuilt after changes to the mesh have been applied by worn clothing layers. This definitely should not be intended behavior, as custom normal data is set up for a reason.

3 Likes

This issue is also super annoying to deal with when you just want to make a game with custom clothing. The area in the picture used to be smooth and normal, but when putting on clothing, it shows like this and it makes me wanna drop the LC idea for the game if not fixed :frowning:

image

2 Likes

Did you ever end up finding a fix or a work around for this?

1 Like

I have not.
I figured a somewhat working workaround since there’s nothing better, but it is definitely not optimal nor is a replacement for this, because it doesn’t fully hide the seam 100%.

Pretend we have this mesh here, and you want to cut where the green line is, like so:
image

One thing you could do in order to somewhat keep some similar normals is make the cuts a bit “ahead” of where you actually want to cut it:
image

This will help keep the normals similar in the exact place where it cuts, but then the different normals of the overlapping face will flicker back and forth. To fix this we just shrink down the loop on the part you cut:
image
image
image

The normals will vary since they have been displaced, but the effect won’t be as bad. Needless to say, this isn’t optimal, as it will increase the polycount in your mesh, but until Roblox fixes this issue, I can’t really think of anything else. I really urge Roblox to fix this, as this is making bundles that require custom normals look silly.

Hope this helped.

2 Likes

Thank you for taking the time to demo that out for me! This is fantastic and I’m sure it’ll be even more helpful to everyon else.

2 Likes

You’re welcome, and hope it does help people out until Roblox comes up with a fix for this issue. I hope it also helps Roblox in figuring out a fix, but unfortunately, we need to raise awareness to the tech team that this issue is still a problem for any UGC creators.

Through more testing, I’ve found that the Roblox importer doesn’t seem to import the weights 100% accurately, it seems that more than two bones weighting a vertex can get problematic. Although this can be to be expected in most game engines, Roblox body part splitting system makes this a noticeable problem. Custom normals are really needed to mitigate some of it, and the workaround isn’t completely effective.

3 Likes

do you think if you bake your custom normal data into a normal map it would work?

That’s an even more unpractical solution, given how you’d have to be fighting seams at the exact border cuts, which doesn’t translate well to texture space. Needless to say there will be also a good amount of texture space that will have to go to waste to deal with the body part caps.
Don’t get me wrong, I see your point, but unfortunately that’s like stacking 40 packs of paper sheets to sit down instead of just getting a normal comfortable chair.

Another of the main issues with this solution is that it seems like normals are rebuilt every time a new clothing layer is added on the Humanoid. That means, if there’s a bit of deformation from a clothing piece, that will also means normals will be rebuilt accordingly, turning into a seam at the cut.
Also, considering how Roblox likes to rebuild the texture maps and UV maps to optimize all the texture space better, it would create additional seams that could be otherwise avoided with a proper custom normal setup. (Normal maps are dependent on their space in the UV layout as well, so making non-smooth transitions will increase the chance of seams)

The idea is clever, but sadly it is more unpractical than it seems when you get to analyze it.