feat(hero): banner lettering, re-render the three staging shots; defer the rest to 0.9.0
Banner lettering (JIMMY KIMMEL LIVE): new Tools/gen/generate_banner_texture.py draws the exact title with Pillow + Liberation Sans Bold - an image model would mangle a trademark string, and Qwen-Image 2.1 is research-only. Gold JIMMY / KIMMEL / LIVE stacked on a crimson ground. ue_hero_facade_import.py generalises import_albedo to import_texture and wires the banner into M_Facade_Banner_Ref as Base Color (tiling 1.0), replacing the flat dark tint with a brighter red per the owner's 'less dark, more bright'. Re-rendered all three ReviewMap staging shots (front, oblique, portals) and updated their Screenshots/README.md status rows. The hero facade rework is now closed at 'surface detail that reads at 45 m'. The remaining elevation work - volute capital depth, lattice grille depth, and the full realism pass - is deferred to 0.9.0 per the owner, and the 0.9.0 hero item records the hand-off.
This commit is contained in:
1 parent
bc9fed8e11
commit
8c34eaece0
26 files changed
+171
-41
No files matched your search
@@ -47,6 +47,8 @@ def log(msg):
|
||||
# reference facade is coursed rubble-ashlar, not a flat tint, and a texture is what carries that at 45 m.
|
||||
FACADE_ALBEDO = "Art/textures/generated/T_FacadeAshlar_AI.png"
|
||||
FACADE_ALBEDO_ASSET = "T_FacadeAshlar_AI"
|
||||
BANNER_ALBEDO = "Art/textures/generated/T_Banner_KIMMEL.png"
|
||||
BANNER_ALBEDO_ASSET = "T_Banner_KIMMEL"
|
||||
TEXTURE_DIR = "/Game/Hollywood/Textures"
|
||||
|
||||
FACADE_TINTS = {
|
||||
@@ -67,26 +69,26 @@ FACADE_TINTS = {
|
||||
}
|
||||
|
||||
|
||||
def import_albedo():
|
||||
"""Import the generated ashlar albedo, if it is on disk. Returns the asset or None."""
|
||||
def import_texture(rel_path, asset_name):
|
||||
"""Import a generated texture, if it is on disk. Returns the asset or None."""
|
||||
# unreal.Paths.project_dir() is Game/GigLine, not the repository root: the textures live beside Art/,
|
||||
# two levels above this file.
|
||||
# Tools/unreal/<this file> -> repository root is three levels up.
|
||||
repo_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
path = os.path.join(repo_root, FACADE_ALBEDO)
|
||||
path = os.path.join(repo_root, rel_path)
|
||||
if not os.path.exists(path):
|
||||
log(f"albedo missing: {path}")
|
||||
log(f"texture missing: {path}")
|
||||
return None
|
||||
task = unreal.AssetImportTask()
|
||||
task.filename = path
|
||||
task.destination_path = TEXTURE_DIR
|
||||
task.destination_name = FACADE_ALBEDO_ASSET
|
||||
task.destination_name = asset_name
|
||||
task.automated = True
|
||||
task.save = True
|
||||
task.replace_existing = True
|
||||
unreal.AssetToolsHelpers.get_asset_tools().import_asset_tasks([task])
|
||||
asset = unreal.EditorAssetLibrary.load_asset(f"{TEXTURE_DIR}/{FACADE_ALBEDO_ASSET}")
|
||||
log(f"albedo imported: {asset.get_path_name() if asset else 'FAILED'}")
|
||||
asset = unreal.EditorAssetLibrary.load_asset(f"{TEXTURE_DIR}/{asset_name}")
|
||||
log(f"texture imported: {asset.get_path_name() if asset else 'FAILED'}")
|
||||
return asset
|
||||
|
||||
|
||||
@@ -102,7 +104,8 @@ def tint_imported_materials():
|
||||
and the owner's review was that the elevation read near-white grey.
|
||||
"""
|
||||
library = unreal.MaterialEditingLibrary
|
||||
albedo = import_albedo()
|
||||
albedo = import_texture(FACADE_ALBEDO, FACADE_ALBEDO_ASSET)
|
||||
banner_tex = import_texture(BANNER_ALBEDO, BANNER_ALBEDO_ASSET)
|
||||
built = 0
|
||||
for base, rgb in FACADE_TINTS.items():
|
||||
path = f"{DEST}/{base}_Ref"
|
||||
@@ -114,6 +117,7 @@ def tint_imported_materials():
|
||||
material, unreal.MaterialExpressionConstant3Vector, -600, 200)
|
||||
colour.set_editor_property("constant", unreal.LinearColor(rgb[0], rgb[1], rgb[2], 1.0))
|
||||
source = colour
|
||||
kind = "tint"
|
||||
if albedo is not None and base in ("M_Facade_Stone", "M_Facade_StoneShadow"):
|
||||
sample = library.create_material_expression(
|
||||
material, unreal.MaterialExpressionTextureSampleParameter2D, -900, -100)
|
||||
@@ -130,11 +134,25 @@ def tint_imported_materials():
|
||||
library.connect_material_expressions(sample, "RGB", multiply, "A")
|
||||
library.connect_material_expressions(colour, "", multiply, "B")
|
||||
source = multiply
|
||||
kind = "albedo x tint"
|
||||
elif banner_tex is not None and base == "M_Facade_Banner":
|
||||
# The banner texture carries both the red ground and the gold lettering, so it
|
||||
# replaces the tint outright (tiling 1.0, not the 6x stone coursing).
|
||||
sample = library.create_material_expression(
|
||||
material, unreal.MaterialExpressionTextureSampleParameter2D, -900, -100)
|
||||
sample.set_editor_property("parameter_name", f"Banner_{base}")
|
||||
sample.set_editor_property("texture", banner_tex)
|
||||
sample.set_editor_property("sampler_type", unreal.MaterialSamplerType.SAMPLERTYPE_COLOR)
|
||||
uvs = library.create_material_expression(
|
||||
material, unreal.MaterialExpressionTextureCoordinate, -1150, -100)
|
||||
library.connect_material_expressions(uvs, "", sample, "UVs")
|
||||
source = sample
|
||||
kind = "banner"
|
||||
library.connect_material_property(source, "", unreal.MaterialProperty.MP_BASE_COLOR)
|
||||
library.recompile_material(material)
|
||||
saved = unreal.EditorAssetLibrary.save_loaded_asset(material)
|
||||
built += 1
|
||||
log(f"{base}_Ref: {'albedo x tint' if source is not colour else 'tint'} {rgb}, saved {saved}")
|
||||
log(f"{base}_Ref: {kind} {rgb}, saved {saved}")
|
||||
log(f"authored {built} facade materials")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user