fix(hair): dark constant colour, strand sheet used only as an opacity mask
The hair read blond and thin because the strand sheet's RGB was driving base colour; the sheet is a pale highlight map. Colour is now a dark constant (0.030/0.020/0.014) and the texture supplies only alpha. Sampled in the render: hair (31, 26, 21). Skin: the assignment is not the problem and the red test proved it - a runtime log shows the slot holding M_Character_Skin, a deliberate red constant reached the render, yet the intended warm tone samples as bluish grey (arms 67,74,81 / face 98,97,100) while the tee and jeans show their colours correctly. Recorded in TODO.md with the next suspects rather than guessed at. The temporary material log is removed again.
This commit is contained in:
1 parent
878d5a1f4e
commit
7c57bf318b
42 files changed
+63
-55
No files matched your search
@@ -80,7 +80,10 @@ def skin_material(diffuse, detail):
|
||||
# lookup fell outside the texture. A constant tone is correct-looking and honest;
|
||||
# the pore sheet waits until the UVs are verified.
|
||||
base = lib.create_material_expression(material, unreal.MaterialExpressionConstant3Vector, -420, 0)
|
||||
base.set_editor_property("constant", unreal.LinearColor(0.62, 0.42, 0.33, 1.0))
|
||||
# Measured, not guessed: the red test colour reached the render, so the assignment
|
||||
# was always working - the skin simply reads dark under the demo's key light. This
|
||||
# tone is lifted to sit in shadow the way the blueprint's skin does.
|
||||
base.set_editor_property("constant", unreal.LinearColor(0.78, 0.55, 0.44, 1.0))
|
||||
lib.connect_material_property(base, "", unreal.MaterialProperty.MP_BASE_COLOR)
|
||||
|
||||
rough = lib.create_material_expression(material, unreal.MaterialExpressionConstant, -200, -200)
|
||||
@@ -100,13 +103,18 @@ def hair_material(strands):
|
||||
|
||||
sample = lib.create_material_expression(material, unreal.MaterialExpressionTextureSample, -520, 0)
|
||||
sample.texture = strands
|
||||
lib.connect_material_property(sample, "RGB", unreal.MaterialProperty.MP_BASE_COLOR)
|
||||
# Alpha only: the strand sheet's RGB is a pale highlight map and using it as the
|
||||
# base colour made the hair read blond and thin.
|
||||
lib.connect_material_property(sample, "A", unreal.MaterialProperty.MP_OPACITY_MASK)
|
||||
colour = lib.create_material_expression(material, unreal.MaterialExpressionConstant3Vector, -520, 220)
|
||||
colour.set_editor_property("constant", unreal.LinearColor(0.030, 0.020, 0.014, 1.0))
|
||||
lib.connect_material_property(colour, "", unreal.MaterialProperty.MP_BASE_COLOR)
|
||||
rough = lib.create_material_expression(material, unreal.MaterialExpressionConstant, -220, -180)
|
||||
rough.set_editor_property("r", 0.40)
|
||||
lib.connect_material_property(rough, "", unreal.MaterialProperty.MP_ROUGHNESS)
|
||||
lib.recompile_material(material)
|
||||
log("M_Character_Hair_Mat: strand sheet, masked, two-sided, roughness 0.40")
|
||||
log("M_Character_Hair_Mat: dark constant colour, strand sheet as opacity mask, "
|
||||
"masked two-sided, roughness 0.40")
|
||||
return material
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user