CCG/The Basics of Content Creation
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) or ‘gmax’ using an Auran Jet Trainz plugin. 3dsmax requires a plugin to be separately installed, available for versions 4 and 5 from the Auran website: http://www.auran.com/TRS2004/downloads/contentcreation/TRS_Max4_Plugin_Bump.zip
Gmax is a program created by Discreet as a game-specific version of their ‘3D Studio Max’ program. Gmax is available for free download from: http://www.turbosquid.com/gmax.
In order to use gmax with Trainz you will also need to download the Trainz ‘Content Creation Pack’ from the Auran website: http://www.auran.com/trainz/creation/Trainz_Asset_Creation_Studio.zip
After installing and registering gmax, this pack installs into gmax and will enable you to export content directly into the .im file format that Trainz uses.
Note: Previous versions of Trainz used a ‘Progressive Mesh’ file ( .pm ). Due to the new mesh reduction in TRS (‘Level of Detail’ mesh reduction) only .im files are used, progressive mesh files are obsolete. These files will still function in TC, but for new models, the .im format should be used.
So what is 3dsmax or gmax? 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.
The free gmax program lacks a few features of 3dsmax, notably a rendering option that allows you to see a rendered picture of the mesh asset in the program, while being developed, and the ability to export specular lighting and bump mapped textures. These exports enhance the visual effects of a locomotive boiler for instance, but nevertherless, gmax is able to do most things that a creator wishes, for models in Trainz.
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, details are given in this document.
4. Create a ‘Config.txt’ file (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 TC
Previous versions of Trainz relied on a special directory (Downloads) where downloaded assets were stored. When Trainz initially started it added these files to a “cache”. Subsequently, starting Trainz loaded this cache, which shortened the loading time considerably. Each time a new asset was installed, the cache was recalculated. If the Download Station Helper were used, the cach was automatically recalculated after every asset install.
Previous versions of Trainz also used a separate Custom model directory, to hold your newly created model files. This directory was not included in the cache, and each time Trainz started, files in this directory needed to be added to the cache of downloaded and installed models. If you had many models placed in this Custom directory, Trainz could be very slow in loading.
TC does not use the installed Downloads directory nor the Custom directory for models (except for Displacement Kinds). All model assets are encrypted 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 CMP modules if you wish to upload to the Auran Download Station. Content Manager Plus has an integrated function to package your model for the Download Station and upload it.
Content Manager Plus is a very useful application in that it automatically performs error checking and simplifies the preparation of your content for upload. The Content Manager Plus 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 CMP. 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 Plus (CMP) module makes this a seamless task.
2. To disribute model assets to other users, outside of the Download Station option, make a cdp file from within CMP.
3. Assets may be archieved from within CMP. 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 CMP, the drag and drop feature makes this quite easy (drag the file directory into the main data window of CMP). Of course a valid config.txt file needs to be included for CMP 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.