Content Creation Tips and Tricks Rev1

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

Content Creation Tips and Tricks Rev1

Transcript

  • Trainz Railroad Simulator 2004

    Content Creation Tips and Tricks

    Version 1.01January 2005

    Copyright Auran Pty Ltd 2004

    The Content Creation Tips and Tricks is a document to accompany the Content Creation Guide. It expands on some of the coverage in that document and introduces creators to some of the requirements of exporting models to Trainz successfully. It also explains some of the useful procedures. Further updates may be available from time to time on our website. www.railroadsimulator.com

  • Version 1.01 3 Trainz Railroad Simulator 2004 - Content Creation Tips and TricksTrainz Railroad Simulator 2004 - 3

    CONTENT CREATIONTips and Tricks

    Introduction 5

    Art Files for Traincars 5

    Adding Cars to Roads in Saved Maps 7

    Textures and Opacity Effects 81. PLACEMENT IN 3DSMAX/GMAX 8

    2. OPACITY FADE OUT 8

    3. ALPHA CHANNEL USE 8

    4. EXAMPLE 8

    5. APPLYING OPACITY TO MODELS 8

    6. OPACITY SETTINGS IN 3DSMAX/GMAX 9

    7. OPACITY INTERFERENCE 9

    8. SPECIAL USE OF OPACITY - REFLECTION MATERIALS 9

    9. OPACITY ON ROADS, TRACK AND BRIDGES 10

    10. OPACITY TEXTURE BLEEDING 10

    11. TEXTURES FOR TILING 10

    3DSMax/gmax Interface with Trainz 111. 3DSMAX/GMAX INITIAL SETUP 11

    2. MERGING AND EXPORTING 11

    3. ANIMATION REQUIREMENTS 12

    4. ATTACHMENTS 13

    5. GENERAL MODELING NOTES 13

    6. CONFIG.TXT FILE 14

    7. PROBLEMS WITH MODEL EXPORTS 15

    8. ERROR LOG FILE: 16

    Trainz Railroad Simulator 2004

    CONTENTS

  • Version 1.01 4 Trainz Railroad Simulator 2004 - Content Creation Tips and Tricks

    Uploading Models and Forum Issues 161. PACKAGING ASSETS 16

    2. PLACING SCREENSHOTS ON THE FORUM 16

    Researching Data and Testing of a Steam Locomotive 17NARROW GAUGE GEARED LOCOMOTIVES 17

    TENDERS 18

    Content Creation Guide Amendments 18DITCH LIGHTS 18

    NAMING OF ASSETS 18

  • Version 1.01 5 Trainz Railroad Simulator 2004 - Content Creation Tips and Tricks

    Trainz Railroad Simulator 2004

    CONTENT CREATIONTips and Tricks

    IntroductionThis are many requirements, and information relating to the construction of Trainz content that do not easily t intothe Content Creation Guide, as a technical document.

    A number of difculties that creators face occur in theinterface between 3DSMax/gmax and Trainz:

    What has to be inserted in a mesh model, and how is this done, to make it export correctly to Trainz?

    Why does animation appear to work in gmax but not in Trainz?

    How do I go about creating?

    This section will expand on some of the earlier modeling issues covered in the Content Creation Guide, comment on the correct use of cong.txt les, show you someof the modeling options that are possible, and specify animation requirements to make successful models.

    Scripting can add extensive functionality to models, however this is a large subject on its own, and will not be covered here.

    Remember, the tips and tricks document is not intended to include full tutorials, and some basic knowledge of 3DSMax/gmax is required. There are many excellent third party tutorials available that will go into more modelling detail, using 3DSMax, gmax or pixel editing (painting) programs.

    You might also like to see what is available on the Auran Learning Centre, which has a selection of these tutorials: http://www.auran.com/TRS2004/learning_f.php

    We hope you nd this document useful.

    Art Files for TraincarsArt les are the picture les a creator prepares, to show images of the traincar (locomotive or rolling stock) in the Surveyor choice menu.

    The creator will take screenshots of the model in Trainz, for a perspective view and a side on view. The picture shows the nal images as used in the Surveyor menu, forthe AN GM Class locomotive.

    The side-on image is very small, next to the name in the menu. This gives you a quick preview of available models as you scroll the menu. The perspective view image is used in the larger picture window, when you select the model name in the menu.

  • Version 1.01 6 Trainz Railroad Simulator 2004 - Content Creation Tips and Tricks

    If you click on the image in this window, you will see a rotating view of the model. This is not taken from the Art les, but is extracted from the model mesh. Note how thetrack that was part of the Art le is not part of this rotatingimage.

    If you have made an Art le and you can only see therotating image when the menu is opened, the Art le hasnot been created successfully, and is not displaying.

    Art les are uncompressed tga les with an alpha layerthat makes the background transparent. The images have special names recognized by Trainz, for example:

    coal_hopper_art_512.texture 512x512 tga le

    coal_hopper_art_icon 128x64 tga le

    While you can change the rst part of the name to suit yourmodel, the art_512 and the art_icon part must be retained. It is useful to keep the name short, as it has to be typed a few times, and errors can occur.

    The Art tga les are placed in a subdirectory, the samename as the model with the _art added for example, coal_hopper_art.

    Two text le must be created in the directory:

    coal_hopper_art_512.texture.txt, and

    coal_hopper_art_icon.texture.txt

    Note that the le has the word texture as part of the nameand an extension of .txt.

    The art_512.texture le has the following lines:

    and the art_icon.texture le has the following lines:

    Primary The name of the tga le, which includes an alpha channel

    Tile=st Allows the texture to tile in the two axis directions, s,t, improving tiled texture joins. Removing either the s or t option can prevent texture bleeding from an edge to the opposite edge of the image, for instance, reduces the incidence of phantom lines appearing at the edge of transparent areas. To remove both tiling options use Tile=none.

    Hint=Dynamic Controls mipmapping problems (incorrect display of changing image sizes). As the texture.txt le is onesize, the Dynamic option optimizes the appearance and reduces memory usage. Hint=Dynamic should not be used on in-game texture les as it would degrade themodel appearance in Trainz.

    Alpha To identify the alpha channel which is part of the main tga le

    The principle in creating the les in a pixel editor (paintprogram):

    The screenshots are cropped or re sized to make the correct le size; the background is cut out, then made black; the model image is made white; this is the alpha layer, which is combined into the le when the le is saved.

    There are a number of paint programs that can make the alpha layer as part of the image:

    Photoshop, Paint Shop Pro, or TgaTools2

    Please refer to Help options for those programs, or locate third party tutorials for guidance.

    Possible problems in making the les:

    If the image in Trainz is white, the le may be the wrongsize, it may be compressed, or the names are incorrect. Make sure you check that the names in the texture.txt lesmatch the actual image les.

    If the icon image shows a black background in Trainz, the alpha channel has not been made correctly, or the names are incorrect in the texture.txt le.

    For the icon le, place the model picture a little above thecentre of the image frame, or the bottom parts of the lemay be cut off when displayed in Trainz. Primary=coal_hopper_art_icon.tga

    Tile=stHint=DynamicAlpha=coal_hopper_art_icon.tga

    Primary=coal_hopper_art_512.tgaTile=stHint=DynamicAlpha=coal_hopper_art_512.tga

  • Version 1.01 7 Trainz Railroad Simulator 2004 - Content Creation Tips and Tricks

    For example the 4x4 Police car, enter the KUID number in the cong.txt le, in the following format:

    car2

    and also in the kuid-table entry at the bottom, with the correct sequence number to match the existing table entries, for example:

    8

    If you wish to change the default rate of trafc that appearsin the map, add the line:

    carrate 20

    carrate Denes trafc density on roads (minimum secondsbetween each car generated). 0 = No trafc. Number must be greater than 3.

    Dont forget to save the le.

    See the following map cong.txt le for this example, thenew entries are shown in bold.

    kuid category-class YMcategory-region-0 TOcategory-era-0 2000skind mapusername atest1asset-lename atest1workingscale 0workingunits 0water description trainz-build 2.4world-origin { latitude 27,28,-1 longitude 153,2,1 altitude 0}string-table {}car0 car1 car2 carrate 20region Australiakuid-table { 1 2 3 4 5 6 7 8 }

    Adding Cars to Roads in Saved Maps

    Auran roads are able to generate cars, but you may want to have some of your car models included in the trafc,or add other Auran built-in vehicles that do not usually appear.

    A car model must be constructed facing down the screen - in the -Y direction, in top view of 3DSMax/gmax in order to face the correct direction.

    The model is exported as a scenery object in the usual way with a KUID, for example KUID2:171456:24:0.

    To place models in a saved map nd the map le so thecong.txt le can be edited.

    The saved map les are found in C:\Program Files\Auran\TRS2004\World\Custom\maps for a default installation of TRS2004.

    Save a copy of the cong.txt le somewhere in case youwish to replace the le if you make mistakes. Open thecong.txt le in a basic editor such as Notepad and add the following lines in the le:

    car0 car1

    Make sure the sequence starts at car0, car1, and dont miss or repeat any numbers. There must be a space between the word car0 and the bracket of the KUID number.

    Add the model KUIDs to the kuid-table as well, at the end of the table. Dont miss