Add prototype gameplay loop with character/battlefield assets and server game APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
udx
2026-10-20 18:50:00 +08:00
co-authored by Cursor
parent 79369e4473
commit 6c64210331
833 changed files with 998079 additions and 1042 deletions
+18 -6
View File
@@ -1,9 +1,12 @@
# 各生成节点使用方法
## 敌方角色制作(标准方案)
采用 [敌方角色标准制作方案 v1](Doc/Design/Character/EnemyCharacterProduction.md):静态验收→同角色骨架/空间对齐→同rig Idle/Walk/Attack→离线收尾→Enemy视觉Prefab→整段与Play验收→资源登记。配方 `Config/Art/EnemyCharacters/{Name}.json`,入口 `Tools/enemy_character_pipeline.py`;岩团团为已验证样例。骨名和运动参数按解剖配置,不能把短腿双足模板直接套到四足/飞行角色。
## 文/图生图
- 默认模型:`gpt-image-2.5`(≤1K,如 `1024x1024` 或比例 `"1:1"` / `"16:9"`)
- VIP 模型:`gpt-image-2-vip`(>1K 像素,如 `2048x2048`、`2048x1152`)
- API key:sk-b69877bd82c6412ca4872351f428d580
- 接口文档:Doc\gpt-image_doc.md
- 脚本:Tools\gpt_image_generate.py
@@ -15,6 +18,15 @@
5. 当前账号下 `gpt-image-2.5-flare` 对 >1K 不可用,**不要默认使用 flare**。
### AI / 命令行调用
请在当前 shell 配置 API key(不要将 key 写入脚本或提交到 Git):
```powershell
$env:GRSAI_API_KEY = 'sk-...'
```
脚本也接受 `GPT_IMAGE_API_KEY`、`--api-key` 和 JSON 的 `api_key`;未配置 key 时会在提交请求前明确报错。
```bash
# 文生图(默认 1K / gpt-image-2.5)
python Tools/gpt_image_generate.py -p "一只边牧在草地上奔跑" -o AIClient/Assets/Generated/dog.png
@@ -35,7 +47,7 @@ python Tools/gpt_image_generate.py --json "{\"prompt\":\"UI图集\",\"output\":\
- `--callback-file`:覆盖写入 `{latest, history}` 状态文件
- 默认 stdout 输出 NDJSON 事件流,最后一行为最终结果
环境变量可选覆盖:`GRSAI_API_KEY`、`GPT_IMAGE_API_KEY`
环境变量可选覆盖:`GRSAI_API_KEY`、`GPT_IMAGE_API_KEY`。流式响应兼容 SSE 与 NDJSON;`async` 或未完成的 `json` 响应会自动调用结果查询接口轮询。
## 腾讯混元3D(图生3D → GLB)
- 网站:`https://3d.hunyuan.tencent.com/`
@@ -116,9 +128,9 @@ python Tools/model_tools/model_translator.py Tools/output/prop_game/prop/prop.fb
```bash
python Tools/hunyuan_3d_generate.py -i ref.png -o Tools/output/{actor}_3d/{actor}.glb --faces 50k
python Tools/model_tools/model_lowpoly_bake.py Tools/output/{actor}_3d/{actor}.glb -o Tools/output/{actor}_game --tris 5000 --size 2048
python Tools/install_character_bundles.py -a {ActorName} -b Tools/output/{actor}_game/{actor}_xpbr -c ref.png
# Unity: AIGame/M3/Setup Character Prefab + Art Collector(挂 Test/XPbr 生成预设)
python Tools/model_tools/model_lowpoly_bake.py Tools/output/{actor}_3d/{actor}.glb -o Tools/output/{actor}_game --tris 3000 --size 1024
python Tools/install_character_bundles.py -a {ActorName} --kind Human -b Tools/output/{actor}_game/{actor}_xpbr -c ref.png
# Unity Pipeline: unity command run_script --file AgentScripts/SetupCharacter.cs --entry SetupCharacter.SetupCaoCao
```
### 与 AIC#Project ModelTranslator 对比(减面/烘焙)
@@ -126,7 +138,7 @@ python Tools/install_character_bundles.py -a {ActorName} -b Tools/output/{actor}
- **已对齐**:自适应烘焙射线、UV 最大单岛门限、XPbr base/mix 打包与 `Test/XPbr` 材质。
- **本仓库优势**:高模直接吃 GLB/glTF(混元产物),一键流水线含 XPbr。
游戏目录:`AIClient/Assets/Bundles/Characters/{ActorName}/`;高模中间件留在 `Tools/output/`。完成后登记 `Doc/ResDesc_Model.md`。
游戏目录:人物 `AIClient/Assets/Bundles/Characters/Human/{ActorName}/`;高模中间件留在 `Tools/output/`。完成后登记 `Doc/ResDesc_Model.md`。
## UI 自动生成(JSON → Prefab)