3D 리플레이: 요원 3D 몸(뼈대 · 텍스처 · 공용 걷기/달리기 + 총 든 자세) · 총 22종 추출, 재생기가 원기둥 대신 요원과 손에 든 총을 그림

- map-extract agents: 요원 30명 agent_<코드>.glb (위/아래 몸 애니메이션 분리, ACL 풀기용 CUE4Parse-Natives 를 g++ 로 빌드), 무기 weapon_<이름>.glb
- pack.py: 요원 · 무기도 압축해 index.json agents · weapons
- 사이트: AgentRig (이동 방향 · 속도로 다리 애니메이션 섞기, 오른손에 총), 1인칭 · 자유시점에서 이름표 작게

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-17 20:25:27 +09:00
parent d87f4ade27
commit f8f585f230
12 changed files with 849 additions and 10 deletions

View File

@@ -115,6 +115,65 @@ switch (args[0])
case "mats":
foreach (var m in MapScene.FindMaps(provider).Where(m => args.Skip(1).Contains(m.Code, StringComparer.OrdinalIgnoreCase))) Probe.Mats(provider, m);
break;
case "agents":
{
// 요원마다 agent_<코드>.glb + agents.json {캐릭터 클래스(Wushu_PC_C): {code, file, triangles}}
var outDir = args[1];
Directory.CreateDirectory(outDir);
var want = args.Skip(2).ToHashSet(StringComparer.OrdinalIgnoreCase);
var maxTex = int.Parse(Environment.GetEnvironmentVariable("GVR_AGENT_TEX") ?? "512");
var lodWant = int.Parse(Environment.GetEnvironmentVariable("GVR_AGENT_LOD") ?? "1");
var list = new SortedDictionary<string, object>();
var failedAgents = 0;
foreach (var (code, bp) in Agents.Find(provider).Where(a => want.Count == 0 || want.Contains(a.Code)))
{
var t0 = sw.Elapsed;
try
{
var mesh = Agents.BodyMesh(provider, bp);
if (mesh == null) { Console.WriteLine($"{code}: 3인칭 몸 없음 (건너뜀)"); continue; }
var file = $"agent_{code}.glb";
var r = Agents.Export(provider, mesh, Path.Combine(outDir, file), maxTex, lodWant);
list[code + "_PC_C"] = new { code, file, mesh = mesh.Name, triangles = r.Triangles };
Console.WriteLine($"{code}: {mesh.Name} 삼각형 {r.Triangles} · 뼈 {r.Bones} · 애니메이션 {r.Clips} · 텍스처 {r.Textures}({r.TextureBytes >> 10}KB) · {(sw.Elapsed - t0).TotalSeconds:F0}초");
}
catch (Exception e)
{
failedAgents++;
Console.WriteLine($"{code}: 실패 {e.GetType().Name} {e.Message}");
}
GC.Collect();
}
// 무기 (기본 스킨): weapon_<이름>.glb
var weapons = new SortedDictionary<string, object>();
if (want.Count == 0 || want.Contains("weapons"))
foreach (var (name, bp) in Weapons.List)
{
try
{
var (wm, mag) = Weapons.Find(provider, bp);
if (wm == null) { Console.WriteLine($"무기 {name}: 메시 없음"); continue; }
var file = Weapons.FileName(name);
var tris = Weapons.Export(provider, wm, mag, Path.Combine(outDir, file), maxTex);
weapons[name] = new { file, mesh = wm.Name, triangles = tris, points = Weapons.Points };
Console.WriteLine($"무기 {name}: {wm.Name}{(mag != null ? " + " + mag.Name : "")} 삼각형 {tris} {Weapons.Points?.ToJsonString()}");
}
catch (Exception e)
{
failedAgents++;
Console.WriteLine($"무기 {name}: 실패 {e.GetType().Name} {e.Message}");
}
}
File.WriteAllText(Path.Combine(outDir, "agents.json"), System.Text.Json.JsonSerializer.Serialize(new { agents = list, weapons }, new System.Text.Json.JsonSerializerOptions { WriteIndented = true }));
Console.WriteLine($"끝: 요원 {list.Count} · 무기 {weapons.Count} · 실패 {failedAgents} · 받은 양 {store.DownloadedBytes >> 20}MB · {sw.Elapsed.TotalMinutes:F1}분");
return failedAgents == 0 ? 0 : 1;
}
case "anim":
foreach (var a in args.Skip(1)) ProbeAnim.Anim(provider, a);
break;
case "skel":
foreach (var a in args.Skip(1)) ProbeAnim.Skel(provider, a);
break;
case "json":
// 패키지 내용 (조사용)
foreach (var path in args.Skip(1))