feat: retire the gantry and billboard districts and light the rest as steel
This commit is contained in:
@@ -13,16 +13,21 @@ here = Path(__file__).resolve().parent
|
||||
root = here.parents[2]
|
||||
scene = bpy.data.scenes['Roadside Districts']
|
||||
output = root / 'src/assets/nightdrive-districts.glb'
|
||||
# Retired in round 6: the overhead gantry and the sign truss now own the road,
|
||||
# and the billboards' light strips read as garbled text. They stay authored in
|
||||
# the .blend but are no longer exported.
|
||||
RETIRED = {'gantry', 'billboard'}
|
||||
exported = [o for o in scene.objects if o.name.rsplit('_', 1)[0] not in RETIRED]
|
||||
|
||||
for obj in scene.objects:
|
||||
obj.select_set(True)
|
||||
obj.select_set(obj in exported)
|
||||
bpy.ops.export_scene.gltf(
|
||||
filepath=str(output), export_format='GLB', use_selection=True, use_active_scene=True,
|
||||
export_apply=True, export_normals=False, export_texcoords=False, export_materials='NONE',
|
||||
export_animations=False, export_cameras=False, export_lights=False, export_yup=True,
|
||||
)
|
||||
triangles = 0
|
||||
for obj in scene.objects:
|
||||
for obj in exported:
|
||||
obj.data.calc_loop_triangles()
|
||||
triangles += len(obj.data.loop_triangles)
|
||||
provenance = {
|
||||
@@ -30,7 +35,8 @@ provenance = {
|
||||
'source': 'nightdrive-districts.blend',
|
||||
'authorship': 'Original procedural modelling in Blender for this portfolio (author-districts.py); no external assets.',
|
||||
'editable_scene': 'Roadside Districts',
|
||||
'pieces': sorted({o.name.rsplit('_', 1)[0] for o in scene.objects}),
|
||||
'pieces': sorted({o.name.rsplit('_', 1)[0] for o in exported}),
|
||||
'retired': sorted(RETIRED),
|
||||
'triangles': triangles,
|
||||
'attributes': 'POSITION + indices; flat normals derived at runtime',
|
||||
'export': '../../../src/assets/nightdrive-districts.glb',
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
"editable_scene": "Roadside Districts",
|
||||
"pieces": [
|
||||
"arch",
|
||||
"billboard",
|
||||
"container",
|
||||
"crane",
|
||||
"gantry",
|
||||
"mast",
|
||||
"rack-row",
|
||||
"workshop"
|
||||
],
|
||||
"triangles": 5424,
|
||||
"retired": [
|
||||
"billboard",
|
||||
"gantry"
|
||||
],
|
||||
"triangles": 4392,
|
||||
"attributes": "POSITION + indices; flat normals derived at runtime",
|
||||
"export": "../../../src/assets/nightdrive-districts.glb",
|
||||
"sha256": "428a212792ac4d8dbf86b9224e9788f49cfc22b3d0dd1b72dfaf33c89f08f189"
|
||||
"sha256": "4fb4acbd90ccd1ed6cb56362c3c2fca3347e0d6f53d37f19e925478f1be4e252"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user