Files
AIGame/Doc/Design/Character/RockBall/StudioTrial.md
T

42 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 岩团团:Studio 低模/UV 与原动作复用试验
2026-10-21,状态 validated。用户要求岩团团严格走混元 3D 生成高模后的第 2~5 步,再在 Blender 绑回原骨骼复用原动作。原始 `Tools/output/rockball_3d/rockball.glb` 上传腾讯混元 3D Studio(用户授权)。交付独立试验版 `RockBallStudio`,正式战场仍使用原 RockBall,未替换;没有调用 TokenRig/UniMate,也没有修改原动作。
| 阶段 | 实际执行与产物 |
| --- | --- |
| 原始高模 | `rockball.glb`(原 TokenRig 骨架与原静态模的同一来源),原文件保留 |
| 02 Studio 低模生成 | 官网低模拓扑:6946 三角面。`hunyuan_studio.json`/`studio_lowPolyTopologyRsp.json` |
| 03 Studio UV 展开 | 上一步 FBX 继续展开,输出带 UV 的 GLB/FBX/OBJ 与 UV 图。`studio_uvUnwrappingRsp.json` |
| 烘焙前对齐 | Studio 网格被居中归一化;`bl_align_studio_uv.py` 等比缩放 1.018444、底面中心对齐到原高模,UV 哈希前后一致 |
| 04 Blender 贴图烘焙 | 对 Studio UV 网格 selected-to-active 烘焙 1024² diffuse/normal/AO/metallic/roughness,不重新展 UV |
| 05 超目标 30% 保留 UV 减面 | 6946 > 2000×1.3,触发 Collapse 到 2000 面,UV 层保留(uv_mode=preserved_no_unwrap) |
| 项目格式 | Y-up、底面中心、-Z 正面 FBX;五通道打包 1024² XPbr |
| 绑回原骨骼 | `bl_transfer_skin.py` 从原 `rockball_dgx/high_rig/rigged.glb` 复制原 12 骨并转权重,骨路径与绑定局部 TRS 逐项核对;绑定对照静态模最大顶点差 0.032 mm |
| 复用动作 | Animator 直接引用原 Avatar 与 `RockBall_Animator.controller`,播放原 `Clips/Idle/Walk/Attack.anim` |
| 脚底修正 | 导出 306 个脚底顶点 × 363 帧原动作约束;没有顶点穿地超过 3 mm,未做任何局部修改 |
## 验收
| 动作(121 帧实际蒙皮) | 脚底范围 | 其他 |
| --- | --- | --- |
| Idle | -0.41~0.20 mm | 首尾差 0.000 mm,倾角 0.0° |
| Walk | -1.72~0.78 mm | 首尾差 0.000 mm,倾角 0.3° |
| Attack | -2.57~1.33 mm | 首尾差 0.000 mm,倾角 14.1° |
实际 Play 观察到 Idle/Walk/Attack 三状态,最大根骨倾角 13.71°,外层根固定。原 Prefab、控制器、三段动作与 rig 的 SHA256 在流程前后一致(`trial.json` originals)。
对比图 `AIClient/Assets/Screenshots/rockball_studio_comparison.png`(上排原版,下排 Studio 版:Static/Idle/Walk/Attack),两版外观与动作姿态一致。最终同为 2000 面;Studio 6946 面拓扑在减面后的布线优势需要结合近景再判断。
## 交付与复现
- 试验目录 `AIClient/Assets/Bundles/Characters/Animal/RockBallStudio/`:`RockBallStudio.prefab`(静态)、`RockBallStudio_Companion.prefab`(动画)、`RockBallStudio.fbx`、`Rigged/RockBallStudio_Rigged.fbx`、`.mat`、`_base.png`/`_mix.png`。
- 验收场景 `AIClient/Assets/Bundles/Scenes/Review/Studio_RockBall_Review.unity`(X=320,第 27 层),制作后关闭。
- 中间件与回执 `Tools/output/studio_trial/RockBall/`(trial.json、unity_verification.json、play_verification.json、sole_fit.json、foot_constraints.json)。
```powershell
D:/UD/AI/XModel/LLM3DGraphics/.venv/Scripts/python.exe Tools/studio_lowpoly_trial.py --actor RockBall --kind Animal --source Tools/output/rockball_3d/rockball.glb --rig Tools/output/rockball_dgx/high_rig/rigged.glb --prefab RockBall_Rigged.prefab
python Tools/studio_lowpoly_finish.py --actor RockBall --height 0.55 --play-check
```
`studio_lowpoly_trial.py`/`studio_lowpoly_finish.py`/`AgentScripts/StudioTrial.cs` 由大角首领试验泛化:角色、类型、原 Prefab、身高作为参数,骨数从原 Prefab 读取,脚底约束改用每个顶点自身四个骨骼权重;`bl_prepare_studio_trial.py`/`bl_fit_studio_soles.py` 增加可选角色名参数,大角首领原调用方式不变。