Initial Dansori character workspace
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Rig.md — 스켈레톤 정의 (`rig.json`, 풀캔버스 모드)
|
||||
|
||||
경량 리그 뼈대. 뷰어(`../07_Viewer/index.html`)와 WPF 앱이 동일하게 읽는다.
|
||||
|
||||
## 모델: 풀캔버스 (full-canvas)
|
||||
- 각 파츠 PNG = **520×900 풀캔버스**, 파츠가 **마스터 제자리**에 있음.
|
||||
- 렌더러는 파츠를 **원점(0,0)에 그리고, 관절 피벗을 중심으로 회전**한다.
|
||||
- **휴지 자세(모든 rot/tx/ty=0)** 에서는 모든 월드행렬 = 단위행렬 → 16장 스택 = 마스터 복원.
|
||||
- 그래서 **위치 앵커 튜닝이 필요 없다**(위치는 이미 파츠에 baked).
|
||||
|
||||
## 본 계층
|
||||
```
|
||||
pelvis (root)
|
||||
├─ chest
|
||||
│ ├─ neck ─ head
|
||||
│ ├─ upperarm_r ─ forearm_r ─ hand_r (캐릭터 오른팔 = 화면 왼쪽)
|
||||
│ └─ upperarm_l ─ forearm_l ─ hand_l
|
||||
├─ thigh_r ─ shin_r ─ foot_r
|
||||
└─ thigh_l ─ shin_l ─ foot_l
|
||||
```
|
||||
|
||||
## 필드 (bones[])
|
||||
| 필드 | 의미 |
|
||||
|---|---|
|
||||
| `name` | 본 이름(= 애니메이션 트랙 키) |
|
||||
| `parent` | 부모(root=null). 배열은 부모 먼저 |
|
||||
| `pivot` `[x,y]` | **회전 중심 = 관절 좌표**(520×900 캔버스 픽셀). **파츠 오버랩 centroid로 자동 산출** |
|
||||
| `z` | 그리기 순서(작을수록 뒤) |
|
||||
| `image` | 파츠 PNG(`imageBase`+이 값), 520×900 풀캔버스 |
|
||||
|
||||
## FK (렌더 수식)
|
||||
```
|
||||
world[bone] = world[parent] · Mlocal
|
||||
Mlocal = T(tx,ty) · T(pivot) · R(rot) · T(-pivot) // rot/tx/ty = 애니메이션 delta
|
||||
draw: setTransform(world); drawImage(part, 0, 0) // 원점에 그림
|
||||
```
|
||||
|
||||
## 피벗 산출(자동)
|
||||
`pivot(bone) = centroid( opaque(bone) ∩ opaque(parent) )` — 인접 파츠의 오버랩 영역 무게중심 = 관절. (스크립트로 1회 산출해 여기 박음. 파츠 교체 시 재산출.)
|
||||
|
||||
## 검증됨
|
||||
- 16파츠 스택 = 마스터(missed 0 / extra 0.03%).
|
||||
- 자동 피벗으로 `dance_idle` 재생 시 관절이 자연스럽게 회전(헤드리스 렌더 t=0/0.5/1.0/1.5 확인).
|
||||
|
||||
## 튜닝 (필요 시)
|
||||
- 관절 회전축이 어긋나면 해당 `pivot` 미세조정. 겹침 순서는 `z`.
|
||||
- 큰 각도에서 이음새가 보이면 애니 진폭↓ 또는 후속 mesh-warp(`../02_Architecture/Limits_and_Mitigations.md`).
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 170 KiB |
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"pelvis": [
|
||||
259.1,
|
||||
440.4
|
||||
],
|
||||
"chest": [
|
||||
259.1,
|
||||
440.4
|
||||
],
|
||||
"neck": [
|
||||
260.0,
|
||||
187.8
|
||||
],
|
||||
"head": [
|
||||
259.4,
|
||||
164.4
|
||||
],
|
||||
"upperarm_r": [
|
||||
146.9,
|
||||
299.9
|
||||
],
|
||||
"forearm_r": [
|
||||
101.9,
|
||||
376.0
|
||||
],
|
||||
"hand_r": [
|
||||
59.5,
|
||||
435.9
|
||||
],
|
||||
"upperarm_l": [
|
||||
373.0,
|
||||
300.8
|
||||
],
|
||||
"forearm_l": [
|
||||
417.3,
|
||||
376.3
|
||||
],
|
||||
"hand_l": [
|
||||
459.6,
|
||||
436.5
|
||||
],
|
||||
"thigh_r": [
|
||||
207.9,
|
||||
513.6
|
||||
],
|
||||
"shin_r": [
|
||||
188.4,
|
||||
651.7
|
||||
],
|
||||
"foot_r": [
|
||||
164.5,
|
||||
777.8
|
||||
],
|
||||
"thigh_l": [
|
||||
310.8,
|
||||
513.8
|
||||
],
|
||||
"shin_l": [
|
||||
330.3,
|
||||
651.9
|
||||
],
|
||||
"foot_l": [
|
||||
354.4,
|
||||
778.0
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "Noeul",
|
||||
"canvas": { "width": 520, "height": 900 },
|
||||
"imageBase": "../03_Assets/Parts/Images/",
|
||||
"mode": "fullcanvas",
|
||||
"note": "Full-canvas parts (520x900, part at master position). Draw at origin; rotate about pivot (joint). pivot = auto-derived overlap centroid from Noeul's parts.",
|
||||
"bones": [
|
||||
{ "name": "pelvis", "parent": null, "pivot": [259.1, 440.4], "z": 6, "image": "noeul_part_pelvis.png" },
|
||||
{ "name": "chest", "parent": "pelvis", "pivot": [259.1, 440.4], "z": 8, "image": "noeul_part_chest.png" },
|
||||
{ "name": "neck", "parent": "chest", "pivot": [260.0, 187.8], "z": 9, "image": "noeul_part_neck.png" },
|
||||
{ "name": "head", "parent": "neck", "pivot": [259.4, 164.4], "z": 10, "image": "noeul_part_head.png" },
|
||||
|
||||
{ "name": "upperarm_r", "parent": "chest", "pivot": [146.9, 299.9], "z": 5, "image": "noeul_part_upperarm_r.png" },
|
||||
{ "name": "forearm_r", "parent": "upperarm_r", "pivot": [101.9, 376.0], "z": 5, "image": "noeul_part_forearm_r.png" },
|
||||
{ "name": "hand_r", "parent": "forearm_r", "pivot": [59.5, 435.9], "z": 5, "image": "noeul_part_hand_r.png" },
|
||||
|
||||
{ "name": "upperarm_l", "parent": "chest", "pivot": [373.0, 300.8], "z": 12, "image": "noeul_part_upperarm_l.png" },
|
||||
{ "name": "forearm_l", "parent": "upperarm_l", "pivot": [417.3, 376.3], "z": 12, "image": "noeul_part_forearm_l.png" },
|
||||
{ "name": "hand_l", "parent": "forearm_l", "pivot": [459.6, 436.5], "z": 13, "image": "noeul_part_hand_l.png" },
|
||||
|
||||
{ "name": "thigh_r", "parent": "pelvis", "pivot": [207.9, 513.6], "z": 4, "image": "noeul_part_thigh_r.png" },
|
||||
{ "name": "shin_r", "parent": "thigh_r", "pivot": [188.4, 651.7], "z": 3, "image": "noeul_part_shin_r.png" },
|
||||
{ "name": "foot_r", "parent": "shin_r", "pivot": [164.5, 777.8], "z": 2, "image": "noeul_part_foot_r.png" },
|
||||
|
||||
{ "name": "thigh_l", "parent": "pelvis", "pivot": [310.8, 513.8], "z": 4, "image": "noeul_part_thigh_l.png" },
|
||||
{ "name": "shin_l", "parent": "thigh_l", "pivot": [330.3, 651.9], "z": 3, "image": "noeul_part_shin_l.png" },
|
||||
{ "name": "foot_l", "parent": "shin_l", "pivot": [354.4, 778.0], "z": 2, "image": "noeul_part_foot_l.png" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user