Bake library AO and lift environment textures
Phase 4 of the v0.6.0 graphics plan: - tools/bake_ao.py bakes 256² AO maps for every Blender character/gear/prop (Cycles, existing UVs) next to each GLB; Materials.apply_ao() wires the red channel into character slots, gear, and props. Compatibility has no SSAO. - Regenerated brick/concrete/asphalt at 1024² with OpenRouter, derived tangent normal maps via tools/make_normal_maps.py, and wired them through SurfaceMaterials.textured() without changing UV scales. - Evaluated Forward+: boots on desktop Vulkan, but the renderer is project-wide and Web must stay GL Compatibility; v0.6.0 keeps Compatibility (decision in MEMORY/plan). A desktop-only override is deferred. - Recaptured screenshots; compare 11 good / 0 bad. Fixed marquee text alignment. - Tests: baked AO maps exist for all 46 assets; prop/character AO material checks; headless 222/222, Python 69/69, all smokes pass. - Version 0.6.0; ADR-0013 accepted; README/architecture/blender-assets/plan and TODO/DONE updated.
This commit is contained in:
1 parent
d8cfddbf89
commit
d872034388
78 files changed
+390
-28
No files matched your search
@@ -226,12 +226,23 @@ func test_world_loads_the_blender_library_props() -> bool:
|
||||
builder.set_night_mode(false)
|
||||
var dark := builder._lamp_bulb_mats[0].emission_energy_multiplier <= 0.0
|
||||
var e := TestUtils.check(lit and dark, "night mode drives library emissives")
|
||||
var ao_ok := false
|
||||
var detail := root.get_node_or_null("StreetDetail")
|
||||
if detail != null:
|
||||
for child in detail.get_children():
|
||||
if str(child.name).begins_with("Prop_bench"):
|
||||
for mi in (child as Node3D).find_children("*", "MeshInstance3D", true, false):
|
||||
for index in (mi as MeshInstance3D).mesh.get_surface_count():
|
||||
var mat := (mi as MeshInstance3D).get_surface_override_material(index) as StandardMaterial3D
|
||||
if mat != null and mat.ao_enabled and mat.ao_texture != null:
|
||||
ao_ok = true
|
||||
var ao := TestUtils.check(ao_ok, "library prop materials carry the baked AO map")
|
||||
var triangles := builder.library_triangle_count()
|
||||
var f := TestUtils.check(triangles > 0
|
||||
and triangles <= WorldBuilder.LIBRARY_TRIANGLE_BUDGET,
|
||||
"library prop triangles stay inside the budget (%d)" % triangles)
|
||||
root.free()
|
||||
return a and b and c and d and e and f
|
||||
return a and b and c and d and e and f and ao
|
||||
|
||||
func test_world_facade_windows_light_at_night() -> bool:
|
||||
var root := Node3D.new()
|
||||
|
||||
Reference in new issue
Block a user