Any experimentation in conjunction with the content of this domain should be conducted in an extra, dedicated installation of RR Tycoon 3, easily created by pasting an existing one into any available permanent or removable drive. Experiments will undoubtedly and frequently cause this extra installation to crash until you figure out what went wrong, so keep one working, untouched version always on disk.
To avoid additional obstacles, unexpected behaviours and miscelaneous trouble, never put RR Tycoon (or anything else for that matter) under the “C:\Program Files” or “C:\Program Files (x86)” folder and the like, no matter if prompted to.
Some elementary technical information
All 3-dimensional objects in RR Tycoon III are defined through a probably unique "3DP" format. In short, this format:
defines the coordinates of a 3D model's vertices
then it defines which of these vertices (in groups of 3) are connected by "faces" (triangular ones, needless to say). The set of all "faces" of every 3DP file constitutes the outer surface(s) of the respective 3-dimensional object.
finally, it defines the so called "UV-mapping", i.e. which part of the object's bitmap skin will cover each one of the "faces" so that the final, "painted" view of the object is produced.
First useful conclusions drawn from basic geometry principles
Curved stuff, such as cylindrical surfaces and spheres, have to be approximated in a rudimentary way, as series of polyhedral surfaces. So, unlike serious 3D modelling applications like professional C.A.D. (Computer-Aided-Design), a huge lot of individual vertice coordinate sets -and hence filesize- are necessary even for a mediocre representation quality (not to mention a decent one). This makes manual hex editing of such objects practically impossible.
The simplest possible 3DP object is understandably a sole triangle
The second simplest one will have 4 vertices allright, which may be configured in various ways:
if coplanar, they will define a Quadrilateral, either simple or self-intersecting, either convex or concave.
if not, they will define a pyramid (or some sides of it, if not all 4 possible triangular "faces" are explicitly specified in the file).
With 5 vertices we get a bi-pyramid
With 8 vertices we can have a cuboid (or some sides of it) and so on.
We shall be working a lot with the above, simple geometric shapes, since a combination of them can produce more complex geometries to form important additions to numerous 3D objects. Complicated 3DP files are a headache to work with by painstakingly hex-editing vertice coordinates and texturing parameters.
Where are -and should be- the 3DP files located?
When saying "stored in various ways" we mean that groups of 3DP model files can be either lie loose in the mentioned folders or packed together inside a specially compressed archive called a PK4 file. So, a look inside an untouched ..\Data\3D subfolder will reveal no 3DP files, only few huge PK4 archives.
TIP: Preferably unpack immediately with Game Extractor all existing 3DP files from the PK4 archives in ..\Data\3D to a dedicated repository outside ..\Data in order to fetch various objects easily to ..\Data\UserExtraContent for experimenting without the nuissance of running Game Extractor over and over again. Disk space isn't so expensive after all. You better paste the target directory location directly in Game Extractor's relevant field at the lower right of its dashboard.
RR Tycoon III reads the databases of all its assets immediately on startup. These assets can be stored in various ways inside the following subfolders of the DATA folder. During startup RR Tycoon III looks for 3DP models succesively in:
the ..\Data\3D subfolder
the ..\Data\PopTopExtraContent subfolder
the ..\Data\UserExtraContent subfolder
Due to this hierarchy, the ..\Data\PopTopExtraContent overrides the default 3D models sold together with the original program while ..\Data\UserExtraContent overrides everything else. This way, users can permanently or temporarily substitute/override selected default 3D models and bitmap skins with their preferred versions of the same name merely by placing the latter in one of the last 2 subfolders, no deletions required. The program will undig all 3DPs in these 3 subfolders, regardless whether packed inside a PK4 or loose.
In addition to the user-defined substitutions mentioned, these are also the folders where completely new additional 3D components of existing stuff or totally new objects should better be placed. It is good to leave the ..\Data\3D subfolder alone in order to avoid accidental damage to the basic Tycoon configuration, in case things are totally messed up in the other 2 directories.
Surplus/orphan 3D objects and bitmap skins -such as the model of a meanwhile eliminated building type- happenning to be left over inside relevant folders DO NOT cause RR Tycoon to crash (unlike other assets, such as surplus commodities in the ..\Data\CargoTypes subfolder or surplus BCA/BTY files). On the contrary, existing building types and categories lacking their allocated 3D model -or having its filename misspelt- WILL cause crashing.
Bitmap skins
are located by default inside PK4 archives in the ..\Data\2D subfolder. The default preferred format is DDS for filesize and computing speed reasons, but TGA can be used as well. For flexibility, the format and the name extension of a model's Bitmap texture is not fixed in its definition files, only the main part of the filename. Thus, a XYZ.TGA skin in the ..\Data\PopTopExtraContent will override smoothly a XYZ.DDS one from the PK4 archives in the ..\Data\2D subfolder once the user decides to place it there. JPG is mentioned too at places as a possible format, yet it sounds kind of useless since it doesnt support transparency.
Let's examine some bodies closely!
At this stage, it is appropriate to take a closer look at 3DP files, beginning with opening them in hex-editor NEO. The exact file structure is described here. You did follow the TIP above, right? So, go to the directory where you unpacked that 3DP lot and arrange the contents by size! Ignore all filenames at the bottom which comprise "light", "smoke", "LengthPoint"s, "TrackPoint"s and look at the files referring to "Bogie"s! These are the simplest ones, defining simple triangles and squares. Mind you that these "Bogies" are actually wheels, one of many misnomers exposing PopTop's lack of rail culture, but anyway let's get to the points (literally)! Let us open "ReddevilL_Drivewheel2.3dp" in the hex editor, to pay our respects to our friend David Wardale too, and see what evidence we can collect examining it! It will look like this once displayed columns are set to 12 (undock the browser tab to a new window to study it more comfortably). 12 is the total byte length of a point's X, Y and Z co-ordinates, so they stay vertically ordered, each point exactly under the previous one. It would be nice to have each point in 1 row too, but we can't have everything! Obviously these co-ordinates refer to the object's own intended axes, not the global map co-ordinate system. When we select a set of bytes guided by that 3DP file structure mapping the "Data inspector" tab to the left displays in human-friendly terms the information hidden in these uncomprehensible characters. E.g. selecting these 4 bytes which according to the 3DP guide represent a "floating" decimal number, we see a "float" value of 2.8192. Incidentally, we observe this is the X-value for all 4 points of this 3DP model, which reveals that the rectangle in question is a vertically upright one, quite expectable for a locomotive wheel (a rectangular wheel is not so expectable, but this is remedied through a circular Bitmap skin covering it). Furthermore, it reveals that the track axis coincides with the Y-axis of rolling stock (instead of the X, which would be more expectable) and constitutes a cause of errors when working with rolling stock, but we'll survive... Finally it implies a track gauge of 2.8192 x 2 = 5.6384 ! Yeah, right, if Wardale was to export his brainchild to Spain! Anyway, we get a first idea of the information we can draw by examining these files.
The best part, this "float" value shown in the "Data inspector" tab is directly editable! If you double-click that "2.8192", you can select and replace it with any value you want. No more tortuous "Little Endian" conversions!
Comments
Post a Comment