From fd429fffb9328515beb120da2807faf5305a6e0c Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Mon, 28 Sep 2026 08:42:59 +0800 Subject: feat(art): P34 素材扩展切片(水面/屋顶/墙体/栏杆) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cc0-tiles.png 由 4 格扩到 12 格:0-3 仍 Kenney 地面,4-11 为自绘构件 (4 水A/5 水B/6 屋脊/7 屋檐/8 木构墙/9 木格窗/10 栏杆/11 门) - 自绘 2 相位水面 cc0WaterTileIndexAt=(tick/32+x+2y)%2,单帧覆盖双相位; 河道与水田/水网共用;江南 fallback 不变 - drawWorld 接入:cc0 模式下民居屋顶/墙/窗/门、桥栏杆、水面走真素材,其余道具仍江南 - AssetPackTests 更新图集尺寸(12 格)+整数缩放,新增构件索引与双水相位用例 - docs/素材来源.md 记录自绘清单;同步 assets-and-licenses 与维护说明 P34 小节 - docs/evidence/p34-*.png 昼/夜/2x 特写/水波/对照(check-no-white-blocks 0 命中) --- docs/assets-and-licenses.md | 2 +- docs/evidence/p34-baseline-day.png | Bin 0 -> 58773 bytes docs/evidence/p34-realassets-closeup-2x.png | Bin 0 -> 20899 bytes docs/evidence/p34-realassets-day.png | Bin 0 -> 47319 bytes docs/evidence/p34-realassets-night.png | Bin 0 -> 57561 bytes docs/evidence/p34-water-2x.png | Bin 0 -> 8014 bytes ...264\240\346\235\220\346\235\245\346\272\220.md" | 45 ++++++++++++++++----- ...273\264\346\212\244\350\257\264\346\230\216.md" | 36 +++++++++++++++++ 8 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 docs/evidence/p34-baseline-day.png create mode 100644 docs/evidence/p34-realassets-closeup-2x.png create mode 100644 docs/evidence/p34-realassets-day.png create mode 100644 docs/evidence/p34-realassets-night.png create mode 100644 docs/evidence/p34-water-2x.png (limited to 'docs') diff --git a/docs/assets-and-licenses.md b/docs/assets-and-licenses.md index 1d691a7..5b13f49 100644 --- a/docs/assets-and-licenses.md +++ b/docs/assets-and-licenses.md @@ -8,7 +8,7 @@ - 来源:`/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc`,字体族包含 Noto Sans CJK SC。 - 许可:SIL Open Font License 1.1;本地版权文件 SHA-256:`849f4ea9c214fa4ac3593b770c699f387534b11ce671264c1b10d85bdcb5997b`。 - 参考:。 -- **第三方 CC0 真实像素素材图集(P33 起)**:`src/LivingVillage.Desktop/Assets/cc0-tiles.png`(128x32,地块)与 `cc0-characters.png`(3840x48,角色)由 `scripts/make-cc0-art.py` 从两个 CC0 素材包确定性再生成(整数 2x NEAREST): +- **第三方 CC0 真实像素素材图集(P33 起)**:`src/LivingVillage.Desktop/Assets/cc0-tiles.png`(384x32:前 4 格地块来自 Kenney,后 8 格水面/屋顶/墙体/栏杆/门为 P34 仓库自绘原创)与 `cc0-characters.png`(3840x48,角色)由 `scripts/make-cc0-art.py` 从两个 CC0 素材包确定性再生成(整数 2x NEAREST): - **Kenney Tiny Farm 1.0**:来源 ,许可 CC0 1.0(包内 `License.txt`),zip SHA-256 `a06f75f3…decc`。 - **Puny Characters(Shade)**:来源 ,许可 CC0 1.0(发布页),zip SHA-256 `971d7b07…320e`。 - 原始 zip 记录于 `third_party/`;用途/构建/开关详见 `docs/素材来源.md`。运行时仅在 `LV_ASSET_PACK=cc0` 时启用,默认仍走程序绘制江南图集。 diff --git a/docs/evidence/p34-baseline-day.png b/docs/evidence/p34-baseline-day.png new file mode 100644 index 0000000..7e3057b Binary files /dev/null and b/docs/evidence/p34-baseline-day.png differ diff --git a/docs/evidence/p34-realassets-closeup-2x.png b/docs/evidence/p34-realassets-closeup-2x.png new file mode 100644 index 0000000..b9cde48 Binary files /dev/null and b/docs/evidence/p34-realassets-closeup-2x.png differ diff --git a/docs/evidence/p34-realassets-day.png b/docs/evidence/p34-realassets-day.png new file mode 100644 index 0000000..e447502 Binary files /dev/null and b/docs/evidence/p34-realassets-day.png differ diff --git a/docs/evidence/p34-realassets-night.png b/docs/evidence/p34-realassets-night.png new file mode 100644 index 0000000..72a4083 Binary files /dev/null and b/docs/evidence/p34-realassets-night.png differ diff --git a/docs/evidence/p34-water-2x.png b/docs/evidence/p34-water-2x.png new file mode 100644 index 0000000..1599a85 Binary files /dev/null and b/docs/evidence/p34-water-2x.png differ diff --git "a/docs/\347\264\240\346\235\220\346\235\245\346\272\220.md" "b/docs/\347\264\240\346\235\220\346\235\245\346\272\220.md" index dd193de..31494e9 100644 --- "a/docs/\347\264\240\346\235\220\346\235\245\346\272\220.md" +++ "b/docs/\347\264\240\346\235\220\346\235\245\346\272\220.md" @@ -1,8 +1,8 @@ # 第三方像素素材来源与许可 -P33 开始把「程序几何绘制」的样例村庄逐步替换为**真实像素素材**(统一像素风格)。 -本单只做第一条竖直切片:样例村庄的一类地面(草地/石板)与一类角色(村民/主角)接入 -CC0 素材,其余仍走原程序绘制江南图集作为 fallback。 +P33 开始把「程序几何绘制」的样例村庄逐步替换为**真实像素素材**(统一像素风格), +P34 扩展到水面 / 屋顶 / 墙体 / 栏杆等构件。仍是竖直切片,不做全村,其余走原程序绘制 +江南图集作为 fallback。 - **开关**:`LV_ASSET_PACK=cc0` 时启用真实素材包;未设置或取其它值一律回退到程序绘制 图集(`Assets/jiangnan-*.png`)。图集选择入口见 `src/LivingVillage.Desktop/VillageArt.fs` @@ -11,11 +11,12 @@ CC0 素材,其余仍走原程序绘制江南图集作为 fallback。 ```bash python3 scripts/make-cc0-art.py - # -> src/LivingVillage.Desktop/Assets/cc0-tiles.png 128x32 (4 个 32x32 地面格) + # -> src/LivingVillage.Desktop/Assets/cc0-tiles.png 384x32 (12 个 32x32 格) # -> src/LivingVillage.Desktop/Assets/cc0-characters.png 3840x48 (5 变体 x 4 向 x 6 帧, 32x48 格) ``` - 源素材 16x16 / 16x24,**整数 2x NEAREST** 放大到 32x32 / 32x48;缩放断言见 + `cc0-tiles.png` 前 4 格来自 Kenney(源 16x16,**整数 2x NEAREST** 到 32x32),后 8 格为 + P34 自绘(详见第 3 节);角色图为 Puny 源 16x24 整数 2x 到 32x48。缩放断言见 `src/LivingVillage.Desktop.Tests/AssetPackTests.fs`。 ## 1. Kenney Tiny Farm(地块) @@ -28,8 +29,9 @@ CC0 素材,其余仍走原程序绘制江南图集作为 fallback。 - SHA-256:`a06f75f312c27eff15a2288475612e6f6699411be7259d408323cd15a790decc`(191128 bytes) - 获取日期:2026-09-21 - 用法:取 `Tilemap/tilemap_packed.png`(192x176,12x11 格,**无间距、16px pitch**;带间距的 - `tilemap.png` 为 203x186/17px)。本单取 (9,8)/(10,8) 两档草 + (4,8)/(4,9) 石板, - 整数 2x 生成 `Assets/cc0-tiles.png`。 + `tilemap.png` 为 203x186/17px)。取 (9,8)/(10,8) 两档草 + (4,8)/(4,9) 石板,整数 2x 生成 + `Assets/cc0-tiles.png` 的 0-3 格。**Tiny Farm 是农场包,无水面 / 屋顶 / 墙体 / 栏杆素材** + (已逐格核查:无蓝色水面格),故这些构件自绘,见第 3 节。 ## 2. Puny Characters(角色) @@ -44,10 +46,31 @@ CC0 素材,其余仍走原程序绘制江南图集作为 fallback。 32x48 格。包只提供南向姿态,北向复用南向、东/西为镜像(限制沿用 `scripts/make-cc0-art.py` 注释)。生成 `Assets/cc0-characters.png`。 +## 3. 自绘补绘构件(P34,原创,无第三方来源) + +Kenney Tiny Farm 无合适的瓦屋顶 / 白墙 / 木格窗 / 栏杆 / 水波 / 门素材,按任务要求用仓库 +自绘 32px 像素图补入 `cc0-tiles.png` 的 4-11 格(**原创,无外部来源,无需第三方许可**), +统一江南调色板:青灰瓦、白灰墙、暖木构件、碧水。逐格: + +| 索引 | 内容 | 说明 | +| --- | --- | --- | +| 4 | 水面 A | 自绘 2 相位水波之一 | +| 5 | 水面 B | 相位相对 A 位移 4px(两相位差 256px) | +| 6 | 屋顶正脊 | 青灰瓦脊 + 亮脊线 | +| 7 | 屋顶檐口 | 青灰瓦 + 檐口高光/滴水 | +| 8 | 墙体(木构) | 白灰墙 + 上下暖木梁 | +| 9 | 木格窗 | 白灰墙 + 中心木格窗 | +| 10 | 栏杆 | 木栏杆(用于桥面) | +| 11 | 门 | 暖木双扇门 | + +- 自绘代码位于 `scripts/make-cc0-art.py`(`draw_water`/`draw_roof_*`/`draw_wall`/`draw_railing`/`draw_door`), + 确定性、可复现,无外部素材。 +- 水网/水田(生成器 `code=4`)与样例河道共用同一自绘 2 相位水面。 + ## 说明 -- 两者原始 zip 均随仓库记录于 `third_party/`(`PROVENANCE.md` 为总来源记录),仓库分发的 - 只是上述再生成图集,不声称拥有未包含素材。 +- Kenney/Puny 原始 zip 均随仓库记录于 `third_party/`(`PROVENANCE.md` 为总来源记录),仓库 + 分发的只是上述再生成图集,不声称拥有未包含素材;自绘构件为原创。 - 版权/许可复核:见 `third_party/` 内原始文件与发布页;重跑 `make-cc0-art.py` 前后对 - `third_party/*.zip` 重新 `sha256sum` 校验(本单校验一致)。 -- 「中式元素补绘」为后续切片;本单只接入基础地块与一类角色,保证管线跑通。 + `third_party/*.zip` 重新 `sha256sum` 校验。 +- 范围仍为切片:动画全套 / 全村 / 更多中式元素补绘留待后续。 diff --git "a/docs/\347\273\264\346\212\244\350\257\264\346\230\216.md" "b/docs/\347\273\264\346\212\244\350\257\264\346\230\216.md" index 96dcecd..c095914 100644 --- "a/docs/\347\273\264\346\212\244\350\257\264\346\230\216.md" +++ "b/docs/\347\273\264\346\212\244\350\257\264\346\230\216.md" @@ -1073,3 +1073,39 @@ late pass),故「灯笼光晕 + 水面」以生成器夜帧为准,「炊 ``` - 范围:本单只接入基础地块与一类角色;动画全套 / 全村 / 中式元素补绘留待后续切片。 + +## P34 素材扩展切片(水面 / 屋顶 / 墙体 / 栏杆) + +在 P33 竖直切片之上,把样例村庄更多表面/构件从程序几何切到真像素素材,延续 `LV_ASSET_PACK=cc0` +开关与程序绘制 fallback。来源/许可/自绘清单见 `docs/素材来源.md`。 + +- 图集扩展:`Assets/cc0-tiles.png` 由 128x32(4 格)扩到 **384x32(12 格)**。0-3 格仍为 + Kenney Tiny Farm 地面(整数 2x);4-11 格为**自绘**构件(Kenney 农场包无水面/屋顶/墙/栏杆): + `4 water A / 5 water B / 6 roof ridge / 7 roof eave / 8 wall wood / 9 wall window / 10 railing / 11 door`。 +- 构建:`python3 scripts/make-cc0-art.py`(确定性,二次运行 byte-identical)。 +- 水面:自绘 **2 相位**,`cc0WaterTileIndexAt tick x y = (tick/32 + x + 2y) mod 2`,单帧内沿河 + 同时出现两相位;河道与水田/水网(生成器 `code=4`)共用。江南 fallback 仍是 3 相位。 +- 屋顶 / 墙体 / 门:样例民居在 cc0 模式下用 6/7/8/9/11 格;桥面用 10 格栏杆;其余道具仍走 + 江南图集。 +- 断言:`src/LivingVillage.Desktop.Tests/AssetPackTests.fs` 更新图集尺寸(12 格)与整数缩放, + 并新增「构件索引都在图集内 + 单帧覆盖两水相位」用例。 +- 证据(`docs/evidence/`,`git add -f`;`check-no-white-blocks.py` 5 帧 0 命中): + - `p34-realassets-day.png` / `p34-realassets-night.png`:样例村庄真实素材昼 / 夜整帧 1280x720。 + - `p34-realassets-closeup-2x.png`:民居屋顶/白墙/桥栏杆/水面 2x NEAREST(青灰瓦 (52,58,72)、 + 白墙 (234,228,212)、木栏杆 (112,74,46)、水面 (54,110,170) 均在场)。 + - `p34-water-2x.png`:河面 2x 特写(同帧可见两相位波纹)。 + - `p34-baseline-day.png`:同场景程序绘制 fallback 对照。 +- 复现: + + ```bash + DLL=src/LivingVillage.Desktop/bin/Release/net8.0/LivingVillage.Desktop.dll + for h in 12.0 23.5; do + tag=day; [ "$h" = 23.5 ] && tag=night + timeout 20 xvfb-run -a -s "-screen 0 1280x720x24" env LV_AUTOPLAY_SAMPLE=1 \ + LV_AUTOPLAY_RECORD=1 LV_AUTOPLAY_START_HOUR=$h LV_RECORD_EVERY=5 \ + LV_RECORD_NAME=p34-$tag- LV_ASSET_PACK=cc0 \ + LV_RECORD_DIR=/tmp/opencode/lv-p34-evidence/$tag dotnet "$DLL" + done + ``` + +- 范围:仍为切片,不做全村;动画全套与更多中式元素补绘留待后续。 -- cgit v1.2.3