[Parity][map/render][S2] LevelView enrichDraws 对 blockCount === 0 的纯碰撞/空图形 DT1 图块(如世界之石要塞二层 baallair\\floor.dt1 tileIndex=109)误报 [D2MissingArt] #739

Closed
opened 2026-10-03 10:50:03 +00:00 by troytt · 0 comments
Owner

问题描述

进入世界之石要塞二层(The WorldStone Keep Level 2, areaId = 129)等包含 0 像素块(blockCount === 0)DT1 图块的区域时,控制台报错:

[D2MissingArt] tile:data\global\tiles\expansion\baallair\floor.dt1 — Missing tile placement for tileIndex=109

1.13c Ground Truth 根因分析

  1. 在原版 MPQ DT1 资源中,存在 24 个 blockCount === 0(nBlocks == 0)的纯碰撞/标记型图块(例如 data\global\tiles\expansion\baallair\floor.dt1 的 tileIndex=109,style=3, sequence=55, type=0, blockCount=0, subTileFlags=[1,1,...,1];以及 act2\tomb\talrasha.dt1、expansion\wildtemple\entrance.dt1 等)。
  2. 在 1.13c 中,这类图块在 DRLG 房间加载阶段将 subTileFlags 写入子瓦片碰撞网格(buildIsoMapScene 已完整写入),但在渲染阶段因为 nBlocks == 0 不产生任何像素绘制。TileAtlas.fromDt1Map 对 t.blocks.length === 0 的图块合法地设置 placement: null 且记录 blockCount: 0。
  3. 然而 src/client/map/level-view.ts 的 enrichDraws 仅判断 if (tileAtlas && (!atlasEntry || !atlasEntry.placement)),未区分 atlasEntry.blockCount === 0 的合法无图形图块,导致误触发 reportMissingArt;同时 src/client/scene/world-renderer.ts 在遍历墙体图块时也未排除 blockCount === 0 的图块。

修复范围

  • src/client/map/level-view.ts:enrichDraws 识别 blockCount === 0 的合法无像素块 DT1 图块,不再误报 reportMissingArt,并在 LevelDrawItem 上保留 blockCount 元数据。
  • src/client/view/scene-source.ts & src/client/scene/world-renderer.ts:对 !placement && blockCount === 0 的非屋顶层图块跳过生成无效渲染四元组,保留屋顶层(type=15)用于 playerUnderRoof 遮挡判定,且墙体渲染不再对 blockCount === 0 误报 reportMissingArt。
  • 新增针对 areaId = 129(baallair\floor.dt1 tileIndex=109)及全 136 张地图 LevelView 构建零 [D2MissingArt] 误报的回归测试。
## 问题描述 进入世界之石要塞二层(`The WorldStone Keep Level 2`, `areaId = 129`)等包含 0 像素块(`blockCount === 0`)DT1 图块的区域时,控制台报错: ``` [D2MissingArt] tile:data\global\tiles\expansion\baallair\floor.dt1 — Missing tile placement for tileIndex=109 ``` ## 1.13c Ground Truth 根因分析 1. 在原版 MPQ DT1 资源中,存在 24 个 `blockCount === 0`(`nBlocks == 0`)的纯碰撞/标记型图块(例如 `data\global\tiles\expansion\baallair\floor.dt1` 的 `tileIndex=109`,`style=3, sequence=55, type=0, blockCount=0, subTileFlags=[1,1,...,1]`;以及 `act2\tomb\talrasha.dt1`、`expansion\wildtemple\entrance.dt1` 等)。 2. 在 1.13c 中,这类图块在 DRLG 房间加载阶段将 `subTileFlags` 写入子瓦片碰撞网格(`buildIsoMapScene` 已完整写入),但在渲染阶段因为 `nBlocks == 0` 不产生任何像素绘制。`TileAtlas.fromDt1Map` 对 `t.blocks.length === 0` 的图块合法地设置 `placement: null` 且记录 `blockCount: 0`。 3. 然而 `src/client/map/level-view.ts` 的 `enrichDraws` 仅判断 `if (tileAtlas && (!atlasEntry || !atlasEntry.placement))`,未区分 `atlasEntry.blockCount === 0` 的合法无图形图块,导致误触发 `reportMissingArt`;同时 `src/client/scene/world-renderer.ts` 在遍历墙体图块时也未排除 `blockCount === 0` 的图块。 ## 修复范围 - `src/client/map/level-view.ts`:`enrichDraws` 识别 `blockCount === 0` 的合法无像素块 DT1 图块,不再误报 `reportMissingArt`,并在 `LevelDrawItem` 上保留 `blockCount` 元数据。 - `src/client/view/scene-source.ts` & `src/client/scene/world-renderer.ts`:对 `!placement && blockCount === 0` 的非屋顶层图块跳过生成无效渲染四元组,保留屋顶层(`type=15`)用于 `playerUnderRoof` 遮挡判定,且墙体渲染不再对 `blockCount === 0` 误报 `reportMissingArt`。 - 新增针对 `areaId = 129`(`baallair\floor.dt1` `tileIndex=109`)及全 136 张地图 `LevelView` 构建零 `[D2MissingArt]` 误报的回归测试。
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#739
No description provided.