SonnetMakingNewRobloxRig / finalize_c.py
DenSnoychik's picture
Upload 33 files
3a6f70b verified
Raw History Blame Contribute Delete
4.59 kB
import json, pickle, datetime
M=json.load(open('metrics_tmp.json'))
meta={'name':'rugc_reference_boy','purpose':'R15 mannequin for fitting Roblox UGC accessories; shape/proportions/attachment zones matched to ROBLOX Boy (Bundle 109)',
'units':'Roblox studs','upAxis':'Y','characterFront':'-Z','characterRight':'+X','pose':'R15 Fixed rest pose (as in ROBLOX Boy bundle 109)',
'files':{'obj':'rugc_reference_boy.obj','mtl':'rugc_reference_boy.mtl','attachments':'mannequin_attachments.json','license':'LICENSE_AND_SOURCE.md',
'previews':['preview_front.png','preview_back.png','preview_left.png','preview_right.png','preview_top.png','preview_bottom.png','preview_perspective.png'],
'comparisons':['compare_front.png','compare_back.png','compare_left.png','compare_right.png','compare_top.png','compare_bottom.png']},
'parts':['Head','UpperTorso','LowerTorso','LeftUpperArm','LeftLowerArm','LeftHand','RightUpperArm','RightLowerArm','RightHand','LeftUpperLeg','LeftLowerLeg','LeftFoot','RightUpperLeg','RightLowerLeg','RightFoot'],
'objGroups':'one "o" group per R15 part, vertex normals smoothed per part (angle weighted); vertices are in rest-pose world coordinates, subtract attachments.parts[part].partCFrame.position to get part-local coordinates',
'baseModel':{'name':'MakeHuman base mesh hm08 (base.obj, "body" group, 13,378 quads / 13,380 vertices)','license':'CC0 1.0','url':'https://github.com/makehumancommunity/makehuman/blob/master/makehuman/data/3dobjs/base.obj'},
'referenceModel':{'name':'ROBLOX Boy bundle 109 (Torso 376532000, L/R arm 376530220/376531012, L/R leg 376531300/376531703; mesh ids 8650495xxx) + Roblox Classic Head asset 2432102561 (mesh 5591363797)','usage':'measurement/comparison target only (R15Fixed folder CFrames, mesh bounds, attachments)','url':'https://www.roblox.com/bundles/109/ROBLOX-Boy',
'spritersResource':'https://models.spriters-resource.com/pc_computer/roblox/asset/321786/ was NOT reachable (HTTP 403 Cloudflare from the sandbox); the real Roblox assets were downloaded directly from Roblox CDN instead'},
'method':['1. MakeHuman body split into 15 R15 parts (face-complete pieces using joint landmarks / planes of the MakeHuman skeleton).',
'2. Non-torso pieces subdivided (linear) and Laplacian pre-smoothed; hands/feet/head smoothed strongly to remove fingers/toes/face detail (no face/hair/clothes allowed).',
'3. Each piece is re-posed to the hanging R15 pose and deformed with a slice-wise polar fit: for every cross-section along the part axis the radial profile of the source piece is replaced by the radial profile of the matching ROBLOX Boy part (own part, own range, per-part axis).',
'4. Iterative Laplacian relaxation + closest-point projection onto the matching reference part, drop of folded/degenerate faces, flat-end capping, removal of tiny floating fragments.',
'5. Smooth angle-weighted vertex normals written per part.'],
'metrics':M,
'honestEvaluation':{
'summary':'Very close to ROBLOX Boy in silhouette, proportions, part positions and accessory seat zones for head, torso, arms and legs; hands and (to a lesser degree) feet/hips are the weakest regions.',
'good':['Whole-body silhouette IoU: front/back %.3f, left/right %.3f, top/bottom %.3f'%(M['whole']['silhouetteIoU']['front'],M['whole']['silhouetteIoU']['left'],M['whole']['silhouetteIoU']['top']),
'Mean surface distance (chamfer) to the reference %.4f studs; 95%% of the surface within %.3f studs'%(M['whole']['chamfer_mean_studs'],M['whole']['surface_dist_95pct_studs']),
'Head, HatAttachment/HairAttachment/FaceFront/FaceCenter, BodyFront and BodyBack seat surfaces match the reference within ~0.002 studs along the accessory axis'],
'weak':['Hands: simplified MakeHuman fingers cannot cover the rounded Roblox mitten/thumb shape, mean silhouette IoU ~0.76, some torn finger-tip fragments remain; LeftGripAttachment/RightGripAttachment sit in a different hand volume than the reference (axis distance to surface 0.11 vs 0.43 studs).',
'Hips/LowerTorso edge and leg tops show a slightly stepped seam; upper leg IoU ~0.91.',
'Neck/collar/shoulder surface offsets are 0.01-0.06 studs (not zero).',
'Parts are separate closed shells that overlap slightly at joints, like the original R15 parts; they are not welded, and the mesh is not an exact copy of the reference tessellation.',
'No cage/WrapTarget data and no UVs/textures are provided; the mannequin is not validated in Roblox Studio (cannot run Studio here).']},
'generated':datetime.date.today().isoformat()}
json.dump(meta,open('../mannequin_metadata.json','w'),indent=1)
print('ok')