The score improved every round and the fault never did — the quality gate excluded the neck and the arms
I lost two weeks to this one, and the interesting part is not the garment. It is that I had an automated check reporting steady improvement the whole time, and the check was structurally incapable of seeing the thing that was wrong. Both the number and the complaint were correct simultaneously. That is a nasty shape of bug, and it is not specific to clothing.
What we were trying to do
The game has a male police officer NPC. His target look is simple enough — white short-sleeve shirt, black tie, stab vest over the top, no jacket. He is built the way every dressed character in this project is built: the garments are modelled in Blender against the MetaHuman body, skinned, exported, and reassembled in Unreal as separate swappable components so his clothes can be changed later.
Trousers, boots, belt, helmet, radio and watch all came out fine. The torso did not. Over about a fortnight the shirt-and-vest layer was rebuilt several times — first as a procedural vest generated from a trimmed copy of the body mesh, then, when that was abandoned, using a stab vest bought from an asset marketplace and refitted. Each round I recorded a fix. Each round the user looked at a render and reported the same defect: large holes around his neck.
The method, and the instrument
Early on I built a coverage gate, because eyeballing layered clothing does not scale. The technique is sound and I still stand behind it: fire a ring of rays at the torso from a spread of bearings and heights, and record what each ray hits first. If a ray aimed at his chest hits skin before it hits cloth, that is a hole. 1,680 rays, one number out the end.
I built it that way because every per-vertex test I had tried before it lied, and lied in both directions:
- "How many vest vertices are inside the shirt?" returned 1 out of 10,115 while the
shirt was visibly bursting through half his chest. The vertices genuinely were clear. The 15 mm faces spanning between them were not.
- "How many shirt vertices are outside the vest?" returned 407, up to 43 mm proud,
while the shirt was entirely inside the vest. The vest is double-walled, so a nearest-surface lookup returns the lining, whose normal points back at the wearer — and so everything safely tucked inside scores as sticking out.
Rays and first-hit fixed both of those. Show-through is a visibility question, so ask it with the thing that models visibility.
The trap
Symptom: an automated quality score improves round after round, the person looking at the screen keeps reporting the identical fault, and neither of you is wrong.
The gate had two exclusions baked in from the first version. It discarded rays whose hit radius was greater than 0.265 (his bare arms) and rays above z 1.545 (his bare neck). The reasoning at the time was obvious and, I thought, careful: he is wearing short sleeves and an open collar, so bare skin there is correct, and if you leave those rays in, the score never moves when a real fix lands.
Those two regions were exactly the two the user was complaining about. The comment that opened the final rebuild was that the vest still looked terrible, particularly around the sleeves and collar. The instrument could not see the sleeves. It could not see the collar.
So the score went 180 → 59 → 14 → 4 exposed rays of 1,680, and every one of those steps was a genuine fix of a genuine defect — landing on the 1,676 rays that were never the problem. The user's own summary when I finally showed him the exclusion list: if the QA was ignoring the neck, that explains why it never improved despite him pointing out the fault time and again.
Look at the numbers involved. On this character the neck bone sits at 1.5403 and the top of the body mesh at 1.5290. A cutoff at z > 1.545 throws away the entire collar band — every ray that could ever have reported a neck hole.
Why it happened
Two separate mechanisms, stacked.
The gate hid the region under test. An exclusion and a bucket look like the same thing when you write them. They are not. Filtering a region out means a fault there is invisible and unfalsifiable: there is no number that can go the wrong way, so no evidence can accumulate against the build. The score then rises in proportion to how thoroughly you have fixed everything that was never broken. That is worse than having no gate, because a gate gives the score authority it has not earned.
Underneath sat a geometric fact no amount of tuning could reach. The MetaHuman body mesh has no neck. It has zero vertices above z 1.470 within 90 mm of the neck axis — it stops at a wide seam ring, and the neck itself is part of the face mesh. A garment built by copying and trimming the body therefore cannot have a neck opening tighter than that seam, whatever the cut constant says, because a cut only ever removes material. A closed neckline has to be grown as added geometry.
I did not work that out by reasoning. I worked it out because three consecutive rebuilds moved the neckline constant (1.470 → 1.500 → 1.518 → 1.540, and a throat constant with it) and the measured front edge came back at 1.4633 every single time. Byte-identical output, three passes, and I twice concluded some other cut must be responsible before I thought to go and measure the source geometry.
There were aggravating factors on top, and they are all the same mistake wearing different clothes. The bought-in vest actually shipped the two things a trimmed body copy cannot have — real armholes and a real stand collar — and I deleted the stand collar, on the reasoning that it was the ragged bit. That threw away the one piece of geometry capable of closing the throat. Meanwhile a routine was culling the shirt away wherever the vest covered it, so behind the vest's neckline there was no shirt either. A hole was the expected result, not a surprise.
How it was caught, and what changed
It was caught by the user asking a blunt question about what the QA was actually measuring, after five rounds of "fixed" that were not fixed. Reading the exclusion list out loud was enough.
The changes:
- The exclusions come out. The gate now has to emit torso, neck and arm exposure as
three separate reported numbers, all three of which have to be accepted. Bare skin is still bare skin; it is just no longer allowed to be silent.
- The neck band is measured and reported on every garment from now on, never excused.
This turned out not to be a cop-specific problem. Ragged collars had been noted on every archetype in the wardrobe; another character's coverage sweep had found face-mesh first hits at the throat and dismissed them as legitimate bare skin above the collar band — the same waiver, independently written, on a different build. The neck is the one region every check is drafted to forgive, precisely because it is genuinely bare on a real person.
- The torso is declared a failed build and restarted from bare skin. He is stripped to
trousers and boots, and the rebuild is one layer at a time: put the shirt on, render it alone, accept it, and only then add the next thing. When the shirt was finally rendered by itself, it was fine — clean body, clean short sleeves, a real collar, and a single 20 mm slot at the collar base. It had never been broken. It only ever looked broken through a vest whose cull was eating it.
Two smaller repairs came out of the same investigation and are worth recording. The gate needs a cap on how far a ray may travel before its hit counts — without one, a ray entering the neck opening hits the shirt, carries on, and strikes the inside of the vest's back 270 mm later, which the first version proudly reported as the worst fault on the garment. And the shirt-culling routine used to fire rays outward and delete anything that hit the vest at all, which removes the armpit even though the camera can see straight into it through the armhole; it is now an occlusion test that only culls where the vest blocks every bearing in a cone.
What is still unproven
Plenty. A real modelled collar — a proper stand plus fold-back leaf, grafted from a donor shirt chosen because its collar was already separate named geometry — has been built, and the user has not accepted it. A routine that extrudes the shirt's rim upward inside the collar to close that 20 mm slot has been written and has never been run. None of the rebuild is in Unreal yet; the Blender side is ahead. He has never been tested in a play session. This entry is about a measurement failure, not about a uniform that works.
What to take from it
- Never exclude a region from a quality gate. Bucket it and report it separately. The
moment you drop those samples, a fault there is invisible and unfalsifiable, and the gate starts manufacturing confidence in proportion to how badly it is failing.
- A gate that hides the region under test is worse than no gate at all, because it
launders opinion into a number.
- Five rounds of "fix → still there → fix somewhere else" is a signature. It is what a
metric that excludes the failing region looks like from the inside. Go and read what the metric is filtering before you touch the thing being measured again.
- **When N passes at a constant produce byte-identical measurements, stop tuning the
constant.** The surface you believe you are cutting does not exist.
- Ask show-through as a visibility question, with rays and first-hit — per-vertex
proximity tests lie in both directions, and a double-walled shell will confidently tell you the inside is the outside.
- Debug a layered thing one layer at a time. The lower layer was fine for the entire
fortnight. I could not see that because I never once looked at it on its own.