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

4700 Commits

Author SHA1 Message Date
maj00r 56756ddb8e feat(model): .ng3d and .ng3p in what this branch adds, as below it
The model files are .ng3d and the family store .ng3p, selected with modelformat ng3d (8637101d9 on feat/e4d-compact).
build-feat-eu07m-model-inspector
2026-11-30 22:27:05 +01:00
maj00r db75e47615 Merge branch 'feat/eu07m-gref' into feat/eu07m-model-inspector 2026-11-30 22:27:03 +01:00
maj00r c446a1640d Merge branch 'feat/eu07m-clip-event' into feat/eu07m-gref
Brings the .ng3d extension and modelformat ng3d (8637101d9). Where both sides changed a line, this branch's text is kept with the names changed; what this branch adds is renamed with it: the model files .ng3d, the family store .ng3p.
2026-11-30 22:27:02 +01:00
maj00r ff55024be9 Merge branch 'feat/eu07m-skin-compute' into feat/eu07m-clip-event 2026-11-30 22:26:38 +01:00
maj00r 7cad10c39a Merge branch 'feat/eu07m-clips' into feat/eu07m-skin-compute 2026-11-30 22:26:38 +01:00
maj00r baa7ba10db feat(model): .ng3d and .ng3p in what this branch adds, as below it
The model files are .ng3d and the family store .ng3p, selected with modelformat ng3d (8637101d9 on feat/e4d-compact).
2026-11-30 22:26:38 +01:00
maj00r bf66a704b1 Merge branch 'feat/eu07m-skinning' into feat/eu07m-clips 2026-11-30 22:26:37 +01:00
maj00r d21ca4c854 feat(model): .ng3d and .ng3p in what this branch adds, as below it
The model files are .ng3d and the family store .ng3p, selected with modelformat ng3d (8637101d9 on feat/e4d-compact).
2026-11-30 22:26:37 +01:00
maj00r 3be62b067e Merge branch 'feat/eu07m-instancing' into feat/eu07m-skinning 2026-11-30 22:26:36 +01:00
maj00r 3c7824199c Merge branch 'feat/e4d-compact' into feat/eu07m-instancing 2026-11-30 22:26:36 +01:00
maj00r 8637101d96 feat(model): the EU07M model files take the .ng3d extension, the switch is modelformat ng3d
In place of .r3a (2fe1064f9): the model files are .ng3d and eu07.ini selects them with modelformat ng3d. The format keeps its name (EU07M), its magic and the -eu07m command line tool. Neither name has been released.
2026-11-30 22:26:29 +01:00
maj00r d918d5f2f6 feat(model): .r3a and .r3p in what this branch adds, as below it
The model files are .r3a and the family store .r3p, selected with modelformat r3a (2fe1064f9 on feat/e4d-compact, merged up through feat/eu07m-gref).
2026-11-30 22:12:58 +01:00
maj00r c6fbd7801f Merge branch 'feat/eu07m-gref' into feat/eu07m-model-inspector 2026-11-30 22:12:57 +01:00
maj00r a669be8f8f Merge branch 'feat/eu07m-clip-event' into feat/eu07m-gref
Brings the .r3a extension and modelformat r3a (2fe1064f9). docs/eu07m-format.md keeps this branch's English text, with the names changed. What this branch adds is renamed with it: the model files .r3a, the family store .r3p (geometry.r3p).
2026-11-30 22:12:49 +01:00
maj00r 20f6b2f52f Merge branch 'feat/eu07m-skin-compute' into feat/eu07m-clip-event 2026-11-30 22:12:13 +01:00
maj00r 981640d6e0 Merge branch 'feat/eu07m-clips' into feat/eu07m-skin-compute 2026-11-30 22:12:12 +01:00
maj00r a716f20d5f feat(model): .r3a and .r3p in what this branch adds, as below it
The model files are .r3a and the family store .r3p, selected with modelformat r3a (2fe1064f9 on feat/e4d-compact).
2026-11-30 22:12:11 +01:00
maj00r 13d40487f8 Merge branch 'feat/eu07m-skinning' into feat/eu07m-clips 2026-11-30 22:12:11 +01:00
maj00r 8dc60036a0 feat(model): .r3a and .r3p in what this branch adds, as below it
The model files are .r3a and the family store .r3p, selected with modelformat r3a (2fe1064f9 on feat/e4d-compact).
2026-11-30 22:12:10 +01:00
maj00r 79c90368a3 Merge branch 'feat/e4d-compact' into feat/eu07m-instancing 2026-11-30 22:12:09 +01:00
maj00r d12d54a83c Merge branch 'feat/eu07m-instancing' into feat/eu07m-skinning 2026-11-30 22:12:09 +01:00
maj00r 2fe1064f9a feat(model): the EU07M model files take the .r3a extension, the switch is modelformat r3a
The model files of the format are named .r3a in place of .eu07m, and eu07.ini selects them with modelformat r3a in place of
modelformat eu07m. The format keeps its name (EU07M), its magic and the -eu07m command line tool. Neither the extension nor
the key has been released, so nothing reads the old ones.
2026-11-30 22:11:57 +01:00
maj00r 3f206105b8 fix(editor): a part taken out keeps the references after it; holds and the cab end with the editor
After review of #551:

- The components the data of others points at, which a removal moves back, are all of them now: besides the bindings of a
  channel and the light sources of a light slot, the sockets of a spring (socket_a, socket_b), of the ends of a chain (end_a,
  end_b) and of a model reference, and the properties whose value is a component. A node whose component one of these points
  at isn't taken out; what the node's own components point at among themselves doesn't keep it.
- The items of the vertex groups of other meshes, absolute vertex indices, move back over the vertices cut out with a part
  (the first vertex of each pair of a group of ranges).
- A component aimed at a mesh moves back with the meshes after a removed one, and a mesh a component is aimed at keeps its node.
- The holds of the model panel on the lamps, the hooks and the pantographs are let go of when the editor is left and when the
  panel turns to another vehicle: a pantograph held down no longer cuts the power of the vehicle driven after F11.
- "Get in the cab" no longer changes the vehicle the player drives: the one driven before is driven again as the editor is left.
- The window of a model that can be imported says that a later update of the .e3d or .t3d doesn't reach the game while the
  .eu07m is there.
- A model file with a space in its name isn't put in: the scenery line would read it as another.

Unit tests for the vertex groups, the mesh targets and the sockets in the data of the components.
2026-11-30 21:27:36 +01:00
maj00r 1cab605911 Merge branch 'feat/eu07m-gref' into feat/eu07m-model-inspector
The base split vehicle/DynObj.cpp into vehicle/dynamic/*: the holds of the editor on the parts and the pantographs move with
it. The table and the functions of the holds go to the end of vehicle/dynamic/visual.cpp, the held lamps and hooks are applied
in ABuLittleUpdate there, and a held pantograph is moved at the start of updatePantographMotion (vehicle/dynamic/update.cpp),
which skips the pressure-driven motion as the old loop did with continue. DynObj.h keeps both sides: the LightList of the
VehicleEnd rename and the holds.

The two reads of MoverParameters this branch added go through TDynamicObject, as the base's AGENTS.md asks outside physics/
and vehicle/: GetLength() for the fly-to distance, and a new query OccupiedCab() for the side of the cab entered.
2026-11-30 21:27:25 +01: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 af3815eee3 feat(editor): a part of an EU07M model taken out with what it draws
"Remove this part" (Del) in the Models mode takes out any part without parts under it which nothing else
in the model points at (an animation, a light slot, a skin): with its components, its transform and its own
mesh. eu07m::remove_node now takes such a node with its geometry: its primitives go, and their vertices and
indices leave the streams where no other primitive shares them. The primitives after them move back, and
so do the meshes, the vertex groups and the references to the geometry store. A part whose mesh another
node draws too, or whose mesh has vertex groups, stays. Ctrl+Z puts the part back and picks it again.

So the flat glowing patch under a lamp post of E3D (placek) is taken out and a real light source put in the
lamp instead. Unit tests take out a part with geometry, check the streams and the primitive moved into its
place, write and read the model back, and keep a part whose mesh is shared.
2026-11-30 00:33:41 +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
maj00r 287424a3e1 fix(model): a light source added in the editor lights its surroundings
The renderer lights a light point of a model only past its threshold of self-illumination, which E3D keeps
in the material of the submodel. A LGHT node without an LMAT (made in the editor, or exported anew) had the
threshold -1, never lit, so a light added to a lamp post and saved lit nothing. Such a light now shines
whenever its node is shown, as one of a .t3d with "selfillum: true"; the lamp slot of its parent still
switches it. The converter gives every light of E3D an LMAT with the threshold it had, so the converted
models don't change. TModel3d::AddEditorLight gives the light it adds the same threshold.

Self-test: modelsave and modelbrightness, and modelplace takes the parameters of the node after the skin
(lights 3). Tested on a lamp post imported from E3D: a light added in the editor, saved, and after a new
run the lamp lights the vehicle beside it, both from the scenery file and when it is put in later.
2026-11-29 23:58:43 +01:00
maj00r 42e0884606 feat(editor): the cab of a vehicle edited in the Models mode, from the seat of the driver
The cab of a vehicle is loaded only by getting in. "Get in the cab" in the Models mode does what the
simulation does then: it makes the train of the vehicle (TTrain::Init loads the cab, its controls and its
sounds), makes it the vehicle driven, and puts the camera in the seat of the driver. While the cab is edited
the editor draws it as from that seat: FreeFlyModeFlag is off and the vehicle owns the camera, which moves
with it by its offset (the sounds read the owner of the camera then). With the body picked, or in another
field of work, the view is free again.

A new self-test command, modelvehicle <name> [cab], picks a vehicle and gets in its cab. Tested on the
EU07-424 (303e-tv) with a light added to its cab.
2026-11-29 23:00:52 +01:00
maj00r 6828e52a45 feat(editor): the EU07M models as a field of work of their own, made for those who don't know the format
The window of an EU07M model becomes the field of work "Models" (F7) beside the surroundings, the tracks,
the roads, the terrain and the catenary. The node bank says what is edited and lists the vehicles, the tool
options hold the page of the tool chosen in the toolbar (Lights, Parts of the vehicle, All parts,
Animations), and the inspector the settings of the part picked, in plain words; the fields of the format
are kept under Advanced.

- A click on the model picks its part (the smallest box of geometry of a part shown holding the point);
  a light is added where the model is clicked, a spot shining towards the camera.
- A light which nothing else points at is taken out (eu07m::node_removable / remove_node, with
  TModel3d::UnlinkEditorSubmodel / LinkEditorSubmodel on the model the game has).
- Ctrl+Z / Ctrl+Y take the changes of the model back and make them again, a light added or taken out
  among them; another model asked for with changes not saved asks first.
- "Import to EU07M" writes <model>.eu07m beside the .e3d or .t3d of a model without one, made of the
  model as the game loaded it (eu07m::import_model), so a lamp post or a cab gets its lights here.
- "Put a model in the scenery" puts a model of the folder of the models in front of the camera, "Whole
  model" moves the scenery model with the gizmo of the editor, "Put a vehicle on a track..." opens the
  Trainset tool.
- The inspector of a scenery model with an .eu07m file offers "Edit this model (F7)"; the floating window
  is gone.
- Review: the model is written to its .tmp, closed and checked before it replaces the file, and a failed
  .tmp is removed; play_clip counts From only for a positive pace again, so a pace of 0 holds the clip
  and a negative one runs it backwards.

New icons at the end of editor_icons.png (the cells before them are unchanged), the strings in
lang/editor_pl.po, new self-test commands (modelmode, modeltool, modeladdlight, modelundo, modelredo,
modelremove, modelplace, modelimport) and unit tests of remove_node. No asset in the SVN is needed or
changed; the import writes an .eu07m file into the game data only when the user asks for it.
2026-11-29 22:17:14 +01:00
maj00r ecfb99db1a Merge branch 'feat/eu07m-gref' of https://github.com/MaSzyna-EU07/maszyna into feat/eu07m-model-inspector
# Conflicts:
#	model/AnimModel.h
2026-11-29 21:34:23 +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