CCG/Modelling: Turntable (Transfer Table)

From TrainzOnline
< CCG
Revision as of 22:49, 15 June 2011 by Pev (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Turntable (Transfer Table)

A transfer table is a particular kind of turntable, instead of using the in-built options of specifying angles for the track stopping positions, it uses an animation file exported from 3DSMax or GMmax, with stopping points located by the key frames of the animation.

Generally the platform will move in a linear motion, but any type of motion is possible with this asset, specified by the animation file. Refer to the example Kinds in Chapter 6 and Chapter7 for full examples of turntable Kinds.


Model configuration

A typical model configuration consists of a base model (the static pit in the ground) and a transfer table or platform model. Additional night models and other attached meshes may be used. A sample directory configuration is shown below.

CCG transfer table dir.jpg

Track for the static approach tracks and the track on the moving platform are specified using the track container. In order to have the track on the platform (or any other attachment on the platform) move with the platform, a special notation in 3DSMax or GMax is required for the attachment points, as discussed on Page 363.

Typical Hierarchical Sub-tree in 3DSMax or GMax:

b.r.base
   b.r.platform
      platform
      a.r.platform/a.cabfront
      a.r.platform/a.itrack0a
      a.r.platform/a.itrack0b
      a.r.platform/a.warnlight0
   b.r.night
      night
   base
      a.otrack0a
      a.otrack0b
      a.otrack1a
      a.otrack1b       etc


CCG transfer table diag1.jpg

Refer to the diagrams.


In the example above, the moving platform has attached track, and interior requiring an a.cabfront attachment, and a flashing corona warning light.


Note: While interiors will function for turntables in Trainz, currently the CCP checking template file for Kinds rejects the use of interiors and shows errors. This may be corrected in future update releases.


The base of the transfer table, the pit, has attached track at regular intervals. A night mesh is also used for the base.


The b.r.base is the main fixed helper point located on the origin. The moving platform is linked to the b.r.platform helper that is also linked to the b.r.base.


Note in the diagram, for the platform in the start position as shown, the attachment point on the platform, a.r.platform/a.itrack0a is in the same position as the joining track on the base, a.otrack0a.


Any object using attachment points and linked to the moving b.r.platform uses the special notation in 3dsmax or gmax shown above, the cabfront, track attachment points and flashing coronas on the platform use the a.r.platform/ notation as part of the attachment point name, however only the attachment point name itself is used in the config/txt file.


For example, the track attachment point at one end of the moving platform is called: a.r.platform/a.itrack0a in 3dsmax or gmax. The name entered in the config.txt file is: a.itrack0a


If the platform had a night mesh attached, it also would need to be attached in this manner.


Naming conventions

The naming of the track attachment points is not important in TC. For circular turntables in TRS2004, the names used above were reserved names, recognised and interpreted by Trainz, to place the attached track correctly, for example, a track on the rotating turntable was a.itrack0a and a.itrack0b, the "i" denoting an inner track on the platform.


The attached track on the base was labeled as a.otrack0a and a.otrack0b, the "o" denoting an outer track, and the "a" and `b" denoting the extremities of the track attachment.


In Ttrainz, mesh tables are now used to list all the attached track, and this default notation is not now required. It has been used in this example for consistency.


Animation Key Frames

An animation file exported from 3dsmax or gmax will specify the key frames that coincide with the attached track along the transfer table, for example, the key frame entries in the config.txt file might be:

keyframes   0,160,320,480,640
looping     0
frame-rate  30

The key frame 0 would coincide with the a.otrack0a position on the diagram above, and key frame 160 would co-incide with the a.otrack1a position. Normally a transfer table is moved either through a script or by clicking a number of times on the red arrows showing above the table, click 5 times and it will move smoothly to the fifth stopping position, for example. If you wish to have the table hesitate at each intermediate stopping position on the way, enter additional key frames in 3dsmax or max, either side of the correct stopping point, for example at 158 and 162, either side of the frame 160 point, with the same co-ordinate locations as the 160 key frame. These additional frames are not listed in the key frame list in the config.txt file table.


Because the use of animation key frames is so versatile for a transfer table, for example a vertical mine shaft might be made, with the elevator car as the platform, the platform can vanish as it moves away from the base model.


This is caused by the platform moving outside the main bounding box of the base model. An additional tag, use-parent-bounds 1 should be used in the config.txt file, in the platform container, to correct this issue:

platform
  {
    mesh         "cage/cage.im"
    anim         "cage/anim.kin"
    use-parent-bounds 1
  }



Previous Page . . . . Next Page

Return to CCG Index

Content Creator's Guide

Personal tools