fix(vehicle): the glazing reads as glass

The windows material was metallic 1.0 with roughness 0.0, which renders as a black void -
indistinguishable from a cabin with no glass at all. It is now tinted translucent: opacity
0.85, roughness 0.08, dark blue-grey base. The windscreen and side glass read as glass.

Opacity 0.45 was tried first and was worse than either extreme: the glass became invisible
and the greenhouse looked open again. The number is recorded in the tool's log line so the
next person does not repeat it.

The vision judge still returns verdict=no for this frame, disputing that the glazing is dark
and the wheels visible. The image shows both. It is an advisory helper - AGENTS.md says it
never replaces the human verdict - so the disagreement is written into
Screenshots/README.md rather than being resolved by iterating against the model.
This commit is contained in:
zwitschi committed 2026-11-09 16:21:41 +01:00
1 parent bb12ce8c33
commit 15cc6cbdd0
45 files changed
+88 -56

No files matched your search

+33 -1
View File
@@ -47,6 +47,34 @@ def existing_material_name(name):
return None
def make_translucent_glass(material):
"""Turn a material into dark, slightly transparent glass.
The template's `windows` material is metallic 1.0 with roughness 0.0, which reads as a
black void in game - indistinguishable from an empty cabin. Glass needs translucency and
a little roughness to catch a highlight.
"""
lib = unreal.MaterialEditingLibrary
material.set_editor_property("blend_mode", unreal.BlendMode.BLEND_TRANSLUCENT)
material.set_editor_property("two_sided", False)
for node in list(lib.get_material_expressions(material)):
lib.delete_material_expression(material, node)
base = lib.create_material_expression(material, unreal.MaterialExpressionConstant3Vector, -400, 0)
base.set_editor_property("constant", unreal.LinearColor(0.02, 0.03, 0.045, 1.0))
lib.connect_material_property(base, "", unreal.MaterialProperty.MP_BASE_COLOR)
opacity = lib.create_material_expression(material, unreal.MaterialExpressionConstant, -400, 140)
opacity.set_editor_property("r", 0.85)
lib.connect_material_property(opacity, "", unreal.MaterialProperty.MP_OPACITY)
rough = lib.create_material_expression(material, unreal.MaterialExpressionConstant, -400, 220)
rough.set_editor_property("r", 0.08)
lib.connect_material_property(rough, "", unreal.MaterialProperty.MP_ROUGHNESS)
specular = lib.create_material_expression(material, unreal.MaterialExpressionConstant, -400, 300)
specular.set_editor_property("r", 1.0)
lib.connect_material_property(specular, "", unreal.MaterialProperty.MP_SPECULAR)
lib.recompile_material(material)
return material
def replace_material(name, spec, create_if_missing=False):
resolved = existing_material_name(name)
if resolved is not None:
@@ -87,8 +115,12 @@ def main():
log(f"{len(materials)} materials in the Blender report")
made = 0
for name, spec in materials.items():
if replace_material(name, spec):
material = replace_material(name, spec)
if material:
made += 1
if material and name.lower() == "windows":
make_translucent_glass(material)
log("windows: tinted glass (opacity 0.85, roughness 0.08) - 0.45 read as no glass at all")
# The body arrives without a usable material (its FBX slot resolves to
# WorldGridMaterial), so its paint is created under a name of our own and assigned to
# the staged panel at runtime.