Hologram calls, HaulOS phone, Enhanced lighting, smoother camera; Blender remaster review files
Game: - Assistant and Director portraits: GPT backgrounds and a holographic appear/disappear shader (Talk/TalkHolo) instead of on/off - Phone redesigned (HaulOS home, address bar, dock, error/loading states) and the browser link made sturdier - Settings > Graphics > Lighting: Classic / Enhanced (runtime volume, no project assets changed); Enhanced SSAO uses the smooth interleaved-gradient method at high samples so flat panels don't speckle - Painted board textures (T_HullPanel, T_BarnRed) keep only edge wear: the big bare-wood patches read as dirty smudges - The head leans into a sidestep smoothly instead of snapping with A / D - New keys in all 11 languages Review only (nothing swapped into the game yet): ArtSource/Blender/remaster (v1 paint pass of our own models, Synty-built ones left out), remaster/crew (crew repaint with arm, colour-edge and face fixes), remaster_v2 (smooth-geometry pilot). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
87
ArtSource/Blender/remaster_v2/scripts/verify_v2.py
Normal file
87
ArtSource/Blender/remaster_v2/scripts/verify_v2.py
Normal file
@ -0,0 +1,87 @@
|
||||
"""Checks every v2 FBX against the game FBX: same object names, parents, origins (world, 1 mm) and rotations, slots the
|
||||
game finds by name still there (as verify_remaster.py), plus for v2:
|
||||
- bounds per object: how far each side of the local bounding box moved (shrink / growth), relative to the model
|
||||
- the lowest point of the model (ground contact) and of each wheel
|
||||
- pack faces (PACK_KEEP slots, e.g. the Synty rocking chair and bucket in SM_CrewCabin): vertex positions identical
|
||||
Run: blender -b --factory-startup --python verify_v2.py --python-exit-code 1 -- [names...]
|
||||
"""
|
||||
import bpy, os, sys
|
||||
from mathutils import Vector
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
import remaster_v2 as V
|
||||
R = V.R
|
||||
|
||||
|
||||
def load(path):
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
bpy.ops.import_scene.fbx(filepath=path)
|
||||
bpy.context.view_layer.update()
|
||||
out = {}
|
||||
for o in bpy.context.scene.objects:
|
||||
mats, bb, pack = set(), None, set()
|
||||
if o.type == "MESH":
|
||||
ms = [R.base_name(m.name) if m else "" for m in o.data.materials]
|
||||
mats = set(ms)
|
||||
if len(o.data.vertices):
|
||||
cs = [v.co for v in o.data.vertices]
|
||||
bb = (Vector(map(min, *cs)) if len(cs) > 1 else cs[0].copy(), Vector(map(max, *cs)) if len(cs) > 1 else cs[0].copy())
|
||||
for p in o.data.polygons:
|
||||
if p.material_index < len(ms) and ms[p.material_index] == "M_Pack":
|
||||
for i in p.vertices:
|
||||
pack.add(tuple(round(x, 4) for x in (o.matrix_world @ o.data.vertices[i].co)))
|
||||
wz = min(((o.matrix_world @ v.co).z for v in o.data.vertices), default=None) if o.type == "MESH" else None
|
||||
out[o.name] = dict(parent=o.parent.name if o.parent else None, t=o.matrix_world.translation.copy(),
|
||||
r=o.matrix_world.to_euler(), type=o.type, mats=mats, bb=bb, zmin=wz, pack=pack)
|
||||
return out
|
||||
|
||||
|
||||
names = [a for a in (sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else []) if not a.startswith("--")] or V.PILOT
|
||||
bad = 0
|
||||
for n in names:
|
||||
rp = os.path.join(R.FBXOUT, n + ".fbx")
|
||||
if not os.path.exists(rp):
|
||||
print("[verify_v2] %-18s no v2 FBX" % n)
|
||||
continue
|
||||
a = load(os.path.join(R.MODELS_DIR, n + ".fbx"))
|
||||
b = load(rp)
|
||||
probs, info = [], []
|
||||
if set(a) != set(b):
|
||||
probs.append("names differ: missing %s extra %s" % (sorted(set(a) - set(b)), sorted(set(b) - set(a))))
|
||||
zs_a = [x["zmin"] for x in a.values() if x["zmin"] is not None]
|
||||
zs_b = [x["zmin"] for x in b.values() if x["zmin"] is not None]
|
||||
diag = max((x["bb"][1] - x["bb"][0]).length for x in a.values() if x["bb"]) or 1.0
|
||||
for k in sorted(set(a) & set(b)):
|
||||
A, B = a[k], b[k]
|
||||
if A["parent"] != B["parent"]:
|
||||
probs.append("%s parent %s -> %s" % (k, A["parent"], B["parent"]))
|
||||
if (A["t"] - B["t"]).length > 0.001:
|
||||
probs.append("%s origin moved %.4f" % (k, (A["t"] - B["t"]).length))
|
||||
if max(abs(x - y) for x, y in zip(A["r"], B["r"])) > 0.001:
|
||||
probs.append("%s rotation changed" % k)
|
||||
lost = {m for m in A["mats"] if R.is_special(m)} - B["mats"]
|
||||
if lost:
|
||||
probs.append("%s lost special slots %s" % (k, sorted(lost)))
|
||||
if A["bb"] and B["bb"]:
|
||||
d = max(max(abs(x - y) for x, y in zip(A["bb"][i], B["bb"][i])) for i in (0, 1))
|
||||
info.append("%s bounds %+.1fmm" % (k, d * 1000))
|
||||
if d > 0.01 * diag:
|
||||
probs.append("%s bounds moved %.1f mm" % (k, d * 1000))
|
||||
if k.startswith("Wheel") and A["zmin"] is not None:
|
||||
info.append("%s ground %+.1fmm" % (k, (B["zmin"] - A["zmin"]) * 1000))
|
||||
if n in V.PACK_KEEP and (A["pack"] or B["pack"]):
|
||||
from mathutils.kdtree import KDTree
|
||||
kd = KDTree(max(len(B["pack"]), 1))
|
||||
for i, c in enumerate(B["pack"]):
|
||||
kd.insert(c, i)
|
||||
kd.balance()
|
||||
worst = max((kd.find(c)[2] for c in A["pack"]), default=1e9) if B["pack"] else 1e9
|
||||
if len(A["pack"]) != len(B["pack"]) or worst > 2e-4:
|
||||
probs.append("%s pack faces changed (%d vs %d verts, worst %.2f mm)" % (
|
||||
k, len(A["pack"]), len(B["pack"]), worst * 1000))
|
||||
else:
|
||||
info.append("%s pack faces unchanged (%d verts, worst %.3f mm)" % (k, len(A["pack"]), worst * 1000))
|
||||
info.append("model lowest point %+.1fmm" % ((min(zs_b) - min(zs_a)) * 1000))
|
||||
bad += bool(probs)
|
||||
print("[verify_v2] %-18s %s" % (n, "OK" if not probs else "; ".join(probs)))
|
||||
print("[verify_v2] %-18s %s" % ("", ", ".join(info)))
|
||||
print("[verify_v2] models with problems:", bad)
|
||||
Reference in New Issue
Block a user