18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 22:25:23 +01:00
Commit Graph

4670 Commits

Author SHA1 Message Date
Hirek 9156ff2ed5 Merge pull request #545 from MaSzyna-EU07/feat/eu07m-gref
feat(model): the geometry shared by the variants of a family kept once, in a store of the folder
2026-11-30 18:59:16 +00:00
maj00r 7ab6080096 docs(eu07m): the store as the game reads it now, the id of a block hashed again only with verify_hash, the store opened again when its file changes; the id to settle before packing 2026-11-30 05:24:20 +01:00
maj00r 5bfdd756de Merge feat/eu07m-channels into feat/eu07m-gref 2026-11-30 00:33:53 +01:00
maj00r 96198fa7a4 Merge feat/eu07m-clip-event into feat/eu07m-channels 2026-11-30 00:33:51 +01:00
maj00r e80cfc4f14 Merge feat/eu07m-skin-compute into feat/eu07m-clip-event 2026-11-30 00:33:50 +01:00
maj00r 91d334a484 Merge feat/eu07m-clips into feat/eu07m-skin-compute 2026-11-30 00:33:48 +01:00
maj00r f640657549 Merge feat/eu07m-skinning into feat/eu07m-clips 2026-11-30 00:33:46 +01:00
maj00r 14dc873b05 Merge feat/eu07m-instancing into feat/eu07m-skinning
# Conflicts:
#	model/Model3d.h
#	rendering/common/scenewalk.cpp
#	rendering/common/scenewalk.h
#	rendering/opengl46/opengl46renderer.cpp
2026-11-30 00:33:39 +01:00
maj00r 470d4510ed Merge feat/e4d-compact into feat/eu07m-instancing
# Conflicts:
#	rendering/common/scenewalk.cpp
2026-11-30 00:33:16 +01:00
maj00r a4dd61cd2c Merge feat/e4d-load into feat/e4d-compact 2026-11-30 00:33:02 +01:00
maj00r 161a7762c9 Merge feat/model-format-e4d into feat/e4d-load 2026-11-30 00:33:00 +01:00
maj00r fc74ff0860 Merge origin/staging into feat/model-format-e4d 2026-11-30 00:32:49 +01:00
maj00r b3916500ce docs(eu07m): an animation event takes a node over from the clips and channels for good, and a sheared node loses its shear under a clip 2026-11-30 00:32:39 +01:00
maj00r a618c725b3 fix(render): the skinning kernel turns the handedness of the tangent frame for a mirroring joint, as the cpu does 2026-11-30 00:32:19 +01:00
maj00r 2df79b4e4d fix(model): a mirroring joint turns the handedness of the tangent frame too, so the bitangent mirrors with the surface 2026-11-30 00:32:05 +01:00
Hirek cabd53a01c Merge pull request #382 from pwarszawski/fix/gl46-text-displays
fix(gl46): station name boards show their text
2026-11-29 17:40:25 +00:00
Hirek fe45bb5811 Merge pull request #374 from pwarszawski/fix/glare-occlusion
fix(gl46): no more glares of light points through walls
2026-11-29 17:39:59 +00:00
Hirek d21ae35899 Merge pull request #373 from pwarszawski/fix/gl46-scenery-zero-normals
fix(gl46): scenery shapes and rail ends rendered black
2026-11-29 17:37:28 +00:00
Hirek 3a9b3e5681 Merge pull request #372 from pwarszawski/fix/cluster-cull-lamp-radius
fix(gl46): the radius of a lamp isn't a part of its brightness in the cluster culling
2026-11-29 17:37:11 +00:00
Hirek a2315990ca Merge pull request #550 from miloszunio/feat/debug-perflog
feat(debug): debug.perflog writes the times of the renderer to perf.txt while the game runs
2026-11-29 17:36:21 +00:00
Hirek f964f75ece Merge pull request #544 from MaSzyna-EU07/fix/staging-case-regressions
Fix two scenario cases broken on staging: the uuid of scene nodes, the AI stop on a gradient, an off-track coupling
2026-11-29 17:35:36 +00:00
Hirek b8f31859e9 Merge pull request #546 from MaSzyna-EU07/feat/derailment-trust-limits
physics.derailment new: trust the speed limit of the track (physics.derailment.trustlimits)
2026-11-29 17:35:05 +00:00
Hirek 4d1219e225 Merge pull request #554 from MaSzyna-EU07/cleanup/mover
Create vehicle-architecture.md
2026-11-29 17:33:37 +00:00
Hirek 5d5e271edb Create vehicle-architecture.md 2026-11-29 18:32:22 +01:00
maj00r b03fff75df Merge the review fixes of the PRs below from feat/eu07m-channels into feat/eu07m-gref 2026-11-29 18:23:01 +01:00
maj00r 6efc1eb718 Merge the review fixes of the PRs below from feat/eu07m-clip-event into feat/eu07m-channels
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.
2026-11-29 18:23:01 +01:00
maj00r 6402e2191b Merge the review fixes of the PRs below from feat/eu07m-skin-compute into feat/eu07m-clip-event
# Conflicts:
#	model/AnimModel.cpp
2026-11-29 18:22:25 +01:00
maj00r 49ef69bb34 Merge the review fixes of the PRs below from feat/eu07m-clips into feat/eu07m-skin-compute 2026-11-29 18:22:14 +01:00
maj00r c171e2e7d5 Merge the review fixes of the PRs below from feat/eu07m-skinning into feat/eu07m-clips 2026-11-29 18:22:13 +01:00
maj00r 05a8ddaabd Merge the review fixes of the PRs below from feat/eu07m-instancing into feat/eu07m-skinning 2026-11-29 18:22:12 +01:00
maj00r f2859b11ae Merge the review fixes of the PRs below from feat/e4d-compact into feat/eu07m-instancing 2026-11-29 18:22:11 +01:00
maj00r 1638fc919b fix(model): EU07M review of #545: a pack failing half way leaves the folder loading, a store packed anew opened again
- 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.
2026-11-29 18:22:04 +01:00
maj00r ce40e11b94 fix(model): EU07M review of #543: channel names keep their case, the joint moves from its rest value
- 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.
2026-11-29 18:20:09 +01:00
maj00r 7b6bdf22bb fix(events): EU07M review of #542: clip names keep their case and match regardless of it, an event without a pace told
- 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.
2026-11-29 18:19:19 +01:00
maj00r 4018a5cba4 fix(render): EU07M review of #541: the skinning kernel moves normals as the cpu does
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.
2026-11-29 18:18:11 +01:00
maj00r 474c9ab5ae fix(model): EU07M review of #540: stopped clips held per instance, events over clips, the rest of a matrix node from its matrix
- 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.
2026-11-29 18:17:49 +01:00
maj00r 115c13b274 fix(model): EU07M review of #539: a model made anew keeps its transforms, normals of scaled joints, the rest pose far from the origin
- 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.
2026-11-29 18:16:19 +01:00
maj00r 99bc0b125c fix(render): EU07M review of #538: an instance with light colours of its own drawn alone, the light records locked only when stale
- 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.
2026-11-29 18:14:35 +01:00
maj00r 3b9d8b2fa3 fix(render): EU07M review of #537: no whole vertices kept for the bounds, the compact variant checked by CI and given up when it fails
- 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.
2026-11-29 18:12:50 +01:00
jerrrrycho a8bd72cc7f Merge staging into fix/staging-case-regressions build-fix-staging-case-regressions 2026-11-29 18:04:00 +01:00
jerrrrycho c0e1f1c8fe Merge staging into feat/derailment-trust-limits build-feat-derailment-trust-limits 2026-11-29 18:04:00 +01:00
maj00r 8b75db6b70 Merge the review fixes of #535 and #536 from feat/eu07m-channels into feat/eu07m-gref 2026-11-29 17:55:01 +01:00
maj00r c6ece72d6a Merge the review fixes of #535 and #536 from feat/eu07m-clip-event into feat/eu07m-channels 2026-11-29 17:54:59 +01:00
maj00r bf8bb0caa0 Merge the review fixes of #535 and #536 from feat/eu07m-skin-compute into feat/eu07m-clip-event 2026-11-29 17:54:53 +01:00
maj00r 96ef809b07 Merge the review fixes of #535 and #536 from feat/eu07m-clips into feat/eu07m-skin-compute 2026-11-29 17:54:48 +01:00
maj00r 628f7eb707 Merge the review fixes of #535 and #536 from feat/eu07m-skinning into feat/eu07m-clips 2026-11-29 17:54:44 +01:00
maj00r 0efab6a080 Merge the review fixes of #535 and #536 from feat/eu07m-instancing into feat/eu07m-skinning 2026-11-29 17:54:34 +01:00
maj00r 6cb66b8b35 Merge the review fixes of #535 and #536 from feat/e4d-compact into feat/eu07m-instancing 2026-11-29 17:54:28 +01:00
maj00r 20f2156ce2 Merge #535 and #536's review fixes into feat/e4d-compact
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::.
2026-11-29 17:54:01 +01:00
maj00r ee631c7b41 fix(model): E4D review of #536: a stale .e4d isn't used, a model which can't be built falls back to its .e3d
- 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.
2026-11-29 17:53:28 +01:00