468 lines
19 KiB
Python
468 lines
19 KiB
Python
"""Build the Anvil (Heavy Quad-Track Siege Tank) chassis GLB, manifest.json, and preview."""
|
|
from __future__ import annotations
|
|
|
|
import math
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import bmesh
|
|
from mathutils import Matrix
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
import vehicle_common as vc # noqa: E402
|
|
|
|
|
|
def _build_quad_track_pod(name: str, side: float, y_center: float, is_front: bool, parent) -> None:
|
|
"""Build one heavy articulated armored quad-track pod grounded at Z = 0."""
|
|
pod_x = side * 1.56
|
|
pod = vc.make_empty(name, parent=parent, location=(pod_x, y_center, 0.0))
|
|
|
|
rw_r = 0.27
|
|
rw_z = rw_r + 0.045
|
|
rw_ys = (-0.54, 0.0, 0.54)
|
|
front_y, front_z, front_r = -0.98, 0.54, 0.24
|
|
rear_y, rear_z, rear_r = 0.98, 0.54, 0.24
|
|
track_w = 0.62
|
|
|
|
# 3 roadwheels + front/rear sprockets
|
|
for i, ry in enumerate(rw_ys):
|
|
vc.make_tube_part(
|
|
f"{name}_rw_tire_{i}", rw_r, rw_r, track_w * 0.84, segments=14,
|
|
mat_name="rubber_dark", parent=pod, location=(-track_w * 0.42, ry, rw_z), rotation_deg=(0.0, 90.0, 0.0),
|
|
)
|
|
vc.make_tube_part(
|
|
f"{name}_rw_hub_{i}", rw_r * 0.64, rw_r * 0.64, track_w * 0.90, segments=10,
|
|
mat_name="olive_armor", parent=pod, location=(-track_w * 0.45, ry, rw_z), rotation_deg=(0.0, 90.0, 0.0),
|
|
)
|
|
vc.make_tube_part(
|
|
f"{name}_sproc_f", front_r, front_r, track_w * 0.80, segments=12,
|
|
mat_name="gunmetal", parent=pod, location=(-track_w * 0.40, front_y, front_z), rotation_deg=(0.0, 90.0, 0.0),
|
|
)
|
|
vc.make_tube_part(
|
|
f"{name}_sproc_r", rear_r, rear_r, track_w * 0.80, segments=12,
|
|
mat_name="gunmetal", parent=pod, location=(-track_w * 0.40, rear_y, rear_z), rotation_deg=(0.0, 90.0, 0.0),
|
|
)
|
|
|
|
# Track loop polyline in (y, z)
|
|
loop_yz: list[tuple[float, float]] = []
|
|
for k in range(6):
|
|
ang = math.radians(100.0 + 135.0 * (k / 5.0))
|
|
loop_yz.append((front_y + math.cos(ang) * (front_r + 0.03), front_z + math.sin(ang) * (front_r + 0.03)))
|
|
loop_yz.append((-0.54, 0.025))
|
|
loop_yz.append((0.54, 0.025))
|
|
for k in range(6):
|
|
ang = math.radians(-55.0 + 135.0 * (k / 5.0))
|
|
loop_yz.append((rear_y + math.cos(ang) * (rear_r + 0.03), rear_z + math.sin(ang) * (rear_r + 0.03)))
|
|
loop_yz.append((0.46, 0.83))
|
|
loop_yz.append((-0.46, 0.83))
|
|
|
|
path_3d = [[0.0, y, z] for (y, z) in loop_yz]
|
|
vc.make_swept_profile(
|
|
f"{name}_track_band",
|
|
"box",
|
|
0.034,
|
|
track_w * 0.92,
|
|
0.034,
|
|
path_3d,
|
|
up=[1.0, 0.0, 0.0],
|
|
mat_name="rubber_dark",
|
|
parent=pod,
|
|
closed=True,
|
|
)
|
|
|
|
pts = loop_yz + [loop_yz[0]]
|
|
segs = [math.hypot(pts[i + 1][0] - pts[i][0], pts[i + 1][1] - pts[i][1]) for i in range(len(loop_yz))]
|
|
total_len = sum(segs)
|
|
n_shoes = 28
|
|
|
|
def build_shoes(bm: bmesh.types.BMesh) -> None:
|
|
for s_idx in range(n_shoes):
|
|
target_d = (s_idx / n_shoes) * total_len
|
|
acc = 0.0
|
|
for i, sl in enumerate(segs):
|
|
if acc + sl >= target_d or i == len(segs) - 1:
|
|
t = (target_d - acc) / max(sl, 1e-6)
|
|
y0, z0 = pts[i]
|
|
y1, z1 = pts[i + 1]
|
|
py = y0 + (y1 - y0) * t
|
|
pz = z0 + (z1 - z0) * t
|
|
ang = math.atan2(z1 - z0, y1 - y0)
|
|
m = (
|
|
Matrix.Translation((0.0, py, pz))
|
|
@ Matrix.Rotation(ang, 4, "X")
|
|
@ Matrix.Diagonal((track_w, 0.11, 0.034, 1.0))
|
|
)
|
|
bmesh.ops.create_cube(bm, size=1.0, matrix=m)
|
|
break
|
|
acc += sl
|
|
|
|
vc.make_bmesh_object(f"{name}_shoes", build_shoes, "gunmetal", parent=pod)
|
|
|
|
# Heavy sloped armored pod housing (top deck + chamfered nose/tail + outer bolted side skirts)
|
|
vc.make_box(f"{name}_cover_top", (track_w + 0.12, 1.98, 0.14), "olive_armor", parent=pod, location=(0.0, 0.0, 0.92), bevel=0.012)
|
|
vc.make_box(f"{name}_cover_f", (track_w + 0.12, 0.42, 0.14), "olive_armor", parent=pod, location=(0.0, -1.14, 0.80), rotation_deg=(36.0, 0.0, 0.0), bevel=0.01)
|
|
vc.make_box(f"{name}_cover_r", (track_w + 0.12, 0.42, 0.14), "olive_armor", parent=pod, location=(0.0, 1.14, 0.80), rotation_deg=(-36.0, 0.0, 0.0), bevel=0.01)
|
|
# Outer bolted track pod side skirt
|
|
skirt_pts = [
|
|
[side * (track_w * 0.5 + 0.04), -1.12, 0.72],
|
|
[side * (track_w * 0.5 + 0.04), 1.12, 0.72],
|
|
[side * (track_w * 0.5 + 0.04), 0.98, 0.94],
|
|
[side * (track_w * 0.5 + 0.04), -0.98, 0.94],
|
|
[side * (track_w * 0.5 + 0.04), -0.74, 0.34],
|
|
[side * (track_w * 0.5 + 0.04), 0.74, 0.34],
|
|
[side * (track_w * 0.5 + 0.04), 1.12, 0.56],
|
|
[side * (track_w * 0.5 + 0.04), -1.12, 0.56],
|
|
]
|
|
# Use clean trapezoidal slab for outer pod skirt with bolts
|
|
vc.make_plates(
|
|
{
|
|
"schema": "brokkr.plates.v0",
|
|
"plates": [
|
|
{
|
|
"name": f"{name}_outer_skirt",
|
|
"mat": "olive_armor",
|
|
"bevel": 0.008,
|
|
"sides": "one",
|
|
"mirror": False,
|
|
"slab": {
|
|
"at": [side * (track_w * 0.5 + 0.04), 0.0, 0.64],
|
|
"normal": [side, 0.0, 0.0],
|
|
"up": [0.0, 0.0, 1.0],
|
|
"right": [0.0, -side, 0.0],
|
|
"outline": [[-1.08, -0.08], [-0.74, -0.32], [0.74, -0.32], [1.08, -0.08], [0.96, 0.28], [-0.96, 0.28]],
|
|
"thick": 0.055,
|
|
"taper": 0.012,
|
|
"back": 0.92,
|
|
},
|
|
"fits": [
|
|
{"kind": "bolts", "inset": 0.025, "spacing": 0.34, "mat": "gunmetal", "params": "r=0.014"},
|
|
],
|
|
}
|
|
],
|
|
},
|
|
parent=pod,
|
|
)
|
|
# Inner pod cheek & front headlight block
|
|
vc.make_box(f"{name}_inner_cheek", (0.06, 1.84, 0.48), "gunmetal", parent=pod, location=(-side * (track_w * 0.5 + 0.02), 0.0, 0.64), bevel=0.008)
|
|
if is_front:
|
|
vc.make_box(f"{name}_headlight_pod", (0.28, 0.20, 0.14), "gunmetal", parent=pod, location=(0.0, -1.04, 1.00), bevel=0.008)
|
|
vc.make_box(f"{name}_headlight_lens", (0.20, 0.05, 0.08), "smoked_glass", parent=pod, location=(0.0, -1.14, 1.00), bevel=0.004)
|
|
|
|
|
|
def build_anvil() -> dict:
|
|
vc.reset_scene()
|
|
vc.ensure_materials()
|
|
|
|
root = vc.make_empty("AnvilRoot")
|
|
chassis = vc.make_empty("Chassis", parent=root)
|
|
|
|
# --- 1. Central Lower Belly Tub, Ribbed Prow & Pod Outrigger Beams ---
|
|
vc.make_box("lower_tub", (2.14, 4.78, 0.64), "gunmetal", parent=chassis, location=(0.0, 0.04, 0.74), bevel=0.016)
|
|
# Corrugated lower prow armor ribs
|
|
vc.make_box("lower_prow_plate", (2.06, 0.44, 0.52), "olive_armor", parent=chassis, location=(0.0, -2.32, 0.74), rotation_deg=(24.0, 0.0, 0.0), bevel=0.012)
|
|
for rx in (-0.84, -0.56, -0.28, 0.0, 0.28, 0.56, 0.84):
|
|
vc.make_box(f"prow_rib_{rx:.2f}", (0.08, 0.14, 0.48), "gunmetal", parent=chassis, location=(rx, -2.50, 0.72), rotation_deg=(24.0, 0.0, 0.0), bevel=0.006)
|
|
# Outrigger pod axle beams + suspension rams
|
|
for p_tag, py in (("f", -1.48), ("r", 1.48)):
|
|
vc.make_box(f"pod_crossbeam_{p_tag}", (3.08, 0.58, 0.32), "gunmetal", parent=chassis, location=(0.0, py, 0.62), bevel=0.012)
|
|
for side in (-1.0, 1.0):
|
|
s_tag = "L" if side > 0 else "R"
|
|
vc.make_ram_span(
|
|
f"pod_strut_{p_tag}_{s_tag}",
|
|
[side * 1.04, py, 1.02],
|
|
[side * 1.38, py, 0.74],
|
|
body_r=0.048,
|
|
rod_r=0.026,
|
|
parent=chassis,
|
|
mat_barrel="gunmetal",
|
|
mat_rod="copper_rad",
|
|
)
|
|
|
|
# --- 2. Wide Sloped Composite Hull & Tall Casemate Superstructure (Brokkr plate.v0) ---
|
|
hull_pts = [
|
|
# Lower hull belt above track pods
|
|
[-1.18, -2.38, 0.96], [1.18, -2.38, 0.96],
|
|
[-1.22, -0.50, 1.02], [1.22, -0.50, 1.02],
|
|
[-1.22, 2.58, 1.02], [1.22, 2.58, 1.02],
|
|
# Tall casemate roof (y = -0.48 .. +1.28, z = 1.98)
|
|
[-1.16, -0.48, 1.98], [1.16, -0.48, 1.98],
|
|
[-1.18, 1.28, 1.98], [1.18, 1.28, 1.98],
|
|
# Stepped rear engine deck (y = +1.30 .. +2.64, z = 1.70)
|
|
[-1.18, 1.32, 1.70], [1.18, 1.32, 1.70],
|
|
[-1.14, 2.64, 1.68], [1.14, 2.64, 1.68],
|
|
]
|
|
plates_doc = {
|
|
"schema": "brokkr.plates.v0",
|
|
"plates": [
|
|
{
|
|
"name": "anvil_hull",
|
|
"mat": "olive_armor",
|
|
"bevel": 0.016,
|
|
"sides": "one",
|
|
"mirror": False,
|
|
"points": hull_pts,
|
|
"clad": {
|
|
"mat": "olive_armor",
|
|
"facets": [{"n": [0.0, -0.45, 0.89], "cos": 0.86}],
|
|
"min_area": 0.22,
|
|
"lifts": [0.008, 0.015],
|
|
"inset": 0.07,
|
|
"gap": 0.020,
|
|
"split": 0.88,
|
|
"seed": 901,
|
|
"bolt_r": 0.014,
|
|
"bolt_mat": "gunmetal",
|
|
"bevel": 0.004,
|
|
},
|
|
},
|
|
# Heavy bolted forward superstructure cheek plates
|
|
{
|
|
"name": "anvil_casemate_cheek",
|
|
"mat": "olive_armor",
|
|
"bevel": 0.010,
|
|
"sides": "both",
|
|
"mirror": False,
|
|
"slab": {
|
|
"at": [1.20, 0.42, 1.54],
|
|
"normal": [1.0, 0.0, 0.0],
|
|
"up": [0.0, 0.0, 1.0],
|
|
"right": [0.0, -1.0, 0.0],
|
|
"outline": [[-0.86, -0.34], [0.86, -0.34], [0.78, 0.36], [-0.52, 0.36]],
|
|
"thick": 0.055,
|
|
"taper": 0.014,
|
|
"back": 0.92,
|
|
},
|
|
"fits": [
|
|
{"kind": "bolts", "inset": 0.03, "spacing": 0.34, "mat": "gunmetal", "params": "r=0.014"},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
vc.make_plates(plates_doc, parent=chassis)
|
|
|
|
# Sponson weapon shelves (left/right forward flanks) + rear radiator housing + driver periscope
|
|
vc.make_box("driver_periscope", (0.58, 0.18, 0.11), "smoked_glass", parent=chassis, location=(0.0, -0.78, 1.84), rotation_deg=(-24.0, 0.0, 0.0), bevel=0.006)
|
|
for side in (-1.0, 1.0):
|
|
tag = "L" if side > 0 else "R"
|
|
vc.make_box(f"sponson_shelf_{tag}", (0.48, 0.72, 0.24), "gunmetal", parent=chassis, location=(side * 1.24, -0.76, 1.42), bevel=0.01)
|
|
vc.make_box(f"rad_housing_{tag}", (0.16, 1.18, 0.62), "olive_armor", parent=chassis, location=(side * 1.20, 1.50, 1.42), bevel=0.01)
|
|
vc.make_box(f"tow_shackle_{tag}", (0.09, 0.16, 0.16), "signal_orange", parent=chassis, location=(side * 0.68, -2.54, 0.64), bevel=0.006)
|
|
|
|
# --- 3. 4 Articulated Quad-Track Pods ---
|
|
_build_quad_track_pod("pod_fl", 1.0, -1.48, True, chassis)
|
|
_build_quad_track_pod("pod_fr", -1.0, -1.48, True, chassis)
|
|
_build_quad_track_pod("pod_rl", 1.0, 1.48, False, chassis)
|
|
_build_quad_track_pod("pod_rr", -1.0, 1.48, False, chassis)
|
|
|
|
# --- 4. Towering Rear Exhaust Stacks ---
|
|
for side in (-1.0, 1.0):
|
|
tag = "L" if side > 0 else "R"
|
|
for s_idx, sy in enumerate((2.40, 2.62)):
|
|
vc.make_swept_tube(
|
|
f"exhaust_stack_{tag}_{s_idx}",
|
|
[
|
|
[side * 0.96, sy - 0.14, 1.48],
|
|
[side * 1.04, sy, 1.66],
|
|
[side * 1.04, sy, 2.86],
|
|
[side * 1.04, sy + 0.14, 2.98],
|
|
],
|
|
0.072,
|
|
segments=12,
|
|
mat_name="gunmetal",
|
|
parent=chassis,
|
|
fillet_r=0.06,
|
|
)
|
|
vc.make_tube_part(
|
|
f"exhaust_shroud_{tag}_{s_idx}",
|
|
0.105,
|
|
0.105,
|
|
0.68,
|
|
segments=10,
|
|
inner0=0.09,
|
|
inner1=0.09,
|
|
mat_name="olive_armor",
|
|
parent=chassis,
|
|
location=(side * 1.04, sy, 1.76),
|
|
)
|
|
|
|
# --- 5. Broad Reinforced Siege Turret (joint.turret_yaw) ---
|
|
turret_pivot = vc.make_empty("joint.turret_yaw", parent=chassis, location=(0.0, 0.04, 1.98))
|
|
vc.tag_joint(turret_pivot, "joint.turret_yaw", [0.0, 1.0, 0.0], -180.0, 180.0)
|
|
joints_manifest = [{"id": "joint.turret_yaw", "axis": [0.0, 1.0, 0.0], "min": -180.0, "max": 180.0}]
|
|
|
|
vc.make_tube_part("turret_race", 0.88, 0.94, 0.10, segments=24, mat_name="gunmetal", parent=turret_pivot)
|
|
|
|
turret_pts = [
|
|
[-0.76, -0.92, 0.10], [0.76, -0.92, 0.10],
|
|
[0.98, -0.22, 0.10], [0.88, 1.04, 0.10],
|
|
[-0.88, 1.04, 0.10], [-0.98, -0.22, 0.10],
|
|
[-0.58, -0.70, 0.62], [0.58, -0.70, 0.62],
|
|
[0.76, -0.14, 0.62], [0.68, 0.86, 0.62],
|
|
[-0.68, 0.86, 0.62], [-0.76, -0.14, 0.62],
|
|
]
|
|
turret_doc = {
|
|
"schema": "brokkr.plates.v0",
|
|
"plates": [
|
|
{
|
|
"name": "anvil_turret_shell",
|
|
"mat": "olive_armor",
|
|
"bevel": 0.016,
|
|
"sides": "one",
|
|
"mirror": False,
|
|
"points": turret_pts,
|
|
},
|
|
{
|
|
"name": "anvil_turret_cheek",
|
|
"mat": "olive_armor",
|
|
"bevel": 0.008,
|
|
"sides": "both",
|
|
"mirror": False,
|
|
"slab": {
|
|
"at": [0.86, 0.16, 0.34],
|
|
"normal": [0.94, 0.0, 0.34],
|
|
"up": [-0.34, 0.0, 0.94],
|
|
"right": [0.0, -1.0, 0.0],
|
|
"outline": [[-0.58, -0.18], [0.58, -0.18], [0.46, 0.18], [-0.46, 0.18]],
|
|
"thick": 0.055,
|
|
"taper": 0.014,
|
|
"back": 0.92,
|
|
},
|
|
"fits": [
|
|
{"kind": "bolts", "inset": 0.025, "spacing": 0.26, "mat": "gunmetal", "params": "r=0.013"},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
vc.make_plates(turret_doc, parent=turret_pivot)
|
|
|
|
vc.make_box("turret_mantlet_bar", (1.12, 0.22, 0.24), "gunmetal", parent=turret_pivot, location=(0.0, -0.84, 0.34), bevel=0.012)
|
|
vc.make_box("turret_bustle", (1.28, 0.46, 0.38), "olive_armor", parent=turret_pivot, location=(0.0, 1.10, 0.38), bevel=0.012)
|
|
vc.make_tube_part("commander_cupola", 0.22, 0.24, 0.11, segments=14, mat_name="olive_armor", parent=turret_pivot, location=(0.0, 0.48, 0.62))
|
|
vc.make_box("turret_optic", (0.20, 0.22, 0.16), "smoked_glass", parent=turret_pivot, location=(0.0, -0.46, 0.68), bevel=0.008)
|
|
|
|
# --- 6. Visible Exterior Hardpoints (5x6 Dorsal Grid) ---
|
|
# 1) hp.armor.front (0,0, 5x1) on steep front glacis
|
|
vc.add_hardpoint_slot(
|
|
"hp.armor.front",
|
|
"armor",
|
|
parent=chassis,
|
|
location=(0.0, -1.48, 1.46),
|
|
rotation_deg=(62.0, 0.0, 0.0),
|
|
size=(1.88, 0.42, 0.10),
|
|
plinth_depth=0.04,
|
|
)
|
|
# 2 & 3) hp.weapon.sponson_l (0,1, 1x2) & hp.weapon.sponson_r (4,1, 1x2)
|
|
vc.add_hardpoint_slot(
|
|
"hp.weapon.sponson_l",
|
|
"weapon",
|
|
parent=chassis,
|
|
location=(1.26, -0.76, 1.54),
|
|
rotation_deg=(0.0, 0.0, 0.0),
|
|
size=(0.50, 0.50, 0.09),
|
|
)
|
|
vc.add_hardpoint_slot(
|
|
"hp.weapon.sponson_r",
|
|
"weapon",
|
|
parent=chassis,
|
|
location=(-1.26, -0.76, 1.54),
|
|
rotation_deg=(0.0, 0.0, 0.0),
|
|
size=(0.50, 0.50, 0.09),
|
|
)
|
|
# 4 & 5) hp.weapon.siege_l (1,1, 1x2) & hp.weapon.siege_r (3,1, 1x2) on turret roof
|
|
vc.add_hardpoint_slot(
|
|
"hp.weapon.siege_l",
|
|
"weapon",
|
|
parent=turret_pivot,
|
|
location=(0.42, -0.04, 0.63),
|
|
rotation_deg=(0.0, 0.0, 0.0),
|
|
size=(0.62, 0.62, 0.11),
|
|
)
|
|
vc.add_hardpoint_slot(
|
|
"hp.weapon.siege_r",
|
|
"weapon",
|
|
parent=turret_pivot,
|
|
location=(-0.42, -0.04, 0.63),
|
|
rotation_deg=(0.0, 0.0, 0.0),
|
|
size=(0.62, 0.62, 0.11),
|
|
)
|
|
# 6) hp.armor.sides (2,1, 1x2) on right (-X) casemate cheek
|
|
vc.add_hardpoint_slot(
|
|
"hp.armor.sides",
|
|
"armor",
|
|
parent=chassis,
|
|
location=(-1.20, 0.42, 1.54),
|
|
rotation_deg=(90.0, 0.0, -90.0),
|
|
size=(1.12, 0.34, 0.10),
|
|
plinth_depth=0.03,
|
|
)
|
|
# 7) hp.engine.rear (1,3, 3x2) on sloped rear engine deck (y=1.98 -> hull surface z=1.825)
|
|
vc.add_hardpoint_slot(
|
|
"hp.engine.rear",
|
|
"engine",
|
|
parent=chassis,
|
|
location=(0.0, 1.98, 1.815),
|
|
rotation_deg=(-12.5, 0.0, 0.0),
|
|
size=(1.42, 0.96, 0.15),
|
|
plinth_depth=0.04,
|
|
)
|
|
# 8 & 9) hp.radiator.l (0,4, 1x2) & hp.radiator.r (4,4, 1x2)
|
|
vc.add_hardpoint_slot(
|
|
"hp.radiator.l",
|
|
"radiator",
|
|
parent=chassis,
|
|
location=(1.28, 1.50, 1.42),
|
|
rotation_deg=(90.0, 0.0, 90.0),
|
|
size=(1.04, 0.52, 0.13),
|
|
)
|
|
vc.add_hardpoint_slot(
|
|
"hp.radiator.r",
|
|
"radiator",
|
|
parent=chassis,
|
|
location=(-1.28, 1.50, 1.42),
|
|
rotation_deg=(90.0, 0.0, -90.0),
|
|
size=(1.04, 0.52, 0.13),
|
|
)
|
|
|
|
# --- 7. Export GLB, Manifest & Preview ---
|
|
glb_path = vc.ASSETS_VEHICLES_DIR / "anvil" / "anvil.glb"
|
|
manifest_path = vc.ASSETS_VEHICLES_DIR / "anvil" / "manifest.json"
|
|
preview_path = vc.PREVIEWS_DIR / "anvil_preview.png"
|
|
|
|
tri_count, bounds = vc.export_vehicle_glb(glb_path, root=root)
|
|
vc.write_manifest(
|
|
manifest_path,
|
|
vehicle_id="anvil",
|
|
name="Anvil",
|
|
vehicle_class="Heavy Quad-Track Siege Tank",
|
|
grid_width=5,
|
|
grid_height=6,
|
|
mask=[
|
|
"#####",
|
|
"#####",
|
|
"#####",
|
|
"#####",
|
|
"#####",
|
|
"#####",
|
|
],
|
|
hardpoints=[
|
|
{"id": "hp.armor.front", "kind": "armor", "x": 0, "y": 0, "w": 5, "h": 1, "modelNodeId": "hp.armor.front"},
|
|
{"id": "hp.weapon.sponson_l", "kind": "weapon", "x": 0, "y": 1, "w": 1, "h": 2, "modelNodeId": "hp.weapon.sponson_l"},
|
|
{"id": "hp.weapon.siege_l", "kind": "weapon", "x": 1, "y": 1, "w": 1, "h": 2, "modelNodeId": "hp.weapon.siege_l"},
|
|
{"id": "hp.armor.sides", "kind": "armor", "x": 2, "y": 1, "w": 1, "h": 2, "modelNodeId": "hp.armor.sides"},
|
|
{"id": "hp.weapon.siege_r", "kind": "weapon", "x": 3, "y": 1, "w": 1, "h": 2, "modelNodeId": "hp.weapon.siege_r"},
|
|
{"id": "hp.weapon.sponson_r", "kind": "weapon", "x": 4, "y": 1, "w": 1, "h": 2, "modelNodeId": "hp.weapon.sponson_r"},
|
|
{"id": "hp.engine.rear", "kind": "engine", "x": 1, "y": 3, "w": 3, "h": 2, "modelNodeId": "hp.engine.rear"},
|
|
{"id": "hp.radiator.l", "kind": "radiator", "x": 0, "y": 4, "w": 1, "h": 2, "modelNodeId": "hp.radiator.l"},
|
|
{"id": "hp.radiator.r", "kind": "radiator", "x": 4, "y": 4, "w": 1, "h": 2, "modelNodeId": "hp.radiator.r"},
|
|
],
|
|
joints=joints_manifest,
|
|
bounds=bounds,
|
|
tri_count=tri_count,
|
|
)
|
|
vc.render_four_panel_preview(preview_path)
|
|
print(f"[anvil] tris={tri_count} bounds={bounds} glb={glb_path}")
|
|
return {"id": "anvil", "tris": tri_count, "bounds": bounds}
|
|
|
|
|
|
if __name__ == "__main__":
|
|
build_anvil()
|