CCG/The Basics of Content Creation

From TrainzOnline
< CCG
Jump to: navigation, search

Please note that this document is obsolete and describes techniques which are no longer relevant to current and future versions of Trainz.

Contents

CHAPTER 1: The Basics

The Basics of Content Creation

Creating new content for Trainz is generally a seven-step process.

1. Research

The research step involves finding out all the relevant information that you can about the item you wish to create. Research usually covers the accumulation of data about the content in question. The information needed may cover technical drawings of front, side and top, performance specifications (for loco engines), and photo’s for texture reference.

You will generally find that much of this information can be obtained by searching on the Internet. You should also be aware of, and comply with, any copyright issues on information obtained, including pictures, textures and information.

2. Create a Mesh (.im file)

An .im file is an Indexed Mesh. These files are created by exporting from ‘3D Studio Max’ (3dsmax) using an Trainz exporter plugin. HowTo/Export from Blender explains the export process from Blender.

Note: Early versions of Trainz supported a ‘Progressive Mesh’ file ( .pm ). In modern Trainz versions, only .im files are used, progressive mesh files are obsolete. These files will still function in Trainz, but for new models, the .im format should be used.

So what is 3dsmax or Blender? These are 3D modeling programs that enable you to make things such as locomotives, items of rolling stock or scenery and trackside accessories. They are quite complex programs, and you can expect a steep learning curve should you decide to dive in and learn asset creation. However, on the plus side, the benefits are well worth it, and if you take the time to learn it well, you will certainly be able to create some masterpieces.

3. Create textures

Creating textures for your assets is a very important part of the content creation process. Making good textures is one of the hardest things to do, but they can be the difference between a good-looking model and a great looking model.

Textures are created for Trainz using any 3rd party program that supports the creation of 2D art, like Adobe Photoshop or Paint Shop Pro.

There are a number of free programs that may be available, but they may lack the functionality of the commercial programs.

There are special requirements for texture types and sizes for models. Modeling Trains for Trainz gives general information for developing materials and textures.

4. Create a ‘Config.txt’ file.

Each and every item of content for Trainz has it’s own config.txt file. This file is a human-readable text file included with its corresponding item of content. Depending on what the item of content is will determine the necessary contents of the text file, but it will always contain a unique KUID, (a KUID is an identification serial code defined a little later in this document), a description and other information to make the model recognised by, and function in, Trainz.

Items of content created for Trainz are always assigned to a group of content called a KIND. A KIND is a type of content that has particular properties that Trainz recognizes. For example, one type of KIND is a TRACK. Trainz understands that items of content that belong to a group of this KIND define where locomotives and rolling stock travel, the “steel rails” for trains (of course some modern trains do not have “steel rails”, the Maglev for instance). Other KINDs are listed later in this document.

The config.txt file also includes a number of statements for content categories, time eras, Trainz Build, a list of items that the model may depend on (a KUID list of dependencies) and other instructions defining how the asset will behave in Trainz, or assist the Download Station to manage the content.

These instructions are called “tags” and a number of “tags” may be grouped functionally into “containers” within the config.txt file. Refer to examples later in this document.

Previous versions of Trainz required the config.txt file to be generated by a text editor such as Notepad, and saved as UTF-8 code, not ANSI. This encoding option is available from the save dialogue box. Programs such as MS Word that can introduce unwanted formatting, including non standard quotation marks, are not to be used.

While it is possible to generate a config.txt file in this manner for TC, the Content Creator Plus module will do this work for you when you enter the appropriate data.

This document gives details on how to create mesh and texture files, the config.txt file using the Content Creator Plus module, and how to incorporate them into the Trainz program.

5. Incorporate your asset into Trainz

All model assets are processed and incorporated in Trainz as a total asset database. This makes for very fast load times, but can restrict easy access to your files.

Briefly, when a new asset is created, Content Creator Plus (CCP) creates a directory for the new asset under the “editing” directory in your installed Trainz, and saves a config.txt file in Explorer. This newly created directory can then be located, and files may be placed or exported for the asset mesh and textures. Even if the model is only partly constructed, it can be viewed in Trainz, by “committing” the asset into the database. The directory is then removed automatically, and Trainz can be launched to see the model.

On exiting Trainz, CCP can re-open the directory for work to continue on the model and files if you wish. This process will be fully explained in the following pages.

6. Upload your new content to the Auran Download Station.

You should create all models for TC using the CCP and Content Manager modules if you wish to upload to the Auran Download Station. Content Manager has an integrated function to package your model for the Download Station and upload it.

Content Manager is a very useful application in that it automatically performs error checking and simplifies the preparation of your content for upload. The Content Manager module embeds information into the upload package that is required by the Auran Download Station.

Don’t include files such as .exe, .com or .bat in the model files. Because these files are a potential source of virus files they will not be packaged by CM. Only in-game and text files are packaged.

For information on how to upload files and the Download Station requirements refer to Chapter 9.

7. Backup your new content

Backing up newly created content is important, in case Trainz needs to be re-installed, or so that the content may be modified at a later date. Once content is committed into the database, the asset files are no longer available for copying or viewing, unless they are re-opened for editing. Re-opening files allows modifications to be made.

1. Assets on the Download Station may be installed by re-downloading again. The Content Manager (CM) module makes this a seamless task.

2. To distribute model assets to other users, outside of the Download Station option, make a cdp file from within CM.

3. Assets may be archieved from within CM. An archieve name and location may be specified, and more than one asset may be incorporated in the archieve. Trainz keeps track of any archieve created, making an archieve does not remove the assets from Trainz, it backs up the assets.

4. Of course the previous methods do not let you actually see the individual asset files nor allow them to be altered. To have access to the files, the asset is opened for editing in Explorer. An asset directory containing the files is created. This is found under the “editing” directory in the Trainz installation. If the asset has been given a username, the directory name will be that username. If a username has not been allocated, a temporary directory name using alphabetic and numeric characters will be created.

The created directory can then be copied to another location on the computer for backup or other purpose. While creating an asset, this procedure may be useful each time before committing the asset, to ensure that no files are lost should a computer or program failure occur. Remember that texture files and exported mesh files are not easily accessible once the asset is committed.

5. A temporary directory could be created outside of the Trainz installation and the texture files and mesh files placed there. This directory can then be imported into CM, the drag and drop feature makes this quite easy (drag the file directory into the main data window of CM). Of course a valid config.txt file needs to be included for CM to recognise the directory as a valid asset. Opening the asset in CCP, correcting any errors, or adding other tags and containers to finish the model, and then saving the config.txt file will then create a build 2.5 asset.

Personal tools