RaPrepare() applies the clips, then the channels, then the animation events, so an event on a node takes over from both.
The spec has the fixes of #538, #540 and #542 in English.
- pack_folder() writes a store of the old blocks and the new ones together before the models, then the models, then the
store of the new blocks alone: a failure on any model (a rename refused, the disk full) leaves models packed against
either store, all of which load. Before, models 1..k referred to blocks no store on the disk had.
- write_file() closes the stream before it checks it (what sat in its buffer is written by the close) and removes the
.tmp of a failed write.
- family_store() opens the store of a folder again when its size or time changed (packed anew while the game runs): its
blocks are read from the file by the offsets of the index, which then belonged to another file. A store which can't be
opened is told in the log once, with the reason, instead of every model of the folder reporting a missing block.
- The game finds a block by its hash and checks its counts; the bytes are hashed again only with verify_hash, as the
tools read (insert_blocks(..., Verify)), so a load no longer hashes every block twice.
- The index of a store is checked without the offset and the size wrapping, and a block may unpack to 1 GiB at most.
- The channel event reads the name of the channel as written (getTokens lowercased it), and set_channel() finds it
regardless of case: a channel named doorLeft couldn't be set from a scenery.
- JOIN.rest is read: the node is modelled at the rest value of its joint, which moves it by the value less rest (the
limits stay values of the joint). A part modelled half open no longer jumps when its channel is set. Files without it
(rest 0) move as before.
- The spec says so, and that no vehicle sets channels yet.
Test: a slider modelled half out.
- The clip event reads the name of the clip as written (getTokens lowercased it), and play_clip() finds the clip
regardless of case, as the submodels are found by their names: a clip named Open or Armature|Wave couldn't be started
from a scenery.
- An event without a pace (clip <name> endevent) plays the clip at its own pace with a line in the log, and leaves the
keyword it met to the event: before, endevent was read as a pace of 0 (stopping the clips) and the next token was
swallowed.
- Pace 0 with several instances of one model is held by #540's fix (the clips stopped stay set per instance).
- The spec says so.
skin.comp moves the normals by the cofactors of the blended rotation with the sign of its determinant, as
skinning::skin_vertices() now does (#539), so a joint scaled unevenly lights its part the same on both paths.
- stop_clips() holds each clip at the moment it was stopped instead of dropping it: the pose lives in the submodels the
instances of a model share, so an instance whose clips were cleared snapped back to rest as soon as another instance of
the model played one (two doors of one model).
- RaPrepare() applies the clips before the animation events of the scenery, so an event moving a node (rotate,
translate...) takes it over from a clip, one ended or stopped included; before, a finished clip overrode the events
on its nodes on every draw.
- A node with a matrix (XFRM) has its TRS fields only as an approximation: the parts the tracks of a clip don't move are
taken from the decomposed matrix, so the node no longer jumps or skews when a clip starts moving another part of it.
- The spec says so.
- A node of a model made anew (legacy_flags 0) with a transform gets 0x8000, as a converted one has it: the walk and
posed_transform() left such nodes out, so a skin was drawn off its place in the bind pose (the tube: the upper half 2 m
off) and jumped when an animation set 0x4000 on the joint.
- Normals are skinned by the cofactors of the blended rotation (the direction of its inverse transpose), with the sign of
its determinant, not by the rotation: a joint scaled unevenly tilted the normals of its part.
- rest_pose() takes the translation within the tolerance times the distance from the origin of the mesh and the joints
(palette_scale()): the float chain rounds in proportion to it, and a model a few kilometres out counted as posed in the
bind pose, with a geometry copy and a skinning pass of its own.
Tests: the rest pose far from the origin, the normals of a stretched and of a mirroring joint.
- An instance with lightcolors of its own isn't instanced: the colours go onto the shared submodels as the instance is
prepared, which the instances of a bucket don't each get, so they all showed the colours of one of them.
- The walk takes the exclusive lock for the light records of a bucket only when they are stale in this frame
(Refresh_Light_Records() checks again under it): the later passes of the frame no longer stop the other walkers.
- instance_cull.comp (both renderers) puts the word of the light parts into [0][3] after the product with the view, so a
view with a translation can't stretch the first column of a lit instance.
- The spec: ls_Dark / ls_Home switch without the fade too, and the instances with light colours of their own.
- The bounding radius, offset() and MaxY() read the positions of a chunk alone (Positions(), geometry_bank::positions()):
on Vulkan the compact streams are no longer decoded into basic_vertex and kept for the life of the bank as every model
loads, so the host memory of EU07M models stays below that of E3D. What still needs whole vertices (the editor, the
picking, the export) decodes them on first use as before.
- A COMPACT_VERTEX variant which doesn't compile is told once in the log and the banks of EU07M models go back to
basic_vertex (compact_layout_failed()), those built already when they are drawn next, instead of the models being left
out for the session.
- The shader validator compiles the vk14 shaders which have COMPACT_VERTEX with it, alone and with MODEL_DRAWS, as the
renderer makes the variants.
Resolved for the rename to EU07M: the stale-file check is eu07m_up_to_date() before LoadFromEU07M, the loader catches
what reading throws, and the new tests name eu07m::.
- modelformat e4d: an .e4d older than its .e3d / .t3d isn't loaded, with a line in the log; the model was changed after
it was converted.
- LoadFromE4D catches what reading and building throw (no memory for what a broken file declares) and leaves nothing of
the model, so its .e3d / .t3d loads instead; a worker of fill_geometry() hands its exception to the caller after the
join instead of ending the program.
- ref/meshoptimizer is cloned shallow like the other submodules.
The pass bits the converter no longer bakes (#535) are guessed again by BinInit, which finish_binary() runs, so the
loader needs no change for them.