fix(clothing): close the coverage holes, and bind materials without crashing

Solidify thickness went from 1 cm to 2 cm and the shell is fattened 8 mm along its own
normals afterwards. That closed the shoulders, hips and knees where the body was
showing through the cloth.

Evaluation against the blueprint, same shot and box before and after:
  mean deltaE     31.9 -> 21.8
  palette deltaE  25.4 -> 19.7
  aspect delta     1.24 -> 1.22

Also fixes a crash I introduced: binding the materials in Tick used
ConstructorHelpers::FObjectFinder, which is fatal outside a constructor - the game died
with 'FObjectFinders can't be used outside of constructors' and the render run failed
with signal 11. The binding now lives in BeginPlay and uses LoadObject.

Not fixed, and recorded: the arms and face still render neutral grey, so
M_Character_Skin itself is suspect rather than the assignment.
This commit is contained in:
zwitschi committed 2026-11-09 13:50:21 +01:00
1 parent 86e9c5b693
commit 878d5a1f4e
43 files changed
+95 -58

No files matched your search

@@ -311,6 +311,27 @@ void AGigLineCharacter::BeginPlay()
// `-walk` holds forward input from the first frame. The screenshot run uses it
// with `-thirdperson` so a capture can show the walk clip mid-stride: an idle
// shot cannot prove the animation set, and a still cannot show a stride.
// Bind the character materials here rather than in the constructor: the slot
// assignment made there never reached the render. LoadObject, not FObjectFinder,
// because FObjectFinder may only be used inside a constructor - putting one in
// Tick was a fatal "FObjectFinders can't be used outside of constructors".
if (GetMesh())
{
if (UMaterialInterface* Skin = LoadObject<UMaterialInterface>(
nullptr, TEXT("/Game/Test/Character/M_Character_Skin.M_Character_Skin")))
{
GetMesh()->SetMaterial(0, Skin);
}
}
if (HairMesh)
{
if (UMaterialInterface* HairMat = LoadObject<UMaterialInterface>(
nullptr, TEXT("/Game/Test/Character/M_Character_Hair_Mat.M_Character_Hair_Mat")))
{
HairMesh->SetMaterial(0, HairMat);
}
}
bWalkForever = FParse::Param(FCommandLine::Get(), TEXT("walk"));
// `-perf` starts the overlay on: the performance capture and any manual frame