The training dummies are KayKit skeletons, each ragdoll part drawing the bones it carries #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3935-the-training-dummies-are-skeletons-a-cc0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3935
Every training dummy, hung or free, now draws as KayKit's CC0 Skeleton Minion instead of 12 bare capsules. Each ragdoll part draws the share of the skeleton it carries, at that part's pose every frame. The ragdoll's capsules and joints are fitted to the skeleton.
The asset
KayKit_Skeletons_1.1_FREE.zip(8177445 bytes, SHA-256 21fbad59…d3e2). The prefab comes from itscharacters/gltf/Skeleton_Minion.glb.License.txtsays CC0 1.0.assets/prefabs/kaykit.pywritesassets/prefabs/skeleton_minion.blend: the rig and its nine skinned meshes (5288 triangles) with their weights.hulken_part.kenney.py's do. The eyes' glowing material takes its glow's yellow as its Base Color, since hulken draws no glow.assets/textures/skeleton_texture.png, identical texel for texel to the archive's.kenney.pygained anif __name__ == "__main__"guard sokaykit.pycan reuse its PNG writer..mdbeside it with its source, URL, version, file and licence.The bake
tools/bake/dummy.pyrenders the prefab with the scene bake's render engine and takes the skeleton as Blender's render draws it, in its saved pose: each mesh as the render depsgraph evaluates it, and the bones of the rig that depsgraph evaluates. Each triangle goes to the part whose bones weigh its corners most, judged by the weights summed over all three corners; a polygon whose material index is past the last slot draws in the last slot, as in Blender. The stage (stage dummy) puts each triangle in its part's own space and writesbaked/dummy.hbm: textures plus 12 parts, in the template's order.check_coloursinextract.py. Under Linear Rec.2020 the eyes' yellow would bake as another colour while Blender displays it unchanged;hulken_partthat is not a name, or one the template does not have;The ragdoll
sim_dummynow checks this.sim_dummy):taskpolicy -b, five rounds at the merge head51235f4and master5af4834, three of them with the pre-merge head629ec49too: worst tick 0.512–0.522 ms at the merge head, 0.517–0.523 ms at629ec49and 0.516–0.530 ms at master; median 0.425–0.427 ms at the merge head and 0.425–0.429 ms at629ec49, against master's 0.378–0.380 ms. Gate run 972's own bench read a worst tick of 0.514 ms and a median of 0.333 ms. The budget is 2 ms.Drawing and tests
src/render/dummies.sxloadsbaked/dummy.hbmand gives every dummy part its share of the skeleton. No capsule draws.tests/dummy_draws.sx's Metal golden shows a hung skeleton and a free one fallen beside it. With master's capsule drawing put back, it fails: 13136 of 144000 pixels differ, by up to 213.tests/dummy_model.sxchecks each stage rule against a skeleton built from the template.tests/bake_dummy.pychecks each Blender rule, in one Blender session.629ec49(the merge changes none of the code they mutate or the tests that kill them): all 31 mutants of the stage, the Blender extract and the drawing fail a test, and so do all 18 mutants of the extract's render rules, among them taking the model from the viewport's depsgraph, reading the bones or the meshes' places from the unevaluated objects, dropping the render, object, view layer or scene checks, dropping the Armature's vertex-group or render clause, dropping the material-slot clamp, and giving a triangle to the part weighing one corner most.014d8e3, each run againstbake_dummyandbake_extract. All five of the colour and rig rules' mutants fail a test:skinned()without its rig clause (its case "a mesh whose Armature names no rig");bake_extract's AgX and Linear Rec.2020 cases).Checks
51235f4merges master5af4834(#3934, barrels as Cylinder bodies). The one conflict,assets/scenes/first_map.blend.md, keeps master's Props bullet (the barrels are Cylinder bodies) and this branch's Dummies bullet.first_map.blendis master's, unchanged. Against629ec49the merge changes exactly what master changed against the merge base, file by file.sak-gate full: gate run 961 passed at5a879eb, gate run 962 at64c323d(a README-only change) and gate run 970 at629ec49, 43 tests each, gate run 972 at the merge head51235f4, 44 tests (with master'sbarrels), and gate run 975 at014d8e3, 44 tests.kaykit.pywas rerun at014d8e3over a fresh download of the archive, whose SHA-256 matches. The prefab's whole RNA dump, every scene, object, mesh, armature, material, image and collection (114951 lines), differs from 51235f4's only inview_settings.view_transform, AgX against Standard. The texture is byte-identical.tools/bake.shat014d8e3and at51235f4gives byte-identicaldummy.hbm,test_scene.hbs/.hbwandfirst_map.hbs/.hbw. 51235f4's prefab, saved on AgX, is now refused atview_settings.view_transform.sim_dummyandphysics_bench_sceneprint the same figures at51235f4as at629ec49: the hung dummy sleeps after 0.98 s, the walk-in swings its pelvis 0.572 m, it settles again after 9.95 s, it stays within its limits plus 0.027°, and the bench passes a limit by at most 5.503°. At master5af4834they read 0.53 s, 1.078 m, 13.73 s and 7.428°.tools/bake.shin arms of64c323dand629ec49gave byte-identicalbaked/dummy.hbm,test_scene.hbs/.hbwandfirst_map.hbs/.hbw. At the merge head,first_map.hbs/.hbwandtest_scene.hbs/.hbware byte-identical to master 5af4834's, anddummy.hbmto 629ec49's.