Commit 4bfe83b
authored
feat: add socket-attach-points example (spawn mount contract) (#118)
A spawn system bolting modules onto a prop at runtime rests on a chain of
matrix identities that all fail quietly: a skipped matrix_parent_inverse, a
basis built with the cross product the wrong way round, a transform frozen on
the parent after the sockets were placed. Nothing in the gallery pinned that
chain down — prop-origin-transform covers pivots and parent-inverse-orrery
covers parent-inverse under animation, but neither asserts that a module
dropped on a named socket with an identity local transform lands where the
artist put it.
The socket orientation check is deliberately non-circular: the mount pad mesh
is swung onto its declared normal by a quaternion, while the socket basis is
built by explicit Gram-Schmidt, and the check compares the socket's +Z against
a Newell normal recomputed from raw vertex coordinates. Two independent
derivations of the same declared value, so a basis-construction bug cannot
hide behind the spec that produced it.
Two hazards surfaced while authoring and are asserted rather than merely
described, so they cannot change under us silently: applying a transform on an
Empty root has no object data to bake into, so Blender pushes it down into
every child (all 7 parent-inverses cleared, root scale handed to each child's
local matrix) while preserving world matrices; and a child left selected
during that apply gets the transform applied twice, drifting sockets 2.335 m.
Signed-off-by: fOuttaMyPaint <tmhospitalitystrategies@gmail.com>
Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>1 parent 7931829 commit 4bfe83b
13 files changed
Lines changed: 2728 additions & 3 deletions
File tree
- .cursor-plugin
- .github/workflows
- docs/gallery
- asset-sheets
- assets
- contact-sheets
- socket-attach-points
- examples
- socket-attach-points
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
823 | 846 | | |
824 | 847 | | |
825 | 848 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
787 | 798 | | |
788 | 799 | | |
789 | 800 | | |
| |||
0 commit comments