# vr_decal_atlas.py - white stencil markings for the veiled robot (system Python + PIL). # Generic unit codes only: the references' maker name and logos are not copied. import json, os from PIL import Image, ImageDraw, ImageFont OUT = os.path.join(os.path.dirname(__file__), "..", "textures") S = 1024 im = Image.new("RGBA", (S, S), (255, 255, 255, 0)); d = ImageDraw.Draw(im) F = r"C:\Windows\Fonts\bahnschrift.ttf" def font(px): return ImageFont.truetype(F, px) W = (255, 255, 255, 255) R = {} # A boxed glyph (the small square badges on the chest) d.rectangle((10, 10, 190, 190), outline=W, width=12); d.text((100, 104), "7", font=font(130), fill=W, anchor="mm") R["badge"] = (0, 0, 200, 200) # B unit band d.text((512, 290), "UNIT 07", font=font(120), fill=W, anchor="mm"); R["unit"] = (220, 220, 804, 360) # C small code d.text((300, 430), "R7-341J", font=font(80), fill=W, anchor="mm"); R["code"] = (60, 385, 540, 475) # D round emblem: ring, cross hairs, two arcs cx, cy, r = 810, 570, 170 d.ellipse((cx - r, cy - r, cx + r, cy + r), outline=W, width=14) d.ellipse((cx - 90, cy - 90, cx + 90, cy + 90), outline=W, width=10) d.line((cx - r + 20, cy, cx + r - 20, cy), fill=W, width=10); d.line((cx, cy - r + 20, cx, cy + r - 20), fill=W, width=10) R["emblem"] = (cx - r - 10, cy - r - 10, cx + r + 10, cy + r + 10) # E chevrons for i in range(6): x = 30 + i * 90 d.polygon([(x, 520), (x + 45, 520), (x + 85, 580), (x + 45, 640), (x, 640), (x + 40, 580)], fill=W) R["chevron"] = (20, 510, 580, 650) # F tick ruler + small text for i in range(21): x = 40 + i * 26; h = 60 if i % 5 == 0 else 32 d.rectangle((x, 700, x + 7, 700 + h), fill=W) d.text((300, 800), "MAX 340 BAR", font=font(54), fill=W, anchor="mm"); R["ruler"] = (30, 690, 600, 840) # G vertical stack "07" in a frame d.rectangle((650, 790, 1000, 1000), outline=W, width=10); d.text((825, 895), "07", font=font(150), fill=W, anchor="mm") R["frame07"] = (640, 780, 1010, 1010) im.save(os.path.join(OUT, "T_VR_Decals.png")) json.dump({"size": S, "regions": R}, open(os.path.join(OUT, "T_VR_Decals.json"), "w"), indent=1) print("ok")