3D 리플레이 실감 4단계: 1인칭 팔 · 총 · 동작 · 발로란트 조준점
- 추출기 viewmodels: 요원 1인칭 팔 fparms_* (30명) · 무기 1인칭 fpweapon_* (22종, 탄창 · 총 동작) · 팔 동작 fpanim_* (대기 · 사격 · 재장전 · 꺼내기 · 정조준 · 걷기 · 스파이크 작동). Agents.Skinned 로 스켈레탈 메시 내보내기를 나눠 3인칭 요원과 같이 쓴다 - pack.py · update.sh: viewmodels 압축 · index.json viewmodels, 갱신 때 같이 뽑는다 - 사이트 lib/viewmodel.ts: 카메라 공간 장면으로 맵 위에 그린다. 꺼내기 > 재장전 > 사격(총구 불꽃) > 걷기 > 정조준 > 대기를 리플레이 시각만으로 고른다 - 1인칭: 줌(소총 1.25배 · 저격 2.5/5배 + 조준경), 조준점을 발로란트 기본 십자(흰 선 · 틈 · 외곽선)로 - 작업 노트 docs/dev/replay-3d.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
"""gvr-map-extract 결과(<코드>.glb + <코드>.json)를 사이트용으로 압축한다.
|
||||
pack.py <추출 폴더> <출력 폴더> <버전(예: VALORANT_13.08)>
|
||||
(agents.json 이 있으면 요원 agent_*.glb · 무기 weapon_*.glb 도 같은 폴더에, index.json agents · weapons.
|
||||
viewmodels.json 이 있으면 1인칭 팔 fparms_*.glb · 무기 fpweapon_*.glb · 팔 동작 fpanim_*.glb, index.json viewmodels.
|
||||
anims.glb 가 있으면 공용 애니메이션 index.json anims, abilities/abilities.json 이 있으면 스킬 재료 index.json abilities)
|
||||
출력: <출력>/<dir>/<코드>.glb.gz (gltfpack -cc 로 meshopt 압축 · 위치 양자화 → gzip) + <출력>/index.json
|
||||
-ke: 재질 extras(두 층 섞기 B 층 · 구운 조명 K) 유지
|
||||
@@ -16,7 +17,7 @@ d = re.sub(r'[^\w.-]', '_', f'{version}-{stamp}')
|
||||
os.makedirs(os.path.join(out, d), exist_ok=True)
|
||||
maps = {}
|
||||
for name in sorted(os.listdir(src)):
|
||||
if not name.endswith('.json') or name == 'agents.json':
|
||||
if not name.endswith('.json') or name in ('agents.json', 'viewmodels.json'):
|
||||
continue
|
||||
info = json.load(open(os.path.join(src, name)))
|
||||
code = info['code']
|
||||
@@ -55,6 +56,24 @@ if os.path.exists(aj):
|
||||
if size:
|
||||
weapons[name] = {'file': v['file'], 'bytes': size, 'points': v.get('points') or {}}
|
||||
print(f'요원 {len(agents)} · 무기 {len(weapons)}')
|
||||
# 1인칭 팔 · 무기 · 팔 동작 (viewmodels 명령 결과 viewmodels.json): 뼈대 · 동작 · 노드 이름을 지킨다 (-kn)
|
||||
viewmodels = None
|
||||
vj = os.path.join(src, 'viewmodels.json')
|
||||
if os.path.exists(vj):
|
||||
v = json.load(open(vj))
|
||||
vm_arms, vm_weapons, total = {}, {}, 0
|
||||
for cls, a in v.get('arms', {}).items():
|
||||
size = pack_one(a['file'])
|
||||
if size:
|
||||
vm_arms[cls] = {'code': a['code'], 'file': a['file'], 'bytes': size}
|
||||
total += size
|
||||
for name, w in v.get('weapons', {}).items():
|
||||
s1, s2 = pack_one(w['file']), pack_one(w['anim'])
|
||||
if s1 and s2:
|
||||
vm_weapons[name] = {'file': w['file'], 'anim': w['anim'], 'clips': w.get('clips') or [], 'gunClips': w.get('gunClips') or [], 'points': w.get('points') or {}, 'bytes': s1 + s2}
|
||||
total += s1 + s2
|
||||
viewmodels = {'arms': vm_arms, 'weapons': vm_weapons}
|
||||
print(f'1인칭 팔 {len(vm_arms)} · 무기 {len(vm_weapons)} · {total / 1e6:.1f}MB')
|
||||
# 공용 애니메이션 (anims 명령 결과 anims.glb): 뼈 이름으로 요원 몸에 붙인다 (-kn)
|
||||
anims = None
|
||||
if os.path.exists(os.path.join(src, 'anims.glb')):
|
||||
@@ -75,7 +94,7 @@ if os.path.exists(os.path.join(ad, 'abilities.json')):
|
||||
total += os.path.getsize(os.path.join(out, d, f + '.gz'))
|
||||
abilities = {'file': 'abilities.json', 'bytes': os.path.getsize(os.path.join(out, d, 'abilities.json.gz'))}
|
||||
print(f'스킬 재료 {total / 1e6:.1f}MB')
|
||||
idx = {'version': version, 'dir': d, 'updatedAt': datetime.datetime.now(datetime.timezone.utc).isoformat(), 'maps': maps, 'agents': agents, 'weapons': weapons, 'anims': anims, 'abilities': abilities}
|
||||
idx = {'version': version, 'dir': d, 'updatedAt': datetime.datetime.now(datetime.timezone.utc).isoformat(), 'maps': maps, 'agents': agents, 'weapons': weapons, 'anims': anims, 'abilities': abilities, 'viewmodels': viewmodels}
|
||||
tmp = os.path.join(out, 'index.json.tmp')
|
||||
json.dump(idx, open(tmp, 'w'), ensure_ascii=False, indent=1)
|
||||
os.replace(tmp, os.path.join(out, 'index.json'))
|
||||
|
||||
@@ -18,8 +18,9 @@ E
|
||||
cat > "$T/fakebin" <<'E'
|
||||
#!/bin/bash
|
||||
[ "$1" = manifest ] && { echo "https://x/releases/${FAKE_MANIFEST:-AAA}.manifest"; exit 0; }
|
||||
# 공용 애니메이션 · 스킬 재료: 이 시험에서는 만들 것 없이 성공
|
||||
# 공용 애니메이션 · 1인칭 · 스킬 재료: 이 시험에서는 만들 것 없이 성공
|
||||
[ "$1" = anims ] && exit 0
|
||||
[ "$1" = viewmodels ] && exit 0
|
||||
[ "$1" = abilities ] && { mkdir -p "$2"; exit 0; }
|
||||
if [ "$1" = agents ]; then
|
||||
# 요원 · 무기: FAKE_FAIL=agents 면 아무것도 못 뽑고 실패, agents-partial 이면 하나만 뽑고 실패 (실제 추출기처럼 종료 코드 1)
|
||||
|
||||
@@ -126,6 +126,8 @@ GVR_USMAP="$usmap" GVR_MANIFEST="$manifest" "$BIN" extract "$raw"
|
||||
stage="요원 추출"
|
||||
GVR_USMAP="$usmap" GVR_MANIFEST="$manifest" "$BIN" agents "$raw"
|
||||
GVR_USMAP="$usmap" GVR_MANIFEST="$manifest" "$BIN" anims "$raw"
|
||||
# 1인칭 팔 · 무기 · 동작 (사이트 1인칭 화면)
|
||||
GVR_USMAP="$usmap" GVR_MANIFEST="$manifest" "$BIN" viewmodels "$raw"
|
||||
# 스킬 재료 (메시 · 파티클 · 텍스처, 사이트가 스킬 효과를 그린다)
|
||||
GVR_USMAP="$usmap" GVR_MANIFEST="$manifest" "$BIN" abilities "$raw/abilities"
|
||||
stage="압축"
|
||||
|
||||
Reference in New Issue
Block a user