Skip to content

v4.13.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 22:52
· 5 commits to main since this release
v4.13.0
9524676

cleanmodels v4.13.0

Repairing or recompiling a binary model no longer loses geometry. Found when a repair on a server's interior tiles took the lower half off their walls.

Merged meshes are decompiled whole

Many binaries, including 1,015 of the game's own (mostly tiles: tno01, tts02, ttf02, tcn01), draw the meshes of one texture as one. One mesh's render list holds its own triangles and copies of the others'. Those others keep their faces, but have render switched off and nothing in their render lists. The game draws the render lists, so the model looks whole. cleanmodels read only the faces, so decompiling, repairing or recompiling such a model lost the copied triangles, and the merged meshes came out invisible.

Decompile now reads the render lists and switches each merged mesh back on. That draws the same triangles, as a mesh of its own.

  • Results: recompiled, the 1,015 game models and 342 of a server's draw every triangle the originals draw, apart from degenerate ones. With 4.12.0 they lost 47% and 34% of what they draw.
  • Animated parts: in six of the game's placeables (dag_skelhg1, dag_skelhg2, dag_blk, dag_ht1, tnp_rack_a01, and the tile tno01_m54_02), a merged part has animations the game never showed, because it was drawn still with the mesh it was merged into. Recompiled, those parts move as animated: the hanging skeletons' limbs sway, dag_blk's ring turns. The decompile notes say which.
  • Lost triangles: if a render list draws triangles that are in no mesh's faces, repair, compile and check --fix refuse to write the model unless --force is given. None of the game's models does this.

A model root's position and orientation are compiled

A root node with a position or orientation line now gets those controllers, as the game's compiler does (checked against its compiles). Before, they were dropped: a tile whose root sat 1.75 m down came back up 1.75 m.

Zero-length tangents

The game draws a mesh's tangents as given. On a normal-mapped surface, a tangent of zero length shows as a white streak.

  • repair --fix-tangents (part of --all) drops a mesh's tangents when any has zero length, and cleanmodels computes them from the geometry, as the game does for a mesh without them.
  • compile keeps them as the game does, with a warning.
  • check reports them.

Checked in game on the tile whose white strips started this.

Checking

The Python port carries every decompile and compile change. On the game's 32,832 models, decompile, parse and compile give the same output and warnings as the Go build.