@@ -411,34 +411,84 @@ some steps of the content creation process or allow more control over content th
411
411
possible. The goal of these features is to save content creators' time, give additional power to
412
412
creators, and to simplify the installation process for end users.
413
413
414
- Advanced articulation control
415
- -----------------------------
416
-
417
- A wide variety of modern rolling stock uses articulation, in which multiple rail vehicles
418
- share a single "Jacobs Bogie". Open Rails offers partial support for such passenger and
419
- freight units by allowing one wagon to include a bogie in its 3D model while the next
420
- wagon removes the bogie from its 3D model. Ideally, OR will then add an invisible bogie
421
- to the end of the wagon without the bogie to emulate "sharing" the bogie with the previous
422
- wagon.
423
-
424
- However, this automatic system is limited. OR will check for wheels in the wagon's 3D
425
- model and will assume the wagon is articulated at one end if there are no wheels towards
426
- that end of the 3D model. This approach will only be used on 3D models with 3, 2, or 0 axles
427
- (the 1-axle case is excluded for compatibility reasons) and won't be used on locomotives.
428
- In some cases, this approach will result in false negative or false positive detection
429
- of articulation. Should the automatic articulation method not produce the expected track
430
- following behavior, it is now possible to manually define whether a wagon or engine
431
- should use the articulation behavior.
414
+ Automatic wagon size calculation
415
+ --------------------------------
416
+
417
+ Determining the appropriate values to enter in the ``Size ( w, h, l ) `` parameter of an engine or
418
+ wagon can be tedious, as reasonable settings for the simulated width, height, and length of rolling
419
+ stock depend on measurements of the 3D model used. Many content creators have entered largely
420
+ arbitrary values of width and height into the size parameter, only adjusting the length value to
421
+ give correct coupler alignement.
422
+
423
+ .. index ::
424
+ single: ORTSAutoSize
425
+
426
+ To simplify this process, and produce more reasonable dimensions for rolling stock, OR can now
427
+ automatically calculate the dimensions of rolling stock based on the shape file used. Enter
428
+ ``ORTSAutoSize `` in the Wagon section of an engine or wagon to allow OR to determine
429
+ the width, height, and length of the rolling stock based on the dimensions of the main shape file,
430
+ ignoring any values entered manually in the MSTS Size parameter.
431
+
432
+ ``ORTSAutoSize `` accepts 3 (optional) arguments, default units in meters, corresponding to offsets from the
433
+ shape's width, height, and length respectively. For example, ``ORTSAutoSize ( 0.1m, -0.2m, -0.18m ) ``
434
+ would tell OR to automatically determine the wagon's dimensions from the shape file, then subsequently
435
+ add 0.1 meters to the width, subtract 0.2 meters from the height, and subtract 0.18 meters from the length,
436
+ using the resulting values to set the simulated size of the wagon. In most cases, the width and height
437
+ arguments can be set to 0, and the length argument adjusted to produce the desired coupler spacing. If
438
+ no arguments are specified (ie: ``ORTSAutoSize () `` was entered in the Wagon section) then all three
439
+ offsets are assumed to be 0 meters.
440
+
441
+ Note that automatic sizing uses the nearest LOD of the main shape file and attached freight animations. LODs for further
442
+ distances have no effect on the automatic sizing. Freight animations using the ``ShapeHierarchy `` feature are also
443
+ skipped due to potential unintended behaviors. :ref: `Shape descriptor overrides <features-shape-manipulation >`
444
+ are also not considered at this phase, so if any changes are made in the .sd file, this feature may not provide
445
+ good results. This method also works best for rolling stock with standard buffers/couplers on each end.
446
+ Automatic sizing generally can't produce reasonable results for articulated rolling stock. And should something go
447
+ wrong with the shape file causing automatic sizing to fail, OR will revert to the values entered in the ``Size `` parameter.
448
+
449
+ Improved wagon alignment tools
450
+ ------------------------------
451
+
452
+ Many MSTS and OR creators have encountered rolling stock shapes that were not correctly aligned,
453
+ resulting in couplers/buffers clipping at one end of the wagon and separating at the other end.
454
+ Normally, this would require inspecting the 3D model to determine exactly how off-center it was
455
+ and carefully setting the Z value of ``CentreOfGravity ( x, y, z ) `` to "nudge" the wagon shape
456
+ until it is centered.
457
+
458
+ .. index ::
459
+ single: ORTSShapeNudge
460
+
461
+ In some cases, this approach could still be insufficient as the Z offset is limited to 2 meters in
462
+ order to prevent unusual behaviors with some MSTS models that used unreasonably large Z offsets.
463
+ To facilitate models that need large offsets without introducing errors, OR now accepts this offset
464
+ with the parameter ``ORTSShapeNudge ( z ) ``, which can be set to *any length offset without limit *.
465
+
466
+ .. index ::
467
+ single: CentreOfGravity
468
+
469
+ However, this does not entirely replace ``CentreOfGravity ``. The Y (height) value of the CoG is
470
+ still used by the physics system and should still be defined. In this case, simply use
471
+ ``CentreOfGravity ( y ) `` where y is the CoG height in meters (or other units, as desired).
472
+ Unlike entering all 3 values for the CoG, entering only the Y value will NOT affect the alignment
473
+ of the 3D model, allowing the "physical" CoG to be entered separately from the "visual" CoG.
432
474
433
475
.. index ::
434
- single: ORTSFrontArticulation
435
- single: ORTSRearArticulation
436
-
437
- To forcibly enable the articulation behavior at the front of the rail vehicle, use
438
- ``ORTSFrontArticulation ( 1 ) `` and at the rear use ``ORTSRearArticulation ( 1 ) ``.
439
- Conversely, use ``ORTSFrontArticulation ( 0 ) `` or ``ORTSRearArticulation ( 0 ) `` to
440
- force disable articulation behavior. Entering a value of -1 provides the default
441
- automatic behavior.
476
+ single: ORTSAutoCenter
477
+
478
+ And, for the sake of simplicity, it may be desired to just center the 3D model lengthwise
479
+ such that the couplers/buffers are equidistant from the centerpoint of the model. To make this
480
+ specific case easier, OR now includes the ``ORTSAutoCenter `` parameter. When ``ORTSAutoCenter ( 1 ) ``
481
+ is included in the Wagon section of an engine or wagon, OR will inspect the main shape file used by
482
+ the wagon to determine the exact Z value of CentreOfGravity required to re-center the shape in the
483
+ simulation. This will overwrite the manually entered Z component of ``CentreOfGravity ( x y z ) `` but
484
+ will not change the X or Y components. Should no re-centering be required, none will be applied.
485
+
486
+ Some rolling stock will not align correctly when auto-centered. As with ``ORTSAutoSize ``, this
487
+ feature should be employed on rolling stock with standard buffers or couplers, and will
488
+ not produce suitable results for articulated rolling stock or stock with different coupler
489
+ types at each end. Only the highest detail LOD of the main shape and freight animations are
490
+ used, the .sd file is not checked. If the process fails, a warning will be written to the
491
+ log and the automatic calculation will be skipped.
442
492
443
493
Freight animations and pickups
444
494
==============================
0 commit comments