ETS/GTS filter guide thread. Updated 26 Feburary 2010

18 Wheels of Steel series forum

Moderator: Oleg

User avatar
Reinhard
Beginner
Posts: 289
Joined: Tue Sep 15, 2009 10:38 am
Location: Berlin, Germany

ETS/GTS filter guide thread. Updated 26 Feburary 2010

Post by Reinhard »

ETS/GTS *.pmg filter user guide thread.
This guide thread is for filter version 2.2.3 Build 162 or higher, it's supplied with ZModeler version 2.2.3 Build 970 and higher.
ZModeler version is written in a caption of main window. You can find filter version in a Options\Settings\Plugins\Manager window:
Image

Preparing to Import.
First of all, you need to unpack (using WinRar or WinZip) base.scs file located in ETS or GTS folder after installation. You have to unpack it into proper folder of your account documents folder (it could have different location depending on your account settings), but usually you can locate this folder by opening "My Documents" shortcut on your desktop. Notice, that "Euro Truck Simulator" (or "German Truck Simulator") folder is already available there - this is a target folder for unpacking "base.scs" file. From this moment on, when "game folder" is mentioned in this gude, according folder in your documents is ment, but NOT a folder where ETS or GTS was installed to.

ZModeler and PMG filter uses simplified environment reflections model, so you need to copy some textures to make it work correctly. Locate material/environment folder, create a copy of "generic_s.dds" file and rename it to "generic.dds":
Image
Then locate a vehicle/truck/share folder, create a copy of "_ref_r3.dds" and "freight_r.dds" files and rename them to "_ref.dds" and "freight.dds" files respectively:
Image
You might need to make such a copies of environment reflection textures for another reflection presets too, but currently it's enough.

Start ZModeler and pick File\Import. Locate vehicle\truck\share\volvo_fh16 folder and pick truck.pmg; configuration dialog box for PMG filter will appear in a bottom. You should click on a button next to "base.scs:" label and specify game folder location. Once again: it's a ETS or GTS folder with unpacked files in your documents folder, but NOT a folder where ETS or GTS was installed to. Note, you need to pick this folder on first import only:
Image
Then press "Import" button and you should get imported model. Note, it's important that you should not get any warnings or errors in a log window:
Image

Scene and settings.
Root node of your scene hierarchy matches the title of a file you have imported (or going to export). On an image above it's "truck". It does not contain distinguishing title that is important on export for proper path configuration. Right-click on "truck" object and pick "Properties...", Then select "User-defined options":
Image
Origin keyword specifies model origin. It's important on export and it's the folder that you will export to. If you wish to export scene as .pmg file, Origin should specify target folder of your mod.
VARIANT A, VARIANT B, VARIANT C (other variants could be too) are model appearence configuration. It could be, for example, A: base model, B: first visual upgrade and C: advanced tuner upgrade. Note, each variant has a name given (a, b, c on an image above), these variant names appear in definition files. For example, vehicle/truck/definition/volvo_fh16_a.sii refers to variant named "a":
Image
You should keep in mind that you will need to modify definition files if you like to change variant names or their quantity. It's strongly recomended to keep names and quantity of variants exactly the same as they were in original model file.
Expand hierarchy tree and notice, that certain dummy nodes have letters A, B, C or their combinations in bracets. As you guess, these letters specify "visibility" of according node (and it's children) for certain variant. You can see an object named base (ABC) - this object will be visible in any variant. Objects that follows are: a_parts, b_parts, c_parts, ab_share, bc_share. Even thought their names explain you relation of according objects to variant(s), variant visibility letter(s) are specified to explain this logic to the filter on export. I could be wrong here, but object names are not very significant.
Below an object head_l follows. It contains a model of headlights that will appear when user turn the lights on ingame. This object could be named in other facion, but definition file have to refer to according part name. For example, Renaul Magnum has specific light objects in variant "a", these objects are named in other facion, and definition file specifies them:
Image

Collision volumes are separate from the rest of geometry under a dummy nodes named "collision". These dummy nodes should specify whether they belong to certain group(s). For example, you can have different collision models "collision (A)", "collision (ABC)" and "collision (BC)" - the filter will combine them properly for each variant, just be sure to give a proper names. Under collision nodes you can place dummy nodes of shape Box or Cylinder; Box is preferable.

Materials.
ETS/GTS uses shader-based rendering, so you have to specify proper shader for each material. Shader is specified in material name in braces. For example, material /vehicle/truck/share/shadow (dif.decal.over) uses shader "dif.defal.over". Prior to shader you can specify primary texture (it could be just a texture title, or complete path to texture, starting from / .
When you specify path, starting from /, you force filter to export specified texture with specified path. When no path specified for texture, model Origin (see above) is used as a path, so textures are always exported with some path and you are respective whether game will locate texture in such a folder or not.
Shader names might be quite long (they are located in /effect/eut folder), and you are allowed to give them short names. Once you import a model, all shaders that were used become available for "short names" adaptation. You can change them in Options\Settings\Profile\Editor under a Preferences\Filters\18WosConvoy\Shaders folder. The value of each entry is a short name that you can use in Materials editor for simplicity:
Image
From this moment on, filter will create materials with short-names of shaders on import and you can use short-names of shaders in materials editor:
Image
Note, shader with .env keyword requires environment texture. You should use any of stock environment textures (e.g. "default.dds") with "Low-level Additive" (MultipyAdd) and "Auto-Sphere Environment" UV Mapping. Here's an example of texture layer configuration for environment reflections:
Image
When you use such a configuration for environment texture, a slider next to "Const Color" can control a level of environment reflections.

Paint variations ("Looks" or "Company paints").
Model you create could have several paint variations. It's very common case for a trailer model, that could use the only geometry model of container, but could use dozen of different paints/logos on a side of container. Below is an example of vehicle/trailer_eu/reefer model:
Image
You can add or edit paint (looks, companies) names in Used-defined options of according dummy node ("trailer"). Paints names are enumerated as PAINT 1, PAINT 2... and so on:
Image
Notice, this model have eight paint skins and three visual models (fridge_a, fridge_b and no_fridge). It's important, that you specify only paint/look name here, but you don't specify textures yet.
Paint textures are specified in User-defined option of material(s) that have different textures for certain paint schemes. Below is an example of paints definitions for material "plain (dif_spec):
Image
First of all, I have to mention, that you specify texture titles here, so any available texture could be used as a replaceable skin in material. On an image above texture matches paint/look name, specified in dummy node options, but this is not a must.
Second, you have to specify currently assigned texture as a first paint variation. On an image above, texture plain.dds is specified as PAINT 1 in user-defined options. This is important, since you might have several texture layers on your material, but you wish to change only specific texture/layer among paint variations.
Third, textures should be specified either without path (just a title of texture) or with fully-qualified path. You can have any combination in paint configurations: some could be local textures, others could be shared among trucks and be located in any folder you like. Note, that textures specified without path will get Origin path specified in dummy node of an export model (/vehicle/trailer_eu/reefer in example above), such textures should be placed in the same folder as an exported model. Textures with pre-defined paths (path should start with / ) must be placed in according folder.

Interior model.
Unfortunally, interior model contains some animations (like needls, parking brake, wipers, indicators and so on) which are not supported by ZModeler. However, the static model of interior could be imported and exported. Notice, once you import interior model, you will get error and warning message(s):
Image
Even thought the first entry is an error ("Can't open file for read: model.pmc."), it is not significant: interior model does not contain collision model (*.pmc file). The last entry is a warning, flaming Failed to detect path origin. Defaulting to "/vehicle/truck/model" - it is way more important and must be fixed. The filter has failed to recognize Origin path of an imported model, so you should pick Properties of model node and specify proper Origin there. For example, below is an interior model of Volvo and I've changed ""/vehicle/truck/model" to ""/vehicle/truck/volvo_fh16/interior":
Image

Exporting model.
You can export .pmg file only and filter will create collision file (.pmc), material definitions file (.pmd), material configuration files (.mat) and texture definition files (.tobj).
Collision and materials denition files (.pmc and .pmd) are binded to geometry model (.pmg) file and should not be used separately. For the same reason you should not mix exported and original files in any combinations. Material configuration files (.mat) are plain text files and can be edited by hand if required. These files are only created for materials that do not contain full path in material name. For example, filter will create material file color.dif_spec.mat file for material color (dif_spec) but it will not create any material file for material named /vehicle/truck/share/metal (chromic).
If your model have several PAINT defintions, according material files will also be generated.

Pick File\Export in main menu and pick "18 Wheels of Steel (*.pmg)" in file format drop-list. Configuration dialog box for PMG filter will appear. You can add some comment to a file, store small thumbnail image and (registered users only) can Lock the file. By locking the file you prevent it from Importing into ZModeler again, so never lock your PMG file if you don't have a backup copy of scene in .Z3D format. Locked files CAN NOT be Imported into ZModeler again.
You should specify filename to export. Important: Filter will export a branch with the same name as you specify here. For example, if you export to file truck.pmg filter will export scene node truck and all it's children. If you export to file test.pmg you need an object named test in scene, or nothing will be exported!

Press Export button to start export and create files.
Notice, that filer generates several files and if you keep exporting again and again, you might get a plenty of backup files in target folder. Backup files have .bak extension, they are not used and should be deleted.

Example Models Pack.
ETS Example models pack can be downloaded here:
http://www.zmodeler2.com/files/example/ ... amples.rar
This pack contains .z3d scenes with imported models that you can use as a reference materials for your mods.