CCG/Modelling: Steam Cab Interiors

From TrainzOnline
Jump to: navigation, search

Contents

Steam Cab Interiors

Overview

TRS steam cab interiors have been set-up in generally the same way as diesel and electric cabs with a few additional steam specific features.

Many of the levers and fireplates have several moving objects and required mouse controlled animations. This differed from the usual lever types with only one object, set to rotate around an attachment point.

Not only did the levers need reviewing, but the cab firebox itself had to produce fire and glow variations and the coal shoveller needed to be controlled and also linked to the coal requirements.

Download PB15 Interior source and in-games files here: Sorry, link broken...

Animated Levers

Animated levers are generally set up like all other animations in TRS/Trainz. Bones (or dummies) need to comply with the b.r.name naming convention.

As the new animated levers are mouse controlled, the need arose to be able to `grab' the lever handle only and not the rest of the animated parts. Because of this, animated levers require a collision mesh (kind: collision-proxy)

Take the animated fire plates for example:

fire_plates
{
  mesh             "fireplates/fireplates.im"
  anim             "fireplates/fireplates.kin"
  auto-create      1
  kind             "animated-lever"
  test-collisions  0
  notches          0, 1.0
  notchheight      1,1
  limits           0, 1.0
}
  
fire_plates-collision-box
{
  mesh             "fireplates/selection_box/selection_box.im"
  att-parent       "fire_plates"
  att              "a.selection_box"
  auto-create      1
  kind             "collision-proxy"
  opacity          0
  collision-parent "fire_plates"
}


The fire_plates are kind animated-lever. The mouse cannot select this mesh as it has the test-collisions 0 tag.

Note the fire_plates-collision-box has auto-create 1 but has an opacity 0. Also, the parent mesh it defaults to is the fire_plates. That is, you have to mouse over the fire_plates-collision-box in order to move the fire_plates.

The a.selection_box attachment is named a.r.handlearm/a.selection_box in 3DSMax as it is 'linked' to the animated bone called b.r.handlearm.


CCG Animated Lever1.jpg


Note: Moving attachment points for other models.

Attachments use the a.name convention and allow the attachment of a submesh to a specific point in a mesh. If the attachment point in the main mesh is to move with an animation of that mesh, the special naming convention above must be used for the point to follow the animation, and allow the submesh to then follow the point.

For example, a submesh is to be attached to a main mesh using the attachment name a.lever. This attachment point in the main mesh must be linked to a helper point called b.r.pivot, that is animated.

The attachment point in the 3DSMax/GMax model must be named a.r.pivot/a.lever. In the config.txt file the attachment point will be entered as a.lever. Note the helper point (dummy) in 3DSMax/GMax will be called b.r.pivot, not a.r.pivot!

The submesh will now follow any animation in the main mesh. It can be useful for moving coronas, and animated nightwindow meshes.


Steam Cab Fire and Coal Glow Effects

These effects are generated automatically by TRS when it finds firebox, fire, coal, and fireglow in the config.txt.

      firebox
      {
         mesh             "firebox.im"
         auto-create      1
         kind             "firebox"
         light            0
         test-collisions  0
      }
      fire
      {
         mesh             "fire.im"
         auto-create      1
         light            0
         test-collisions  0
      }
      coal
      {
         mesh             "coal.im"
         auto-create      1
         firebox          mesh
         light            0
         test-collisions  0
      }
      fireglow
      {
         mesh             "fireglow.im"
         auto-create      1
         light            0
         test-collisions  0
      }


Note the tag: light 0. This is because the mesh's lighting is dealt with differently through code to resemble the gradual glowing of the coal and fire heating up.

firebox

CCG Firebox1.jpg


firebox coal mesh

CCG Firebox Coal.jpg


fireglow mesh

CCG Firebox Glow.jpg

firebox mesh

CCG Firebox2.jpg


fire mesh

CCG Firebox Fire.jpg


flametest2.tga

CCG Fire1.jpg


coalfire.tga

CCG fireglow1.jpg


Firebox

This is simply a textured box. TRS controls lighting effects when the temperature rises

Fire

This is a few polygons with simple planar UVW mapping with a texture called flametest2.tga. The UVW mapping is altered automatically by TRS to play each frame of the fire animation.

Coal

This is simple mesh with simple planar UVW mapping with a texture called `coalfire.tga'. The UVW mapping is altered automatically by TRS as the temperature rises.

Fireglow

This is single polygon that acts as a visible glow around the firebox opening. Visibility is controlled by TRS.


Previous Page . . . Next Page

Return to CCG Index

Content Creator's Guide

Personal tools