Written by Laurent Rousseau aka Lo2k, April the 13th, 2015





 





INTRODUCTION

 

GP4 Builder is a 3D editing tool for Geoff Crammond’s Grand Prix 4™ game.

Created in 2003 as GP4 Viewer, it grew up as 3D Editor to finaly be reborn in late 2006 as GP4 Builder : A new powerful GP4 editor, able to fully craft whole new tracks from reality or your own imagination and to bring some help to tune cars and helmets.

 

3D tools need at least a manual and it's even better when some advices are given. This way they could be better understood and used at their full potential without loosing time here and there to finally discover that some 1-click feature exists. This guide has been designed to offer you both and I hope it will be of great help in your GP4 projects.

 

 

 

What's new in this guide ?

 

Here is the list of all major changes in this revision of the guide (since v1.991) :

 

- Before starting : Note about .cfp and .crd files

- File Menu : New option to Convert .gp4 to .crd

- Edit Menu : New Vertex Painting feature

- Display Menu : Per file display settings

- Tools Menu : New Track profiler display and data

- Tools Menu : Note about illumemmisive materials preview and vertex painting

- Tools Menu : Jip Mapping Editor details

- Tools Menu : Double click a label to copy current camera to main one

- Preferences : New long or short tab names option

- Preferences : Two modes are now available when textures are not drawn

- Preferences : Force top-down camera in orthographic mode option

- Interface : New Scene and Class Search filters

- Interface : New Change vertex color batch edit feature

- Interface : New Show Mirror Plane button

- Interface : New Snap toolbar

- Interface : New kayboard shortcuts for snapping and vertex painting

- CFP files : Details about real location of crowd flashes and sounds

- COL files : You can now delete faces

- DAT files : New Invert banking option for multiple sectors

- DAT files : 3 past actions to fix cc-cars were grouped into Fix cc-cars behaviour one

- GP4 files : Opening the .gp4 file also opens other files (not only the .dat)

- GP4 files : New button to copy/paste object center coordinates

- GP4 files : New sphere object

- Annex 1 - Commands : Range of values for Start width offset has been changed

 

 

 INDEX

 

GETTING STARTED

INSTALLATION

GUIDE CONVENTIONS

BEFORE STARTING

About texture display

 

1 INTERFACE

1.1 MENUS

File Menu

Edit Menu

Display Menu

Action Menu

Tools Menu

About Menu

1.2 LEFT PANEL

Graphics Tab

Physics Tab

Cameras Tab

Search Tab

1.3 TOP PANEL

1.4 OPENGL DISPLAY

Navigating through OpenGL Display

1.5 KEYBOARD SHORTCUTS

 

2 .BIN FILE FORMAT

2.1 HIERARCHY

2.2 EDITING FILE

Level 0 - Root

Level 1 - Sections

Level 2 - Faces

Level 2 - Vertices

 

3 .CFP FILE FORMAT

3.1 HIERARCHY

3.2 EDITING FILE

Level 0 - Root

Level 1 - Points

 

4 .COL FILE FORMAT

4.1 HIERARCHY

4.2 EDITING FILE

Level 0 - Root

Level 1 - Behaviour Areas

Level 2 - Faces

Level 3 - Vertices

 

5 .DAT FILE FORMAT

About magic data

5.1 HIERARCHY

5.2 EDITING TRACK/PIT SECTIONS

About physical track

Physical track limitations

Physical track Conversions

Level 0 - Root

Level 1 - Sectors

Level 2 - Commands

5.3 EDITING CC-LINE

Where things can go wrong

About testing cc-lines

CC-Lines and .ccl files

Level 0 - Root

Level 1 - CC-Lines

5.4 EDITING CAMERAS

Track cameras and .tcm files

Level 0 - Root

Level 1 - Cameras

6 .GP4 FILE FORMAT

About combined .gp4 and .dat display

How to display Textures in the 3D View

6.1 HIERARCHY

6.2 EDITING SCENES

Level 0 - Root

Level 1 - Scenes

Level 2 - Objects

Level 3 - Parts

Level 4 - Faces

Level 5 - Vertices

6.3 EDITING VISIBILITY SETS

Level 0 - Root

Level 1 - Visibility Sets

6.4 EDITING SUNLIGHT

Level 0 - Root

Level 1 - Sunlight

 

7 .GPB FILE FORMAT

.gp4 enhancements

.dat enhancements

 

ANNEX I – Commands Library

A1.1 COMMANDS

86 – Connect Pitlane Start

87 – Connect Pitlane End

88 – Left Pits Start

89 – Right Pits Start

96 – Speed Limiter On

97 – Speed Limiter Off

9B – Pit Lane Start

9E – Pit Lane End

9F – Pit Lane Fences Begin

A0 – Pit Lane Fences End

AD – Track Banking

B4 – Width of the Left Tarmac Side

B5 – Width of the Right Tarmac Side

BD – Sun Position

CA – Kerb Description

CC – Horizon adjustment

DE – Left Side Black Flag Area

DF – Right Side Black Flag Area

E8 – Jip Mapping

EF – Track Complementary Data

F0 – Sector's orientation

F1 – Pits End

F2 – Left Kerb Start

F3 – Right Kerb Start

F4 – Initial Bank Description

F5 – Bank Description

F6 – Sector's Position

F7 – Verge Description

 

ANNEX II – Building your track

A2.1 THE DAT FILE

Choosing a .dat file

Editing the .dat file

Last thing to do before an ingame test

A2.2 THE GP4 FILE

Getting the files

Raw Conversion

 

ANNEX III –Track troubleshooting

A3.1 TRACK DOESN'T LOAD

A3.2 TRACK LOADS

 

 

CREDITS

 

 

 

GETTING STARTED

 

INSTALLATION

GP4 Builder doesn’t need any installation : Once unzipped from the release .zip file, you can place it anywhere on any drive.

Only be sure to choose a folder you won’t displace or rename before some time to keep file associations if you decide to associate GP4 files with GP4 Builder.

 

This tool is fully tested for Windows Seven Home Premium 64bit. All other operating systems are not officially supported.

There's a known issue with Windows 98/Me causing " wglmakecurrentfailed" errors. If you encounter such error, you can try this Microsoft OpenGL update.

GP4 Builder handles either 96 and 120 dpi resolutions, matching most countries operating system default settings.

 

It has also only been tested with Nvidia graphical cards. I'm sorry for ATI users but I can't test myself their devices. If you encounter any graphical trouble with this tool, you can try to download a more up-to-date driver for your graphical card or check the GP4 forums for some advices (In the past, ATI cards were only working with some specific drivers versions).

 

GP4 Builder doesn’t handle and will most probably never handle Windows rights policies. It means that if you are not logged as administrator on your computer, some troubles could occur because Windows won’t let GP4 Builder access registry.

 

 

GUIDE CONVENTIONS

Starting from this section, this guide has been visually enhanced with a left thin line with section name and using a specific section color. This way you might be able to quickly browse it to the section you're looking for.

This guide describes window by window and checkbox by checkbox, every item of GP4 Builder graphical user interface. It will also offer, when possible and adequate, some advice on what could be done in practice with some particular feature. These advices will be illustrated by the logo below.

 

 In practice The text next to this logo will give some hints and tips from my personal experience with track editing.

 

You might also encounter the very specific "cc" term, as in cc-cars or cc-line, this abbreviation is for Computer Controlled. It points out cars driven by game AI or the best line AI cars are supposed to follow under clear traffic.

Also note that in this guide, "GP4" (in uppercase) will refer to Geoff Crammond’s Grand Prix 4™ game, and ".gp4" (in lowercase) will refer to the .gp4 file format.

 

 

BEFORE STARTING

GP4 uses proprietary file formats to describe all the aspects of the game.

They are stored in the GP4 directory under two forms : usual windows folders or packed folders : the .wad files. GP4 Builder doesn’t read .wad files, so you will need another specialized tool to unpack them, like EasyWad or WadUpdater. With these tools, you can open .wad files as your usual .zip files, extract some files and later re-insert new ones.

Here is a quick list of formats that you might have to deal with :

 

GP4 formats :

- .gp4 : stores a set of 3D objects meshes (car, tyre, track...)

- .dat : stores track physical properties and surfaces

- .col : stores 3D receipt surface for projected shadows and track behaviours (tarmac, gravel traps...)

- .bin : stores 3D receipt surface for tarmac mappings (bump, lines, specular...)

- .wad : stores several files in one

- .tex : stores one texture of the game

- .cfp : stores positions for crowd flashes/sounds (but is not used by the game).

- .crd : stores positions for crowd sound positions used ingame.

 

GP4 Builder specific formats :

- .gpb : stores enhanced version of the .gp4 file (and its associated .dat for tracks) along with some GP4 Builder settings like view cameras positions and sectors HD settings.

- .cam : stores GP4 Builder's cameras positions

- .ccl : stores individually saved cc-line description

- .tcm : stores individually saved track cameras position and settings

 

Other interesting formats :

- .tga : Targa file format, the favorite picture format used for textures

- .3ds : 3D Studio format, stores 3D meshes.

- .wrl : a standard 3D format that can be read as a text file

 

Note about texture display

As you maybe noticed from the list above, textures that will appear on every 3D objects are stored in .tex file format. But GP4 Builder can’t read .tex files. The solution is to convert all .tex files to their .tga counterpart and to place them in the same folder as the .gp4 mesh you want to edit.
TexResizer has been created to individually or batch convert .tex to .tga (or the reverse) and will be of great help here.

 

 

 In practice
.tga converted textures can be placed either in the same folder as the .gp4 file or in any subfolder from here (up to 2 levels). For example : the .gp4 is in "C:\mytrack\" and Gp4Builder will look for texture up to "C:\mytrack\tex\tex\" folder but not into "C:\mytrack\tex\tex\tex\" folder.

 

 

When backups could save your life

To end this chapter and as usual with any editing tool, never hesitate to backup files. GP4 Builder automatically saves latest version of each single file it opened and can keep saving files at period times, but we never know what could happen.

 

 

 In practice
You will save every important GP4 files if you backup the whole "Circuits" folder and every .wad files, all standing in the game directory. It will take some place (326MB) on your hard drive but you will be very glad to have done it if anything goes wrong or just to revert some files back to their original (and working) counterparts.

 

 

 

 1 - INTERFACE

 

GP4 Builder graphical user interface is composed of 5 parts :

1- menu bar, giving a direct access to all the functions of the tool

2- left panel, core of GP4 Builder as it lists the whole content of the opened files

3- toolbars and informations

4- 3D view

5- Floating windows that will let you edit all and every values of any file.

 

Here is a capture of a standard GP4Builder appearance and the 5 parts clearly spotted :

 

 

 

Interface has been designed to fit any screen resolution or windows size and left panel can be completely hidden on the left to leave more space to the 3D Display. If left panel is completely hidden, just click and drag from a point near the left side of the GP4 Builder windows to the center of the screen to show it again.

 

 

 

1.1 MENUS


File Menu

 

File Menu lets you access all files and system operations :

- Open File : Opens a file from any location.

Some files can be locked by their creators to prevent any leech. in that case, Gp4Builder will warn file is locked and all save features will be disabled.

A new lock could also appear through Zaz file encryption. In that case, Gp4Builder will warn you but will close (or do not load the file) because it can't be read by any program but Zaz's.

Note that GP3 .dat files can be loaded in GP4Builder. This is a very WIP feature so don't try to edit them. You can only preview them and any editing attempt will result in troubles.

- File Details (.bin, .col or .gp4 only) : Displays a window summing up file content. This feature has been designed for .gp4 files, thus it's the only file format having a complete detail list but there's also a small list for .bin files.

 

This window displays a text log basically separated in three parts:

 

- DAT FILE section gives global informations on the file like presence of Magic Data or GP4Infos in a .dat file

 

- GP4 FILE section gives all the details about the .gp4 file, starting from internal DirectX 3D Mesh format and data statistics.

 

 In practice
You won't have to deal with it but for information, .gp4 files could be of three DirectX formats, 4, 5 or 7. Also note that only .gp4 track files have a light.

 

 

- SCENES section gives individual informations for each scene of the file.

GP4 has some face/vertices limitation per scene. If amount of faces/vertices. has been reached, GP4Builder will display a red error line to warn you.

 

The following message will also appear when you will want to save or close the file, to be sure you do not miss the error that will most surely lead game to crashes.

 

- LOADINGS section gives times needed by GP4 Builder to open and display the file.

 

- Save : Saves current opened files under their current name and location. A backup of the original opened file is automatically created before saving modified file. This backup file has the same name as original file plus a .sav extension and is stored in the "backup" folder in the same folder as GP4 Builder. If GP4 Builder detects a problem, it will warn about it. If you have some objects to parts broken link, you can then fix them with the same named feature and if you have too much faces/vertices in your scenes, you will have to redistribute some objects from the crowded scene to other scenes.
- Save as… : Saves files under any name and location. As for Save, a backup is automatically made before saving a file. .gp4 files could be saved as .gpb files and the reverse is also true. If associated .dat file is present, it will be saved in the .gpb file too. .gpb file format stores an enhanced version of the .gp4 one and its features will grow in the future. Of course the game will only read .gp4 files so .gpb is a working format while .gp4 is the release one.

 

 

 In practice
As long as some changes are done in GP4Builder and file wasn't save, there will be an asterisk in the title bar to remind you havn't saved your changes so far. Using Save or Save as will remove it.

 

 

- Convert .dat... :

Convert to .3ds... (.dat files only) : Converts a .dat track and pitlane tarmac, lines, verges, banks, kerbs and rails to a .3ds file. (Note: there's actually a problem with kerbs conversion, I'm sorry about it, I hope to sort it as soon as possible).

Create .bin files... (.dat files only) : Creates .bin files from the current .dat file. You can choose to make the .bin mesh covering tarmac only or tarmac + side lines (as for original Monaco). Pitverge.bin file is created from verges and banks present between start and end pitlane fence sector flags.

Create .col file... (.dat files only) : Converts a .dat track to a .col file.

Once you chose to convert a .dat to .col file, the window shown aside will popup to let you choose behaviours for each track ribbon.

 

The top picture is a sum of the different ribbon names as they will be exported to the new .col file and below are all the combo boxes to set a behaviour for each ribbon.

 

Tarmac's and kerb's behaviour are general behaviours and they will apply to the wall track.

Others ribbon behaviours can be chosen for left and right sides individually. Note that behaviour will be applied to the whole ribbon and for both track and pitlane, so you have to choose wisely what will be the dominant behaviour of your track for each ribbon.

 

There's always four types of behaviour available :

- Hard : Hard surfaces are often set for rails and floor adverts, its a somewhat slippy surface.

- Tarmac : Common tarmac behaviour : cars will have the best grip on it.

- Grass : Shaky and slippy surface.

- Gravels : Shaky surface, cars are throwing gravels on it.

 

Once you're done, click on Save... button and you will be able to choose the name of the new .col file and where to save it on your hard drive.

 

 

- Convert .gp4... (.gp4 files only)

Create .col file : Converts all .gp4 objects with names starting by "track", "pitlane" and "pitverge" into a new .col file.

.col files are 3d meshes with surface behaviour additional flag. this behaviour can be set for the .gp4 faces in the parts window or for a batch of objects thanks to the specific Tool menu feature.

 

 In practice
If after converting your .gp4 file in .col file you don't have any pitcrew in game, be sure names of the garage floors are "pitvergeXX" (XX being a two digits number).

Create .crd file : Converts all .gp4 objects with names with CROWD class into a new .crd textfile. This per-track file is stored in gp4\samples\crowddata and provides position for track crowd sounds.

In this file, each line describes one sound "emitter" by an ID, a name, XZY position (Z is the altitude) and a factor.

 

 

- Create Debug List :

Save Current List : Saves current left panel list to a .txt file, allowing further study (.txt files can be imported in Excel for further computations). Depending on the tab in use, it will save whether Graphics list, Physics list or Search list.
Create .gp4 debug list : This menu option can be used to create a debug .txt file from currently opened .gp4 file.

 

Once you clicked this line, a small window pops-up to offer you control other items that will be logged in the .txt files.

Multi-selection is active in that window so you can choose all, none or some of the provided items.

 

Note that you can't log object details if you haven't selected object names too and that is the same for material details. Also note that PVS informations only exist in track files, so you shouldn't select it for any other file.

 

Once you clicked on Create List file, a new window will appear to let you choose file name and path where to save final .txt file.

 

Created .txt file uses tab character to separate items, so you can easily open the this file with Excel.

 

- Create .dat debug list : This function can create a debug .txt files from currently opened .dat file.

 

If you choose the complete option, the whole file will be saved in any selected folder.

 

If you choose a partial debug listing, the aside window will pop-up to let you choose amongst data that can currently been logged.

For now, only a few commands and arguments could be logged, mostly about track sector position (F6), track sector direction (F0) and global sector values (00).

 

Value in parenthesis gives the command and argument that will be logged for every sector. For instance (F0a4) means that GP4Builder will log argument a4 of command F0.

For convenience, some values can be logged in usual units (meters or degrees), instead of internal units, such values are prefixed with "real" mention.

 

Once you clicked on Create List file, a new window will appear to let you choose file name and path where to save final .txt files. Two files will be created under the name you chose, one for the track and one for the pitlane.

 

As for .gp4 debug logs, created .txt files are using tab character to separate items, so you can easily open them with excel.

 

- Import...

Import .3ds file (.gp4 files and at object level only) : Imports a .3ds file as a single new .gp4 file object in an existing .gp4 file. Note that all the objects found in the .3ds file are converted as parts of the new .gp4 object. Vertices and mapping coordinates are kept in the conversion but normals are smoothed part by part whatever smoothing groups. Texture names are also kept and added to the .gp4 texture list as long as the .3ds file use single texture materials. Multi-materials are not handled yet.

This grass object has been exported to .3ds, edited with a 3D program to add more details and imported back in GP4 Builder.

 

Import .gp4 scene... (.gp4 files and at object level only) : Imports and merges the whole first scene of a .gp4 file into currently selected scene.

Import CC-Line (.dat files only) : Imports a .ccl file to replace current cc-line with the one from the .ccl file. Note that if the name of the .ccl file do not match name of the opened .dat file, GP4 Builder will show a warning message.

Import Track Cameras (.dat files only) : Imports a .tcm file and writes its cameras settings from the .tcm files over current ones.

Import Track Database (.dat files only) : Imports a track database .txt file.

Database files created with Export Track Database menu can be imported back with this menu to apply new changes to track or pitlane sector position or direction. Please be aware not to mix period and comma decimal separators in the whole file or it could lead to some errors when attempting to load the file back in GP4Builder.


- Export...

Export to wrl... (.gp4 files only) : Exports to .wrl format under any name and location.

Export Object to .gp4... (.gp4 files and at scene or object level only) : At scene level, it exports all objects as individual .gp4 files in a selected folder. At object level, it exports currently selected object to a .gp4 file. A popup will show to ask if you want to be able to open this object in Zanoza™ Z-Modeler. If you choose so, all five Objects Properties will be resetted to 0 (Flag value and all 4 unknown values) otherwise you won't see any name in Zanoza™ Z-Modeler object list.

 

In practice

Be aware that objects in tracks are often far from origin (0,0,0) but Zanoza™ Z-Modeler is centered on the origin, so you will have to zoom out in Zanoza™ Z-Modeler views to see the object. If you won't need to replace object back exactly at the same position later, it's then better to displace the object in GP4 Builder close to origin before exporting it.

Export Object to .3ds... (.gp4 files and at scene or object level only) : At scene level, it exports all objects as .3ds files in a selected folder. At object level, it exports currently selected object as a .3ds file. Each part is saved as a .3ds object without hierarchy. Vertices and mapping coordinates are perfectly converted but without accurate smoothing groups. Texture names are saved and formatted to 8.3 DOS format if needed.

Export CC-Line (.dat files only) : Exports CC-Line from the current .dat file to a .ccl file.

Export Track Cameras (.dat files only) : Exports Track cameras settings from the current .dat file to a .tcm file.

Export Track Database (.dat files only) : Exports Track Database for the current track in 4 files. TPOS and PPOS file are storing respectively Pitlane and Track sector POSitions. PDIR and TDIR are storing Pitlane and Track sector DIRections. These files can be edited with an Excel-like program and later be imported via Import track Database menu.

 

 In practice

When creating the database in Excel, be sure not to write anything in other cells of the first page, else these additional things will be saved in the .txt file and could make troubles.

 

Export partial .dat : This menu option can be save only a portion of the .dat track or pitlane layout. You can enter beginning and end sectors manually or using the arrows buttons to directly pick the sector in the 3D view.

 

 

- Quit :Closes GP4 Builder.

 

 

Edit Menu

 

 

 

In practice

Most of .gp4 edit menu functions can be accessed via a right click in the left list or in the 3D viewport.

 

Edit menu affords following features :

- Undo last Moves : This feature is the same as the Undo last moves button. It can cancel all displacement, rotation and scaling operations done with .gp4 objects. Note that it can only undo the latest (only one) operation done with all other formats.

- Repeat vertex move (.gp4 and at vertex level only) : this feature will automatically move selected vertex the same way you moved latest selected vertex. Beware : XY and Z moves are separated, so if you want to repeat a 3 axis move, you will need to first do an XY move (left mouse button + drag), use the repeat feature for other vertices, then move the first vertex on Z axis (right mouse button + drag) and use the repeat again for each other vertices.

 

 

- Weld Coincident vertices (.gp4 parts and .col files only) :

This menu will weld every coincident vertices. to keep the vertices. number as low as possible. It is particularly useful to optimize .col files created with GP4Builder that still have duplicated vertices.

Beware : With .gp4 objects, this feature could lead to radical mapping changes and it can't be canceled so be sure to make a backup before using this feature if you're unsure of the result.

- Unweld Coincident vertices (.gp4 parts only) :

This menu will unweld every coincident vertices. to make each vertices. independent.

 

- Change Vertex Color : This feature brings direct edition to vertice diffuse color as seen in the vertice editing window.

This color is particulary useful as game uses it to tint texture.

Leave it white to get original texture appearance or use any color to tint the texture.

Note that diffuse color shown in the Vertex painting window is the color of the first vertex of the object/part/face.

Also note that all 16 custom colors available in the color picking window are saved so even if you close GP4Builder, they will still be avaible for your next session.

Please note : Any vertex painting will be ignored if the object part uses a material with a non black illumemmissive color.

 

Internal faces of this garage were too bright. Using a mid grey diffuse color for theses faces gave them a better and darker tint.

 

 

- Invert (.gp4 and .bin files only) :

X Coordinates : Mirrors object along X axis.

Y Coordinates : Mirrors object along Y axis.

Z Coordinates : Mirrors object along Z axis.

Faces Orientation : Inverts order of vertices that build faces. This has for consequence to flip normals. you can clearly see the effect in GP4 Builder if you activate wireframe mode with front or back faces on before applying the effect.

Exposed/Covered area : Inverts .bin face or section exposure to rain. Darker faces means track is exposed to rain, tarmac will be wet and rain will fall at this place. At the opposite, lighter faces means track is protected from rain and tarmac will stay dry. Check all details in the .bin vertices. section.

 

- Subdivide : (.gp4 and .col face and at face level only) :

This function subdivides a triangular face in 4 sub-faces.

First advert face has been subdivided.Once the second face will be subdivided, we could detach faces 2 by 2 and display four different half sized advertisements

 

- Move to... : (.gp4 files and at face level only) :

This all in one function affords opportunity to move items at current level or upper.

It can be used in several ways :

- to gather 2 items in 1 : 2 scenes, 2 parts or 2 faces.

- to move items at the same level : move an object into another scene, move a face to another part

- to move items to an upper level : change a part into an object

 

As only one texture can be applied to each object part, this function can be used to move faces to another part as below :

2 faces have been moved to a new part and a new texture has been chosen to get this new advert

You can use "Ins" keyboard shortcut to detach current face to a new part or Ctrl+Number to detach it to an existing part (this method only work for 0 to 9 parts, if you need to detach a face a 11th part, you will have to use the menu instead).

Note that detached face will acquire behaviour of the target part.

 

Move to can also be used to fix a scene with too much objects or faces (vertices. and face counts must be under 65535) by moving very detailed objects into others scenes. The face/vertices. count can be checked in the file details.

 

 

- Duplicate (.gp4 files and at object /parts/faces level only) :

Duplicates current object/Part/Face. New duplicated item is confound with original one, so you have to select his name (which has original object name plus a 2 digits number suffix) and to displace it before being able to clearly see it.

This wall has been duplicated and the copy has been displaced to get this additional advert wall

 

 

- Duplicate along track (.gp4+.dat files and at object level only) :

Duplicates current object and displaces and rotates copies to follow track layout.

 

- Object number : The number of new objects to create

- Copy every X sector : Object will be duplicated for each sector by default but you can set any number of sector between two copies.

 

 

In practice

This feature duplicates object to be at the same distance/angle to each sector but it does not take in account track width changes. Thus if track width change dramatically, an object that was out of rails could become on the track at next sectors.

 

 

 

- Group with Object (.gp4 files and at object level only) :

Using this menu shows the windows below to let you choose with which object grouping actually selected one. Only objects from one scene are displayed at a time and by default actual scene objects are listed but you can change it to any scene. You can also choose to display all or only one type of class objects. When you will click on group objects button, selected object will disappear and all its parts will be transfered to the object you selected.

 

 

- Align on Object (.gp4 files and at object level only) :

This command offers to align center of currently selected object with another object center.

Spokes object is aligned on outer rim. It now only needs to be displaced on X axis to get its correct place.

 

 

Here is how it works:

- Select the object you wish to align

- Choose Menu -> Align on Object

- Choose any Scene or Class filter to more quickly find the object to align on

- Select the object to align on

- Uncheck axis you don't want to align the object on

- Click the Align button to apply your choice and align first object on selected object.

 

 

In practice

You can use this function to quickly re-align objects displaced to export in Z-Modeler and re-imported back in GP4 Builder, as long as external shape of the object hasn't change.

 

 

Display Menu

 

 

Display menu affords options about 3D View display :

- Show/Hide Toolbars : Quickly show back toolbars in case all of them were hidden or quickly hide them all.

 

- Graphics (.gp4) : Check to enable Graphics .gp4 3d mesh display

- Physics (.dat) : Check to enable Physics .dat 3d mesh display

Note that F10 shortcut cycles through the 3 combinations of display.

- Tarmac (.bin) : Check to enable tarmac 3d mesh display. If present, all 3 .bin files will be displayed/hidden.

- Surfaces (.col) : Check to enable surface behaviours 3d mesh display

- Flashes (.cfp) : Check to enable (useless) flashes positions display

 

 

- Graphics options :

Plain : Displays .gp4 mesh textured faces.

Wireframe : when checked, faces with normals facing camera will become transparent while the other will keep filled.

Show selected object only (.gp4 files only): When checked, only selected object will be displayed.

Show selected scene only (.col and .gp4 files only): When checked, only objects from the selected scene will be displayed.

Show visibles objects only (.gp4+.dat files only): When checked, only objects visibles from the current sector will be displayed (based on object clipping distance).

Show normals (.gp4 files only) : Shows/Hides vertices normals, mirror plane and object axis. You can change normals color and size in Preferences window.

Show Light Rays (.gp4 files only) : Shows/Hides ray of lights coming from the sun. This could be of great help in order to build shadow surfaces. These rays are cast following Sun light direction as it is defined in the .gp4 sunlight window. Note that new cast shadows feature can also creates shadows in a single click.

Thanks to displayed rays of light, a flat shadow surface is quickly stretched to match a new stand.

 

- Physics options :

Plain : Displays .dat mesh plain faces.

Wireframe : Displays .dat faces edges.

Show cc-line : Shows/Hides cc-line display.

Show cc-cars direction : Shows/Hides cc-cars direction, track sector number for each sector and camera positions (displayed as a blue diamond). Direction is displayed as a white needle starting from sector's center and pointing toward car's direction.

Show HD sectors : Shows/Hides extrapolated HD track. Be sure to understand that internally, GP4 will still use the .dat low-def sectors for any computation (like collisions). HD Track display is only there to preview the .dat to .gp4 conversion

 

- Tarmac & Surfaces options : For these files, you can only choose between plain and/or wireframe modes.

 

- Orthographic View : Toggles view between perspective and orthographic vision. In orthographic view, all 3 world axis have the same unit and thus no perspective deformation occurs.

 

- View 1 Lap onboard (.dat files only) :

This function simulates a run around the track, seen from cockpit position. The speed of the virtual car can be changed from the Simulated Car Speed option. If a cc-line cover the full length of the track, onboard camera will follow this line instead of track center.

- View TV Lap (.dat files only) :

This function simulates a one lap race seen from track cameras. The s peed of the virtual car followed by cameras can be changed from the Simulated Car Speed option. If a cc-line cover the full length of the track, track cameras will follow an invisible car following this line instead of a line joining track sector centers.

 

Lap preview control window appears on the screen as soon as one of the two features above is selected and will give some powerful control on what you want to see.

- Speed Lock : By default, speed is unlocked and is dynamically computed but you can lock speed to any given value

- Speed  : Displace the cursor to change speed of the invisible car followed all around the track.

Due to the physical distance between two frames, whatever the method, you can experience stuttering during lap preview, especially at low speeds.

- Altitude (Onboard laps only)  : Displace the cursor to change altitude of the virtual onboard camera to change your point of view.

- Track Sector Position  : This cursor displays position of the car on the overall track length and the exact sector number shot by the camera. If Pause button is hit, you will have full power to change this position to browse or place the virtual car anywhere on the track.

- Pause/Resume button  : hold or resume lap preview. Once in pause mode, track sector position can be freely changed.

 

- Refresh All : Using this function will refresh the 3D view. Note that it doesn't revert file to any previous state, it only reloads textures.

 

 

Action Menu

 

 

Action Menu gather features that have a direct influence on files :

 

- Compute Normals (.col and .gp4 files only) : For .col files, this feature recomputes normal without any smoothing operation for all the faces of the file. For .gp4, this feature recomputes normals for a whole object or for a single part and normals are smoothed part by part.

- Unify Ground Normals (.gp4 files only) : This feature will unify normals for ground objects created with an external tools. If faces have been created one by one, some could face up and some face down, resulting in half displayed object in game and inverting normals will only invert the situation, hiding the past visible faces and showing past invisible faces. This function will unify normals to point toward up direction.

Land part above selected one clearly suffered from a few bad normals before unifying was done.

- Apply Ground world mapping (.gp4 files only) : This feature will change current mapping by a simple world mapping using a scale of 16 feet. As this is a world mapping, all objects mapping are tiled seamlessly.

- Apply Fence mapping (.gp4 files only) : This feature is adapted for ribbons of faces like fences or rails. It will change current mapping and try to make it like a ribbon of textures. This feature will work a lot better if all vertices of the part are welded first.

 

 

- Sort Car Objects (.gp4 files only) :

Designed for .gp4 files having only one scene (as car files), this function automatically sorts all car objects in alphabetical order (original GP4 order).

- Fix Green Objects (.gp4 files only) :

Objects imported from Zanoza Z-Modeler usually had wrong vertices colors, giving them a green tint in game. This option will reset all vertices colors to standard ones (pure white).

- Fix Parts to Object Links (.dat files only) : In past 3DEditor versions, some features were not taking in account an internal link between parts and objects. This feature will fix these links and prevent many troubles in game with tracks and cars. It can freely be used at anytime but it's better to use it at the very end of your modifications, just before saving your file.

- Recover lost parts (.gp4 files only) : This feature fixes rare troubles that could arise with parts. It mainly focus on recovering parts that are present in the .gp4 file but not linked to any object and thus not displayed nor editable with Gp4builder. It also deletes parts with 0 faces that could cause crashes ingame while being transparent in GP4builder.

 In practice If you can't open one particular scene, there's maybe a part with 0 face and 0 vertex. Using Recover lost parts could then fix the troublesome part and allow access to the scene.

After recovering parts, It's better to save file and reopen it to be sure all scene internal data will be recomputed correctly.

 

- Convert lods in objects (.gp4 files only) : Imola track modders noted this track has many objects 2 or 3 times. That's because developers tried to set manual lods to check if it could save some processor occupancy. Either it was effective or not, lods are often causing crashes if you deleted some of them and did not fix all the other lods object settings. This option will simply convert all lods in independent objects, fixing once for all this issue. It's anyhow up to you to remove low quality object lods that could lead to flickering objects now that all lods are displayed simultaneously.

 

 

- Equalize Sector Centers (.dat files only) : Track sides width could differ a lot for some tracks. This options will recompute track and pitlane center positions to be at the exact middle of the track (left width= right width). Note that the track visual appearance will not change.

- Fix cc-cars behaviour (.dat files only) : This feature fixes cc-cars pitch and direction values all along the track. This feature can be used each time you changed track profile in order to fix cc-cars inclination on new slopes and direction all along the track. This function can particularly get rid of the "nose-up" or "nose-down" car effect.

 

In practice

Because cc-line computation algorithm use cc-cars direction and pitch, be sure to use this feature before working on the cc-line.

 

- Get .dat layout from .gp4 (.gp4+.dat files only) :

This feature converts a 3D ribbon into .dat track coordinates.

The source .gp4 object must respect the following strict conditions :

- its name must be "trackbase" (but any class).

- all faces must share 2 vertices

- Each sector must be made of 2 faces (and only two).

- All vertices must be welded BUT the 2 vertices between last and first sector.

To sum it up, object must have a topology very close to the fences created by fence builder (Check picture on the right).

 

In these very restricted conditions, current .dat sector track settings will be replaced by those from the trackbase mesh.

 

 

- Reverse Track (.dat files only) : A wip feature that will reverse every sector. Actualy, track reversed this way are not playable and will most probably crash in game but you can use this feature as a first step if you want to really create a reversed track.

 

 

Tools Menu

 

 

Tools menu gathers several utilities to edit GP4 files :

 

- Track Flags List (.dat file only) :

Track flag list displays all necessary commands to set a working track. Rather than commands, we will speak about flags as these commands have most often no arguments and are only there to plot the beginning and the end of a range of sectors.

 

 

This window lists most of the track errors that could lead to ingame crashes like :

- missing necessary commands. In the case of F1 command, if it is misplaced or not. F1 pits end command should effectively always be 33 sectors away of 87-88(left or right pit start).

- commands having an incorrect type setting, like AD, B4, B5 commands or side setting as for CA commands.

- DE and DF (black flags) commands that would point to sectors that are no more existing.

- DE and DF (black flags) commands that would have the same start or finish sectors.

- double commands in each sectors

- initial (type 0) commands badly placed

- CA commands that must never be set in track sector 0

- Incorrect kerbs commands (F2,F3 and CA) : missing CA commands, CA commands without F2/F3 command, CA command with incorrect side setting and kerbs that would spread above non existing sectors. Sector kerbs flag values are also checked to be sure values are meaning something for the game.

- missing F5 pitlane commands as these commands are necessary to avoid car behaviour troubles in pitlane.

- place of 9F and A0 pitlane sectors that imperatively need to be respectively before 96 command and after 97 one.

- incorrect position of 86 and 87 (connect pitlane start/end) commands. 86 command must be set in the sector where pitlane first sector is present and 87 in the sector where the final edge of the pitlane is present.

- incorrect position of 9B command. 9B command must be after AE and before 9F commands

- incorrect position of 9F command. 9F command must never be in the 2 last sectors

- incorrect GP4info split sector (sector doesn't exist)

- incorrect Camera sector or last viewing sector (sector doesn't exist)

- any missing sector at the end of the track (last sector must be at less than 16 feet from initial sector)

- sectors with position out of the world bounds

- sectors with length different than 16 feet

- incorrect pitlane sector 0 position

- sectors with concave fence edges

 

You can quickly go to each listed command with a double-click on its line.

 

Here are the status meaning :

- "OK" : this command won't provoke any trouble.

- "USELESS" : this command might not exist but should not cause much troubles in game. You might delete this command.

- "MISSING" : this command must exist and without it, track could crash in game. Simply create needed flag and problem will be fixed.

- "MISPLACED" : this command must be in another sector than its actual. Delete this flag from current sector and recreate it in the adviced one to fix the trouble.

- "ERROR" : This command uses an incorrect setting or cause a problem by its presence in this sector. Check the flag column note to know what's wrong with this command and fix it correctly.

 

Note that you can filter lines by enabling or disabling top most buttons to show or hide all errors, pitlane flags, jip mappings and sector lengths.

 

 

- Track Visibility List (.gp4 and .dat file only) :

Track visibility list is an optimization related file. It gives some insight of CPU/GPU requirement for each and every track sector (no pitlane sector yet) in terms of geometry computation.

You can also choose to show visibles objects only from Display menu to preview which object will effectively be visible in game for any sector.

 

 

- infinite range objects : This is the count of all the objects that are ALWAYS displayed, wherever the car was on the track. It simply lists all objects with Clipping Distance set to 0 (infinity). Only a few objects would really require this setting logically.

 

- Visibility from : Switch lists mode by sector or by objects. With sector mode, both left and right lists are used while object mode only needs right list.

 

- Left list (Sector mode only) : Displays the number of Objects visibles (and the total amount of faces of all these objects) for each track sectors. Basically, any object with a clipping distance inferior to the distance between object and the sector is listed as visible.

To highlight sectors with more objects (and thus more CPU/GPU needs), a color code is used from green from the less populated sector to red for the most populated one. As this color is generated between the two extremes, a red color doesn't mean you need to reduce the number of objects visible, it just means this sector has more objects in sight than others (in a very simplified example : if all your sectors only see 5 objects and one sees 7 of them it will be red but anyhow, 7 objects won't harm your PO).

 

- Right list : In sector mode, it lists all the object in sight of the selected sector from the left list, sorted by distance. You can double-click any object line to select it in the 3d view and check if this object is really visible from this sector. The faces count also provides information on the amount of faces in this object.

In object mode, left panel is grayed and ALL the track objects are listed in this list, still sorted by distance. This is another way to see what clipping distance were set to objects. (Don't forget that a clipping distance of 0 means the object will be visible from any sector).

 

 

- TrackProfiler (.dat file only) :

The Track Profiler is a small tool where you can finely tune altitude for each track sector.

Once you clicked on the menu, the window below will pop-up:

 

 

Track profiler have a left panel with settings and a display area.

Note that you can increase or maximize Track profiler's window size for more details.

 

Display and Value offers to choose between Track or Pitlane and which value (altitude or banking angle) you want to preview.

Sectors Displayed lets you precisely input horizontal bounds of the drawing, setting first and last sector. You can also set vertical bounds by checking Custom Ordinates Values and entering Low and High values.

Influency Area lets specify a range of sectors that will be influenced by the altitude change apply to one sector. You can also choose which Interpolation method you want to apply to intermediate sectors, Linear, Cosine or Shift. Flatten button will linearly compute heights in the selected area. The influency area is displayed in red in the 2D view.

Randomness applies random height changes for the actual selected area.

Realtime 3d Preview immediately applies any sector change to the 3D view but then Track profiler refresh rate will be very slow.

Drop Delta Highlight is the amount of change above which colors are used to higlight a change of slope (either positive or negative).

Here are color schemes :

- Center values : yellow for increasing slope and green for decreasing slope

- Banking : yellow for increasing slope and blue for decreasing slope

 

Undo Last modifications cancel any modification separately for track, pitlane, center and banking values.

 

Slope Details : Gives numeric informations about slope and drop :

Slope : altitude difference between next sector and current one divided by 16 feet distance in percent.

Drop : altitude difference between next sector and current one

Delta drop : difference of drop between next sector and current and current sector and past one.

 

 

Once you're ok with the portion of track displayed, you can freely select any sector, either directly in the view or by clicking its number at the bottom of the graphic (note that this sector will also be highlighted in the 3D view).

Once selected, you can then grasp sector by it's red square handle and while clicking on the left mouse button, dragging your mouse up and down to the needed position.

You can also browse the track by left-clicking and dragging anywhere in the graphic view itself. This way you can quickly see sectors ahead or before the current range.

The mouse wheel can also be used to zoom in/out view.

 

If you chose to display the track and that you draw more sectors than the track amount, track profile will be repeated.

If you chose to display the pitlane, all sectors after the last one will have the same value as the last one. So you can visually think there are more pitlane sectors but they do not exist, they are only here to fill the drawing.

 

A last note : track profiler displays each sector as if they were equally spaced (what is advisable), but as your track sectors intervals could be not equal, a slight difference in profile could occur between track profiler and the real track.

 

- Track Length (.dat file only) :

Gives approximated lengths of the left edge, right edge and middle of the track. These values aren't exact because they are taken every 4 foot on the middle of the track (and every quarter of the left or right edge). These value might be quite different from past GP4 Builder versions because old versions were using values every 16 foot only.

 

 

 

 

- Redefine Behaviours (.gp4 files only) :

This little windows offer two choices to set behaviours to .gp4 faces in preparation for a .col conversion. The first one automatically set behaviours depending on name conventions and the second is more manual and will only change behaviours of a given list of objects.

 

 

In practice

To clearly see .gp4 faces behaviours, you can use the untextured view mode (F2 key shortcut). In this mode, faces will receive usual .col colors (light gray for hard surfaces, dark gray for tarmac, yellow for gravels and green for grass)

 

Auto set behaviours from object names is the automatic setting. It's the best way to quickly set default behaviours for a whole track.

 

In practice

I added a new name convention to help converting gravel traps objects. In order gravel behaviour was automatically attributed to some objects, you can simply name them TRACK_gravels* or PITLANE_gravels* (*=anything). For example, object named "track_gravels35" will get the gravels behaviour but not "gravels35" object.

 

Set behaviour for search list objects will apply selected behaviour to the current search list object parts. This way you can select a list of parts per material, per texture or per name and apply the same behaviour to all these parts. It's quick and effective to redefine behaviours for several object parts.

And if you really want to fine tune one or several face, you can either change their behaviour directly at parts level for the .gp4 file or at face level by opening the converted .col file.

 

Note: Never forget that only track, pitverge and pitlane objects will be converted to the .col file. So no need to set behaviours to cranes or crowds.

 

 

- Edit Materials (.gp4 files only) :

 

 

This windows embrace the whole material list and the settings of the currently selected material.

 

- Material List : Lets you select any existing material to edit its properties. Some of them are marked in the list as T (Transparency), 2 (2 sided) and I (Self-Illumination).
- Add : Adds a new material.
- Delete : Deletes selected material.

- Remove Duplicates: Automaticaly compares all materials, deletes duplicates and reassign the remaining unique material to objects.

 

- Name : Material Name
- Diffuse & Specular colors : Colors properties but It’s still unknown if these parameters are used in game.

- Transparency : I still haven’t checked if that parameter is used by GP4.
- Two-sided : If checked, faces will be textured on both sides (but texture will be reversed on back side). With very basic objects like 2-faces flat adverts, if two-sided is not checked, you will only see the advert front to him, if you go and see its back, it will be invisible.

- Self-Illumination : if checked, part won’t receive dynamic computed lightning.

 

- Ambient / Emissive colors : Usage unknown yet.
- Illumemmissive: Gives a constant tone to an object (a bit like diffuse). If a material has any color different than black, GP4Builder will display them fully lit and override any vertex color set for this object. So far, it seems game only react to pure green colors this way.

- Power : Usage unknown
- UV Clamps : 8 DirectX clamp levels, I can’t tell you more about this but they are always set to 0.

 

 

- Edit jip Map

 

 

Jip Files

Jip file : Select the jip file you want to edit

Add : Add a new jip file and add it to the list of jip files used by the .dat

Del : Delete current jip file from the list

 

Jip data

Jip ID: Select a jip mapping or directly pick it with mouse from the displayed preview

+ and - buttons allow to add or remove jip mappings

 

Remove Individual Palettes : if some of the jip mappings are using local palettes, all the color ID will be redirected to use the global palette.

 

Save .jip file : As jip files are handled separatly from the files opened in GP4 Builder, you will have to use this button to save any change made in GP4 Buidler in the .jip file.


 

- Rename Textures (.gp4 files only) : Displays the list of all texture names defined in the file and let you rename them.

 

Note that renaming a texture name with this tool does not rename actual texture (.tex) file, it just changes name of the textures called by the .gp4 file.

 

 

 

 

- Missing Textures List : Displays the list of all the textures that are asked by the .gp4 objects and that aren't present as .tga files in the same folder as the .gp4 file. If equivalent textures (.tex files) are missing in the track wad, GP4 will display in white every object part using that texture.

 

 

 

- Useless Texture Files : Displays the list of the texture files that are not needed by .gp4 file. Note that this feature has been designed for tracks. It might not give correct results for any other file.

You can choose between useless files or names.

If you choose Names, list will show texture names present in the .gp4 texture list but that are used by no object.

If you choose Files, list will show .tga files present in the same folder as the .gp4 file but that are not in the .gp4 texture list.

 

Remove Useless textures will remove either all useless names entries or all useless physical .tga files.

 

In practice

As Useless Textures FIles list is based on the .gp4 texture name list, it's better to remove useless textures names first and then show files to remove them all. also note that GRIDLEFT.tga and GRIDLINE.tga files (used by GP4 Builder to preview jip mapping) are not in the .gp4 texture name list and will be deleted with other files.

 

In practice

When a track is opened, GP4 Builder automatically checks for duplicate texture names. If duplicate names are found, all the objects using these textures will be redirected to use one of the duplicates and the other useless texture names will be renamed with "bis" prefix and a final number.

 

 

 

Viewport Camera :

You can define up to 9 camera positions and orientations to help you in your GP4 Builder's work.

By default, the main camera is selected because GP4 Builder uses main camera for every operation. But you can choose any other camera to pan or explore the scenes.

The Copy actual camera settings to camera pop-down box copies current camera position and orientation to any of the other camera for future use. Using "All" setting applies current camera settings to all other cameras.

You can also double click a camera label to copy values from this camera to main camera.

 

To choose the camera to edit, just left-click once in one of its boxes, either its number of any value box. Note that if you select one of the number label, you can switch to next camera with tab or to prev camera with shift-tab. You can also cycle through all cameras with F11 keyboard shortcut. All next moves will modify this camera.

 

To move a selected camera, you have 3 possibilities:
- Input camera position directly with keyboard.
- Click+slide mouse left/right will decrease/increase current value. An exception exists with Dir boxes because in that case click+sliding mouse will change both Dir (direction) and pitch values with respective horizontal and vertical mouse moves. Then click in one box to apply changes.
- Navigate in the OpenGL view directly.

When you are happy with some cameras and might need to reuse them a next time (GP4 Builder doesn't keep cameras position from one session to the other) or with another file, you can save them in a .cam file (not compliant with TeamEditor), using the Save .cam file button.

When you will need to load this camera set again, simply use the Load .cam file button.

 

Note that .gpb file format stores every GP4 Builder camera settings.

 

- Capture 3D View :

3D View + GUI : Captures a screenshot of the whole GP4 Builder view in a jpeg file.

3D View only : Captures a screenshot of GP4 Builder's 3D view only in a jpeg file. Note that this feature doesn't work with Windows 7 (probably due to the rebuilt OpenGL pipeline in this OS).

 

 

- Quick Notes: This is a simple post-it window. You can write down anything in it and it will be kept during the whole GP4Builder session. Its content is reset when you quit GP4Builder.

 

- Preferences : This window lets you customize GP4 Builder to your needs :

Interface Tab

 

Mouse Input

- Swap Mouse Buttons : Reverse left and right mouse buttons effects. For normal mouse button actions, just see here.

- Rotate/Zoom Mode : Alternative mouse handling mode (checked by default with car .gp4 files). With this mode on, camera is now focused on a target point, as described here. This setting is saved separately for tracks and non-tracks files.

- Move+Rotate Mode : Changes the behaviour of mouse button once Displace mode has been activated. Instead of moving an object on Z axis, right button will rotate it around the Z axis.

 

Navigation Lists

- Use colored backgrounds with .gp4 files: This options slighty tint list background with a different color for each level. If remebered, it could help to always now what list is displayed and at which level we are editing.

- Display Texture Thumbnails for Parts: Either show or hide texture thumbnails for part lists. Hiding them could make browsing faster in some cases.

- Tabs Labels : You can choose to display either long (track usage) or short names (file extension) of tabs. For example, if a bin file is open, using short names will display "BIN" and full will display "Tarmac".

 

Textures

- Edition Program

This field let you choose your texture edition program on your computer. this program will then be used when you will double click the texture preview in .gp4 parts window.

- Developer Folder

By default or if this field is empty, GP4Builder will look for textures inside the same folder as the .gp4 file it opened. But changing this field, you can force GP4Builder to look for textures in any other folder from your hard drive. Note that GP4Builder will always look into 2 levels of subfolders from this "root" path.

 

Misc.

- Automatically open last file at opening : If checked and at launch, GP4 Builder will attempt to open the last file opened. If this file can't be found, it will offer to choose which file you want to work on.

- Open last file with the same point of view : if checked and if file opened is the same as the last file you opened, then main viewport camera will reload settings from your past session

- Auto save files every X minutes : Sets amount of time between each automatic backup of opened files. Backups are saved in the "backups" folder placed in the same folder as GP4 Builder.

 

Associate GP4 files with GP4 Builder

Associates all supported files (*.bin, *.ccl, *.cfp, *.col, *.dat, *.gp4, *.gpb and *.tcm) with GP4 Builder and delete past GP4 Builder's older versions that could appear in "Open with" context menu.

Beware : past file format associations can't be restored by GP4 Builder. If you finally want to associate some files with another application, you will have to use Windows’ file association menu.

You can see below icons that will be associated to files :

 



Display Tab

 

Render Options

- Disable Shading : When checked, faces are no more lit depending on their orientation against light position, they all receive same amount of light.
- Texture Mapping : When checked (by default), textures found by GP4 Builder will be applied to all meshes respecting vertices UV coordinates. You can also use F2 key shortcut to quickly switch Texture Mapping on/off. If a .gp4 file is open and that texturing is switched off, GP4Builder displays the .gp4 meshes with behaviour colors (light gray for hard surfaces, dark gray for tarmac, green for grass and yellow for gravel ones).
- Alpha Blending : When checked (by default with track .gp4 files), textures' alpha channel is used to recreate semi-transparent textures. GP4 Builder only handle 1 bit transparency so you can't have real transparent textures.
As for cars and tyres .gp4 files, alpha layer textures are used for reflection amount, alpha blending might be disabled (by default for non tracks .gp4 files). You can also use F1 key shortcut to quickly switch Alpha blending on/off.

- Bilinear Filtering : Enables/Disables texture bilinear filtering. This settings is saved separately for tracks and non-tracks .gp4 files. It is on by default with tracks and off with non-tracks.

- Wireframe Mode : You can choose between 3 wireframe modes. Full Wire is the classical wireframe mode where every faces are drawn as wire but you can also choose to display wires for faces in a direction and plain for faces in the opposite direction. That's the point of Wire+Front faces and Wire +back faces.

 

In practice

These modes will be particularly useful to hunt down lighting aberrations from meshes created with any external 3D tools and then imported in GP4 Builder. Such tools can equally create clockwise and anti-clockwise faces that will lead to invisible faces or some dark artifacts (they look like localized shadows) in game. The best way to fix them is to use wire + back or front faces and to fix them with Invert order creation to be sure all faces are pointing the same direction.
 

- Reverse all textures :Invert V mapping display to help Zmodeler users for their forth and back trials. Note that you can use the "<" key as a shortcut to activate/deactivate this feature.

- No Texture Mode :Choose if when you disable texture mapping of .gp4 objects, color displayed will be the behaviour of the faces, or the diffuse color of each vertex. Second option could really help to use vertex painting.

 

Display Options

- Use SkyBox: If checked, Ground color will be used to simulate land and background color will be used for upper sky. If unchecked, only background color is used uniformely.

- Background Color : This color is used to fill Opengl display background.

- Ground Color : This color is used as ground when Use Skybox is checked.

- Selected Shape Color : This color (red by default) is used by GP4 Builder to highlight selected object part. It doesn’t replace current texture but just tint it, meaning that a pure black object will stay black. If you have such dark textures, you might disable texture mapping (F2 Key), in order to see selected items. Note that as this color is a tint, using a pure white color will keep selected object its original colors.
- Selected Vertex Color : Color (yellow by default) of the cross mark pointing selected vertex.
- Size : Specifies vertex cross mark size.

- Normals Color : Color (pure blue by default) of the vertices normals.

- Size : Specifies visually represented normals size.

- Graphics Wire Color : This is the color (black by default) used for .gp4 mesh wireframe.
- Physics Wire Color : This is the color (gray by default) used for non .gp4 files mesh wireframe.

- Ghost Mesh opacity : This is the percent of opacity of the .gp4 objects when Physics tab is selected.

 

Camera Options

- Point of view - Object Distance Factor : Factor used to set distance between user's camera and the target object when you select an object in the editing tab and that camera is not locked.

- Point of view - Sector Distance Factor : Factor used to set distance between user's camera and the selected sector when you select a sector in the editing tab and that camera is not locked.

- Fixed Direction :Force camera to keep the same direction whatever the object or sector it looks at.

- Force Top-Down view in orthographic mode : Force camera to look perfectly at 90 degrees from the ground. It prevents from isometric weird display when panning with mouse.



Computation Tab

 

Vertice Options

- Snap Distance : Sets distance range in which a displaced .bin or .gp4 vertex, part or object is magnetized by another vertex. This magnetization applies to all the vertices in range, either from selected object or from another.

 

In practice

Use a Vertices Snap Distance of 0 to disable any magnetization.

 

- Influency Distance : Sets radius of influency around selected vertex. All the vertices before the distance will be moved (depending on the fade-out parameter below) to follow move of selected vertex. If Ignore altitude chebox is unchecked, Influency will act into a sphere of radius=distance. If Ignore altitude is checked, distance will be compared without any care of vertice altitude, so you might think about the influency area as an infinite vertical tube centered on the vertex. This also means that two vertices with exact same position but with different Z values will move at the same speed. All the faces in the radius will get their edges highlighted (in red by default).

 

- Influency fade out : Only two modes are available : none or sinus. None means that all the vertices in the radius will move the same way as selected one. Sinus offers a smooth decay from selected vertex to the external vertices around the influency area.

 

In practice

Fade out set to none is perfect to scale without stretching large objects like bridges. Simply select one vertex at one side of the bridge and increase influency up to including beginning of the central banner. Then move this side of the bridge to get a bridge the width you want.

 

 

HD Track

- Method : Sectors curvature can be extrapolated using 2 methods, an approximated one (used in GP4Builder up to v1.181) and a new one using Bezier mathematics.

Approximated method try to guess the curve from current and next sector direction. It gives poor results when sectors are not pointing each other and could lead to anomaly curved fences in corners.

Bezier Method compute subsectors using 4 sectors and additional points computed internally. It gives very smooth results with none of the artifacts of the approximated solution. It can anyway gives slight distortions at the beginning of a curve.

- Min Angle : This value is used by the Bezier code to limit bezier smoothing to banks/fences with a very high angle offset (in a straight, fences make an angle of 180°).

 

- Sector Subdivision 1 : Limit angle when sector is divided in 2 sub-sectors.

- Sector Subdivision 2 : Limit angle when sector is divided in 4 sub-sectors. Note that this second subdivision only occurs if Subdivision 1 occurs.

 

In practice

If you do not want to use any Subdivision (to match an old low-def created .gp4 file for instance), simply set both subdivisions to 9000. This will subdivide sectors only if angle between 2 sectors is superior to 90° which is far unlikely to happen.

Note that .gpb file format stores both sector subdivision settings.

 

- Curved HD Fence : Propagate sector edge interpolation to fences.

 

In practice

Very useful with tracks like Monaco, where rails are following track curves, this feature could also create annoyously curved fences on tracks, particularly when you need a straight fence front to a corner.

- Show kerbs Runout : If checked, kerbs will be displayed as they will be felt in game, meaning that car will run over a runout after any kerb. Graphically, this part of the kerb is never drawn in game but this option let you preview its effect.

 

 

Misc. Options

- New object default clipping distance : Sets default clipping distance for new objects, either created in GP4 Builder or imported from another format.

- Kerbs External Side Lowest Height : Sets altitude of the most external edge of new created kerbs. This setting override the default position which is equal to kerbs h1 value. If you still want to use default setting (if you use different height for each sector for example), just set this setting to 0.

- Verge edges : Alternative display for .dat verges. You can force verges "arms" to be aligned on sectors and create .gp4 objects with such geometry. Anyway, behind the appearance, the game physics will still use the standard (aligned to bank) geometry and thus some little differences could occur in game (wheels could fall from outer kerb sooner or later than expected in example).

 

 

About Menu

 

 

About Menu gives the following informations :

- User Guide : Opens this guide with your current .html viewer (this guide have to stand in the same folder as GP4 Builder's exe.

- About OpenGL : Displays informations about OpenGL API installed on your computer, its version, its provider and your actual rendering hardware.
- About GP4 Builder : Displays version of the application and links to my site.

 

 

 

1.2 LEFT PANEL

 

The left panel is the core part of GP4 Builder because it is there you will be able to access and edit all values from GP4 files. This panel will have one or multiple tabs, depending if you open a .gp4 file or any other file format..

 

We will describe them one by one.

 

Graphics/Physics/Tarmac/Surfaces/flashes Tabs

Each tab gives you full power on data stored and managed by GP4 Builder.

Top of the tab is reserved for navigation buttons. They are all grayed by default but are activated when available :
- Add :Adds new element(s) depending on context.
- Delete : Deletes element(s) depending on context.
- Prev : selects the line just above the one currently selected.
- Up : returns one hierarchical level upper.
- Next : selects the line just under the one currently selected.

 

Main part of the tab displays all file's data in a browsing list. It uses what I call a hierarchical system, meaning that double-clicking on a line will replace current list by the list of sub-elements of the selected item.

Each file format has a different hierarchical structure and they will be explained in the corresponding sections about file formats.

 

For most of the tabs, you can access a context popup menu by right-clicking in the list. This menu provides most common editing features available for selected tab.

 

Search Tab

With this tab, you can search for objects inside a whole .gp4 file

 

First choose a criteria of search :

- By Material : Gives the list of all the parts using this material.
- By Texture : Choose a texture from the dropdown list or from Texture Browser and you will get the list of all parts using this texture.
- By Name : Input a full or partial name in the text field and GP4 Builder will display a list of all the objects having the input text in their name. If a .gpb file is opened, it also searches in part names. Note that you can input an asterisk * to search for all objects.

 

Then you can also select a filter. These are restrictive filters. It means that if you set one or 2 filters, only objects with selected criteria AND corresponding to both filters will be listed.

 

Once some results are returned in the list, you can hit list header to sort results by name or by scene. Then you can click on the line of each object to preview it or double-click on it to let GP4 Builder leading you to selected part or object in the editing list.

 

- Batch Edit : This button displays a new window that will apply changes to all the objects or parts resulting from the search.

 

You can select one of the provided change types :

- Rename objects : rename all selecting objects with chosen Class, name, number of digits and the starting value for digits. The Preview label is automaticaly updated to display the name of the first object.

- Recompute Object Coordinates : This item will do the same thing as if you used the "Compute Coordinates" button for each object. Beware : this also resets Object Base coordinates and could result in incorrect object reflections in wet weather.

- Update Flag to : change the object flag value for each object. Please remind that 0 will let game engine automaticaly create object reflection while 64 will prevent object from receiving any auto-reflection.

- Update Clipping Distance to : change clipping distance for each object.

- Update Camera Up to : change the object camera value. For maximum compatibility, set this value to 0.

- Apply random move up to : move each object on the XY plane (horizontal) by a random distance up to the given one from its actual position in any direction.

- Apply random rotation up to : rotate each object on the Z axis by a random value from -value to value degrees.

- Apply random scale up to : scale each object on the 3 axis by a random scale between -value and +value.

- Delete Objects

- Change Vertex Color : change diffuse color of all vertice for each object

 

Use the Apply button to apply selected change.

 

 

 

1.3 TOP PANEL

 

Top panel affords controls and informations through tool bars. Every tool bar can be shown or hidden. To hide or show a specific tool bar, simply right-clic other the top panel area and check/uncheck any tool bar.

 

 

Controls Tool bar

- Fix Cam : if enabled, camera won’t be automatically placed any more front to selected objects.
- Displace : When enabled, mouse moves are no more moving the virtual camera but the selected object. Details here.
- Rotate : When enabled, mouse moves are no more moving the virtual camera but are rotating the selected object. Details here. Also note that you can input an amount of rotation in the Z field of the information toolbar in order to rotate an object with precision.
- Scale : When enabled, mouse moves are no more moving the virtual camera but are scaling the selected object. Details here.

- Undo last moves : cancels any move/rotation/scaling done to an object and any move done to a sub-object or a vertex. This button will cancel any operation done with .gp4 files but will only revert back one operation with any other file type. Details here.

- Axis : Let you choose active axis for next moves, rotations and scalings. Each axis has a specific color matching global or local axis displayed in GP4 Buidler view.

- Local Axis : if enabled, vertices or faces displacement will follow faces edges instead of global axis.

- Preferences : Quick access to Preferences window.

 

 

 

Display tool bar provides shortcuts to some of the Display Menu functions and a direct access to the Option window.

- Show 1 Object : if enabled, only selected object will be displayed on screen

- Show 1 Scene : if enabled, only selected scene will be displayed on screen

There's also a tiny button on the right of the "Show 1 scene" button. Hitting this button will display the Scenes Selection window where you can select which scene to hide or show.

- Show object in sight (.gp4 and .dat only) : if enabled, only objects with clipping distance long enough to be seen from current sector will be displayed. Mimics the way game will display objects.

- Show Normals : if enabled, displays normals for each object vertex. Normal color can be edited in Preferences.

- Show Wet Mirror plane : if enabled, displays a white square at object base altitude to preview wet mirror plane that will be used ingame to generate wet reflections of object with auto-reflection flag.

- Show Sun Rays : if enabled, displays sun rays for all the objects of selected scene

- Show CC-Line: if enabled, displays cc-line

- Show CC-Cars Direction: if enabled, displays a white sting for each sector and pointing following CC-Dir value of this sector. Note that this option also toggles sector number display.

- Show HD Sectors: if enabled, displays subsectors as defined by Preferences settings

 

 

 

 

 

Snap Tool bar

- Snap : Snap distance. If any vertex of selected object comes close to another vertex at a distance equal or inferior to this distance, vertice will snap.

- Magnet Button : Enable/disable snap feature (Ctrl-M keyboard shortcut).

 

 

 

Informations Bar
- Status Panel : Displays messages about latest action done, as import, export, load or save operations.
- Coordinates offset fields: Displays relative coordinates offset in meters from the instant you started to displace an object to the end of the displacement.

 

 

In practice

When rotate mode is engaged, Z value can be manualy set to apply any precise rotation value.

 

 

 

1.4 OPENGL DISPLAY

The OpenGL display shows the real-time 3D textured scenes contained in the opened file.

Please remind that GP4 Builder can't read .tex files directly and thus you will need to convert textures to .tga format before being able to preview them in the 3D viewport.

As GP4 Builder uses standard OpenGL API, it benefits from graphical card tweaks as Anti-Aliasing (AA) or Anisotropic Filtering (AF) as shown in the right picture shot from GP4 Builder with 8xAA and 8xAF.

 

 

Navigating through OpenGL Display

Two mouse handling modes exist in GP4 Builder : Displace XY/Z or Rotate/Zoom.

The mode is determined by default by the type of the file opened, but you can change this mode by toggling the Rotate Mode checkbox in the option tab.
You can also swap mouse buttons with the “Swap Mouse button” checkbox in the option tab.

 

Default modes are as follow :
- Displace XY/Z with .dat, .col, .bin, .cfp and track .gp4 files
- Rotate/Zoom with non track .gp4 files

 

In Displace XY/Z mode, mouse buttons will act as follow :
- Left-clicking + drag : Moves scene on the both horizontal axis
- Right-clicking + drag : Moves scene on the vertical axis

 

In Rotate/Zoom mode, here are the controls effects:
- Left-clicking + drag : Rotate the virtual camera around selected object
- Right-clicking + drag or mouse wheel : Zoom/Unzoom selected object

 

You can press Alt at any time to temporary activate rotate/zoom mode.

 

Whatever the mode, clicking on the center button or mouse wheel and dragging will always let you look around you at 360°.

You can also use a single click to select an item directly in the view. A double click will open selected item and select its sub-component. And with .dat and .gp4 files, a right click will open a context popup menu offering most common edit menu features.

 

In practice

You have to know that precision of the mouse picking is greatly dependant from the distance between user's camera and the target object. So if it seems you can't select an object try to get closer to him first. Also note that selection will always work better if you target 3d center of .gp4 objects and middle points of .dat sectors.

 

 

You can also engage one of the three 3D Edition modes, clicking on the displace, rotate and scale buttons of the top panel :

 

If Displace Button is engaged, mouse moves won’t move the virtual camera but will displace the selected object :
- Left-clicking + drag : Displace selected object on any free axis (you can lock some axis with the axis buttons)
- Right-clicking + drag : Displace selected object on vertical axis. If Move+rotate mode has been selected, this action will rotate object around vertical axis.

All displacement amounts are displayed in corresponding offset fields.

 

If Rotate Button is engaged, mouse moves won’t move the virtual camera but will rotate the selected object.
- Left-clicking + drag : Rotate selected object around its vertical axis. Amount of rotation in degrees is displayed in Z offset field.
- Right-clicking + drag : no effect

 

If Scale Button is engaged, mouse moves won’t move the virtual camera but will scale the selected object :
- Left-clicking + drag : scale selected object on any free axis (you can lock some axis with the axis buttons)
- Right-clicking + drag : no effect

 

Don't be afraid by all the modes and mouse moves effects anyway, it will quickly become clear once you will have started to work with GP4 Builder.

 

 

1.5 KEYBOARD SHORTCUTS

GP4 Builder has many keyboard shortcuts to make editing quicker and easier.

Here is the complete list of the keys and their binding effects

F1 : Switch Alpha blending On/Off
F2 : Switch Texturing On/Off (with .gp4 tracks, shows face behaviours)
F3 : Switch Wireframe mode On/Off
F4 : Switch from geometry to wireframe + geometry

 

F5 : Refresh scene

F6 : Switch Displace mode On/Off
F7 : Switch Rotate mode On/Off
F8 : Switch Scale mode On/Off

 

F9 : Lock/Unlock Camera

F10 : Cycle through display modes : .dat and .gp4 /.gp4 only / .dat only

F11 : Cycle through viewport cameras

F12 : Captures GP4builder screen

 

< : Reverse Textures

Alt : temporary enter rotate/zoom mode

Alt-0 to Alt-9 : Move object to scene number 0-9.

 

Ctrl-D : Duplicate object

Ctrl-F : Invert face creation

Ctrl-G : Align object

Ctrl-L : Subdivide face

Ctrl-M : Toggle Snapping

Ctrl-N : Invert Normals

Ctrl-O : Open a file

Ctrl-P : Change Vertex Painting

Ctrl-R : Repeat vertex move

Ctrl-S : Save file

Ctrl-W : Weld Part Vertices

Ctrl-Z : Undo latest operation (when available)

Ctrl-0 to Ctrl-9 : Move to scene/part number 0-9

Ctrl-F1 : Toggle Show 1 object mode

Ctrl-F2 : Toggle Show 1 scene mode

 

Ins : Detach face to new part

Suppr : Deletes current item (does the same as the "Del" button)

PageUp : Returns one level upper in the hierarchical tree

PageDown : "Opens" selected item, goes one level deeper in the hierarchic tree

 

Left Arrow (only .dat files and at command level): select past sector

Right Arrow (only .dat files and at command level): select next sector

Up Arrow : Selects previous object in the edit list
Down Arrow : Selects Next object in the edit list

 

 

 

 2 .BIN FILE FORMAT

 

Three .bin files are present in every GP4 track wads :
- Trackname2001_pitlane.bin
- Trackname2001_pitverge.bin
- Trackname2001_track.bin

where trackname is replaced by the name of the track.

 

These files store definition of the tarmac surface. This surface has no physical effect on the car but it fully replaces the .gp4 tarmac mesh and receives all track line textures from a .jip file. It also handles the tarmac bump mapping effect. For this reason, every TRACKxx, PITLANExx and PITVERGESxx (with xx replaced by an index value) .gp4 object won't be visible in game, opposite to GP4 Builder.

GP4 Builder can automatically recreate the 3 .bin files from any .dat file. For this, open a .dat file and go to File Menu -> Convert .dat -> convert to .bin files.

 

In practice

If you set custom .gp4 textures and prefer the .gp4 aspect to .bin tarmac one, you need to change two things : first change names of your .gp4 objects to anything but TRACKxx, PITLANExx and PITVERGExx to make objects visibles in game and second : displace .bin vertices below or out of the track to hide these parts.

Anyway if you do that, tarmac will never get wet, receive skidmarks or get shiny effect.

 

 

2.1 HIERARCHY

.bin files have a 4 levels hierarchy :

 

Level

Left panel’s list

Popup window

Special Action

0

Bin list

 

Invert Normals, Invert dry/wet areas

1

Section

 

Delete, Invert Normals, Invert dry/wet Areas

2

Faces

 

Delete, Invert dry/wet Areas

3

Vertex Position

Vertex window

Invert Normals, Invert dry/wet Areas, Displace

 

Note that you can use (right click) context menu at any level to invert normal or change area behaviour.

2.2 EDITING FILE

Level 0 - Root

Depending on the number of .bin files present in the same folder, 1,2 or the 3 .bin files will be loaded and made available at this level. Double click any line to access selected .bin section list.

You can already see in the preview the whole tarmac mesh and eventually the rain protected areas that are a light lighter. More on this in level 2 chapter below.

If you come a little bit closer to the mesh than default position, you will be able to pick a track part, clicking on it from this level. In this case, list will automatically display level 1 content of picked .bin section.

 

You can invert wet and dry status of the whole road at this level.


Level 1 - Sections

At this level, you can access each mesh part individually. The number of vertices is also notified for information. Clicking once in the list will highlight selected part in the preview, while double-clicking in the list will open this part to access level 2.

Directly double-clicking in the preview will automatically select the face and the vertices the closest to the mouse cursor and refresh the list with level 2 content.

 

You can also invert wet and dry status for selected track part to create rain protected sections.

Level 2 - Faces

At this level, you can access each faces individually. The number of vertices is also notified for information. Clicking once in the list will highlight selected part in the preview, while double-clicking in the list will open this part to access level 3.

Directly double-clicking in the preview will automatically select the closest vertex to the mouse cursor and refresh the list with level 3 content.

 

You can also invert wet and dry status for selected face to create rain protected area.

Level 3 - Vertices

At this level, all the vertices defining current track part mesh will be listed with their internal index.

 

Clicking on a vertex in the list or clicking directly on the vertex in the 3D view will display a yellow cross (color is editable) at vertex position in the 3D Display to specify which vertex is selected.
At this level, you can also activate Displace mode to displace any vertex on any axis.

Note that by default, every vertices are magnetized and will attract the vertex you are displacing if this one got inside the snap distance.

You can invert wet and dry status of any vertex at this level.


 

You can also change manually vertices properties through the popup windows :

 

- Position coordinates : Vertex’ world position.
- Normal coordinates : Vertex’ normal vector.

 

In practice

Some track makers found a way to darken track tarmac using reverted normals because when normals are reverted, lighting engine do not lit these faces. To add such tarmac color variations quickly, you can invert normals both at level 0 and level 1. Of course you can also manually invert normal values for individual vertices

- UVMap coordinates : U (horizontal from left) and V (vertical from top) texture coordinates. These coordinates are set between 0 and 1, 1 meaning 100% of the texture size.

- Flag / Surface: This color enables or disables rain fall on a part of a track. Set to pure white, track will receive rain and tarmac will be wet. Set to pure red, track won't receive rain at all and tarmac will keep dry. In the 3D preview, rain exposed sections are darker than covered sections, as in game. To simplify things the surface radioboxes just below are automatically changing the color according to your choice.

 

In practice

Be careful : .bin files have to be updated either in the track wad file as usual but also in the MAPS\Track2001 game folder in order to get the correct wet and dry areas.

 

 

 

 3 .CFP FILE FORMAT

 

This format is present either in each track wad and in GP4folder/MAPS/Trackname2001 folders.

Main probability is that cfp means Crowd Flash Position because it stores 3D coordinates matching with some of the flashes seen ingame if Arcade layer is enabled.

For an unknown reason though, these files are not used by the game.

Instead, flashes are automatically generated in game at the center of CROWD_nn_FULL objects.

And for crowd sounds, game is using plain text .crd files instead (stored in YourGP4folder\samples\crowddata).

 

GP4 Builder do not create .cfp files, it can only edit existing ones.

 

 

3.1 HIERARCHY

Level

Left panel’s list

Popup window

Special Action

0

All Points

 

 

1

Points

Point window

Displace

 

 

3.2 EDITING FILE

Level 0 - Root

This level has no other feature than acceding Level 1, double-clicking on the “All Points” line.

You can directly click in 3D view to select a point.

 

Level 1 - Points

This levels shows the list of points included in the .cfp file.

Clicking on a point will place a highlight cross at point position on the display and will also pops-up a small window to edit point coordinates.

 

This window lets you change position and normal (understand direction) of selected point.

You can change position of a point manually through the 3 fields of this window or engage Displace mode and move it directly with the mouse.

 

 

 

 4 .COL FILE FORMAT

 

Every track wad contains a " Trackname2001.col" file (where trackname is replaced by the name of the track).

My guess is that "col" is for collider, not for cars but for light, because the mesh included in the .col file will receive shadows from every car. These files also store behaviour of ground track surface apart track road itself which will always be set to "tarmac" whatever the behaviour you will give it in the .col file.
.col files have physical effect on cars as handling will depend on the surface type you're running on, but also a graphical effect because every car shadows are drawn on the .col mesh.

 

Be careful when editing faces or vertices positions of these files because the track surface created also sets in a way all onboard cameras height.

 

In practice

For instance, if .col file has a big bump on the track that does not exist in the .dat, cockpit camera will raise in game atop the bump but car will still follow the .dat, resulting in a camera looking at car nose... not a great position to drive for sure.

 

4.1 HIERARCHY

.col files structure have a 4 levels hierarchy :

 

Level

Left panel’s list

Popup window

Special Action

0

All Layers

 

Compute Normals, Weld

1

Behaviour Layers

 

Weld

2

Faces List

Behaviour type

Delete - Displace - Add/Slice faces

3

Vertex Position

Vertex window

Displace



4.2 EDITING FILE


Level 0 - Root

At this level, all 4 areas compounding the whole track surface are displayed.
As for the others file formats, You can reach level 1 double clicking on the “All layers” line.

If you come a little bit closer to the mesh than default view and click directly on the mesh, GP4 Builder will automatically select the face under the cursor and list will be refreshed with level 2 content.

You can greatly optimize the .col file by welding all identical vertices.

 

Level 1 - Behaviour Areas

You can now access each of the 4 behaviours area separately.
Clicking on one of the four behaviour line will display it instantly in the OpenGL Preview and double clicking on this line will lead to the level 2 list.

Also note that if Display Menu ->graphics Options -> Show selected scene only is checked, only currently selected will be displayed and thus available for mouse selection, otherwise all areas will be available for viewing and selection.

You can greatly optimize the .col file by welding all identical vertices.

 

Level 2 - Faces

This levels shows every faces having the same behaviour.

Clicking on one face will highlight it using highlight color in the 3D viewport and camera will instantly be placed front to selected face (apart if you already engaged the Lock Cam button).


At this level, you can activate Displace mode and displace any face on any axis.

The Add button is also available to create a new square made of two faces.

Use Del button to delete selected face.

 

In practice

A property of .col mesh is that if several faces overlap, the behaviour of the top one will be used in game. So adding faces allows to create small areas of a given behaviour of any shape in the middle of a big area with another behaviour.

You can also use Subdivide Face function to quickly slice a face in 4 smaller faces for a more precise behaviour attribution.

 

At this level, the aside window will popup.

To change face behaviour, just click on the behaviour you wish to apply to the selected face and the selected face will instantly disappear from the current list to be created in the corresponding behaviour face list.

By default, only selected face is converted to another behaviour but you can also choose to convert a given amount of faces.

 

In practice

This feature is particularly handy with .col files generated from .dat by GP4 Builder as track mesh are generated as stripes of faces, one stripe for track tarmac, one for left verge, one for right, etc.

 

Face's normal coordinates are also given here but their use is still unknown.

Finally, there's another value defined for each face but its meaning is still unknown.


Level 3 - Vertices

Finally, level 3 gives you access to the 3 vertices of selected face
Clicking on a vertex line will instantly display a yellow (can be changed) cross to specify which vertex is selected.
These vertices can be edited activating Displace mode or by directly edit coordinates from the little popup window.

 

Window for .col vertices is minimalist as each vertex is only described as a 3D point, so you can only edit its X, Y and Z positions and nothing more.

 

 

 

 5 .DAT FILE FORMAT

 

With .gp4 format, .dat file format is the main file needed for a GP4 track because it defines all the physical aspects of a track : where is the road, what is the best default line for AI cars, where are walls, where are kerbs, where are black flags and for which speed limit. Each of these parameters are defined in the .dat file, along many others.

There's of course one Trackname2001.dat file (with trackname being replaced by the real track name) for each track available and they are all placed in the GP4 Circuits folder in GP4 main folder.

 

How to display Jip Mapping in the 3D View

T display jip mappings in 3D View, just copy GRIDLINE.jip or GRIDLEFT.jip file in the same folder as your .dat file (original files are in YourGp4folder\MAPS\RESOURCES\Jams). Next time you will open your .dat file, jip file will also be loaded.

Note that if realtime jip mapping preview is very close to the game counterpart but is far from perfect for pitlane preview.

 

 

5.1 HIERARCHY

.dat files are splited in 3 sections:

 

Track / Pit lane section

Level

Left panel’s list

Popup window

Special Action

0

Sections list

  Displace/Rotate/Equalize sector center

1

Sectors

Sector’s parameters

Displace/Rotate/Add/Delete Sectors, Displace Banks, Add/Delete Kerbs

2

Commands

Commands parameters

Add/Delete Command



CC-Line section

Level

Left panel’s list

Popup window

Special Action

0

Sections list

   

1

CC-Line

CC-Line’s parameters

Add/Delete CC-Line section



Cameras section

Level

Left panel’s list

Popup window

Special Action

0

Sections list

   

1

Cameras

Camera’s parameters

Add/Delete Camera

 

 

5.2 EDITING TRACK/PIT SECTIONS

About Physical Track

In GP4, physical tracks are built around a structure of sectors.

Real Track layout has been artificially sliced at every 1 unit interval (16 feet).

These slices are called "sectors" in GP4 Builder and each sector stores all the informations concerning itself, its position, width of the track, width of verges and so on and all these data have been gathered in what we call commands. Commands are sets of value concerning one or many aspects of its sector.

To complete this description, there's an initial sector and some specific first sector's commands to set general parameters for the whole track.

Physical Track Limitations

Grand Prix games tracks suffer from some limitations :

- First there's an overall limit of sectors you could create in a track. Track sector number plus pitlane sector number should not exceed an overall amount of 1645 sectors. GP4 Builder does not use this exact rule to provide some space for experimentation and rather warn users if track sector number exceed 1500 (internal GP4 Builder limit is set to 4000) or if pitlane sector number exceed 300 (internal GP4 Builder limit is set to 600).

- Second, there's a geometrical world bound. This limit is displayed in GP4 Builder as a big black square line. Be sure to always design your track inside this area or you should experiment big troubles with car trajectories out of this area.

- Finally, an overall .dat file size should not be exceeded and this maximal size is around 200Kb. This limit is present by default but it should be overridden thanks to GPxPatch if needed.

Physical Track Conversions

As the same 3D information is stored in each file, .dat file track layout can be automatically converted by GP4 Builder into other file formats :.bin, .col and .gp4. But the artificial 16 feet slicing of the track needed for the physical description of the track does not mean we can't have higher resolution graphics.

That's why GP4Builder have an algorithm to generate sectors subdivisions.

These subdivisions can be previewed with .dat files but don't be fooled by the drawing, .dat file will still be saved using the 16 feet slicing rule.

 

In practice

This is particularly true if you used the Curved HD Fence setting and then convert .dat to .gp4. In game, you will graphically see rounded fences, but cars will still "physically" collide with low-definition 16 feet .dat rails.

 

Anyhow every file generated from the .dat will benefit from the settings defined for subdivision in the Preference window.

 

In practice

Be always sure to use the same subdivision settings for all the meshes you will generate from the .dat. Creating a .bin file with different settings than the .gp4 file could lead to missing tarmac areas or even to game crashes.

Note that is you use .gpb file format to save your track, subdivision settings are saved in the file.

 

Level 0 - Root

Level 0 let you choose between the edition of sectors, cc-lines or cameras. in this chapter, we assume you need to edit sectors.

The “items” value shows the number of track/pitlane sectors, of CC-Line portions and number of cameras defined for this track.

 

At this level, you can displace or rotate all track and/or pitlane sectors. If you select Pit lane sectors and engage Displace or Rotate buttons, the whole pitlane will be modified. If you select Track Sectors and engage one of these buttons, then both track and pitlane will be modified.

Rotation at this level will apply around track or pitlane center, depending is track or pitlane is selected.

You can also equalize track or pitlane sectors. For this, select Track or Pitlane sectors line and go to Action Menu -> Equalize Sector Centers.

 

If you get closer to the mesh in the 3D view and click near a sector center, this sector will be automatically selected and list will be refreshed with level 1 content.

You can also access level1, double-clicking on the Track Sectors or the Pit Lane Sectors lines.



Level 1 - Sectors

Track and pit sector descriptions are the same in GP4 but track also has an initial sector which is in fact storing general data about the track.

In both case, list is made of the sector number, the presence of kerbs feeling, fence gate and jip mapping for that sector and the number of commands in each sector.

Moreover, If a sector has been set to be a split time checkpoint, sector's name will have the "split" suffix.

 

Once you come at this level or if you click on a sector name, camera will instantly be placed front to selected sector (apart if you already engaged the Lock Cam button)

As for level0, you can click at any time near a sector center to directly select a sector in the 3D View.

You can browse previous and next sectors with left and right arrow keys.

 

Track Initial Sector

As told in the beginning of this chapter, initial sector is a bit different from others in the way it does not store commands but general settings.

So clicking on the initial track sector will display the track properties window with following input fields :

 

- Angle Z: It was used with GP3 to set whole track orientation (maybe compared to North) but in GP4, it is used to set initial cc-line direction. Conversion in degrees is shown for info.
- Slope: It might be used to set whole track slope, or maybe just first sector’s slope. Conversion in degrees is shown for info. Negative values means slope goes down and positive ones that it goes up.

- Jip file (Gridlines) : GP4 only let you choose between 2 jip files for track markings. Gridline is used for right handed tracks and gridleft for left handed ones.

- 1st Car Position: Position of the first car on the starting line. All cars will then be placed either in the same row behind this first car either on a raw mirrored using the center of the track as axe. A negative value means first car will be on the left while a positive one will set it on the right. A value of 0 will create a perfect line of cars in the middle of the track. Conversion in meters and side is given for information.

- Pitlane Width Ratio : Width ratio between pitlane tarmac and pitlane garage area. This value is used for jip mapping computations.


- Global Track Flag : This flag is driving several track properties but only 2 are known : the side of the pitlane where cars are stopping for refueling and a trigger to make AI much more carefull (used in original Monaco). Flag is the raw value, you should not edit it manually in normal circumstances.

 

- X Pos. : This setting was used in GP3 to set initial sector X position. It could be used in GP4 if no F6 commands exists in sector 0.
- Z Pos. : This setting was used in GP3 to set initial sector Z position. It could be used in GP4 if no F6 commands exists in sector 0.
- Y Pos. : This setting was used in GP3 to set initial sector Y position. It could be used in GP4 if no F6 commands exists in sector 0.
- Width : This setting was used in GP3 to set initial sector track width. It could be used in GP4 if no B4 and B5 commands exist in sector 0.
- Verges: Was used in GP3 to set some verge data but I still don’t know if it is used in GP4.
- Kerbs(S3): Another data coming from GP3. It was describing Kerbs color when no textures were applied. In GP4, I’m not sure it is used again and this value have to be kept to 3.

 

 

- Show Magic Data : If the track has embedded magic data, you can edit them with this feature

 

Once you clicked the button, the Magic Data windows will pop-up as seen on the right.

 

Magic data are some track specific informations that were originally stored once for all in the game executable but that were made available for editing and for storing in individual .dat files by René SDI Smit and Marc Aarts (through CMagic program). The advantage of storing magic data in .dat files is that track makers can change these settings and only give a .dat file to players, magic data will be automatically "patched" in the game. The only "drawback" is that you need to use GPxPatch from SDI to benefit from these extra settings.

 

You can edit all and every values. Magic Data are storing a lot of game properties that will only be applied for a given track. A lot of them are well known and some are still a mystery. I can't explain them all in this guide but you will find documentations on GP4 forums to know what you can do with them.

 

- Add bump : If the magic data list is smaller than 168 lines, you can add additional bumps.

- Delete Bumps : Remove useless bumb values

 

- Remove : Delete the whole magic data embedded in the track.

 

- Import .md3: lets you import any magic data previously saved from a track or from GP4.exe with Marc Aarts' CMagic editor.

- Export .md3: export current magic data to a .md3 file.

 

GP4 Infos extended data : Following advanced settings have been added to the .dat file format by SDI who created GPxPatch. Thus these will only be applied if GPxPatch is used to launch GP4.

 

Extended Description : Informational purpose only. These properties are not used in game.

 

Extended Game Settings : These values are used in game at several places

- Name : Track name

- Country

- Adjective : used in a few menus

- Wad name : specify a custom wad name that will be used with this track. Beware : be sure that this wad file exists or game will crash at mid track loading.

- Race Laps : Number of laps to run on this track in week-end or championship mode. 0 means that original 2001 lap number will be used.

- Length

- Split 1 : First split time sector. 0 means that this sector will be at 1/3 of the track.

- Split 2 : Second split time sector. 0 means that this sector will be at 2/3 of the track.

- Race/Qualify Lap Record : Best lap time. Not sure where this one is displayed in game.

 

 

Ordinary Sector

Other sectors will display the sector’s properties window :

- Sector Description: All these values are final values in meters and degrees, so you can edit them directly without managing units or command integer values. If a box is grayed, it means that the support command is missing and thus if you need to edit this value you will first need to go to level 2 to create needed commands. If verge width box is grayed, then you need to create an F7 command. If it's banks one, you will need F5 ones.

 

Values are sorted horizontally and vertically to schematically follow a typical track sector structure.

 

Gates checkboxes : Disable physical fence for this particular sector. It's the perfect way to manage pit entry/exit gate through track fences.

Banks Angle : Angle of the left and right banks in degrees

Kerbs checkboxes : If checked, you will hear and feel that your car is running on a kerb on the specified side verge.

Banking : the input box on the right of the angle label allows banking edition.

Fences, Banks and Verges Height : Edit height of the given parts of the track.

Banks, Verges and Track Width : Edit width of the given parts of the track.

 

 

- Advanced: Hitting this button will reveal some additional options that do not need to be edited manually usually.

Length: Was used in GP3 to set sector’s length, but in GP4, all sectors have 1 unit length. Conversion in meters is shown for info, knowing that 1 unit = 16 feet, (smallest) sector’s length is always 4.877m long.
CC Direction: Sets the orientation of CC Cars for this sector. Value in degrees and direction is shown for info. Sign of the value sets direction.
CC Pitch: Sets the pitch of CC Cars for this sector. Value in degrees and direction is shown for info. Sign of the value sets direction: positive values means that car is somewhat climbing a hill, negatives means it is running down a slope.

 

- Distances between sectors: Gives distance in meters between current sectors, past one and next one (when available).

 

- Verges:

Value : Raw flag value. You should not edit this value manually but rather through fence gate and kerbs feeling checkboxes.
Left & Right : It was used in GP3 to specify verge width but I’m not sure they are still used in GP4.

 

- HD Setting Subdivisions (.gpb files only) :Overrides Gp4Builder subdivision settings as defined in Preferences panel for this particular sector.

 

 

 

Prev and Next buttons are switching selection to the previous or the next sector.

 

 

Modify Sectors button opens the Modify Sectors window.

This window let you completely change the face of your track.

 

Main Settings

To begin with it, just specify a range of sectors to edit.

You can specify sectors manually or click the arrow button to directly pick a sector in the 3D view.

You can also set if you want to apply absolute or relative changes. Absolute values will completely replace current ones while relative will only be added to current ones.

Finally you can set the default interpolation method that will be used once you will make any change to the sectors properties.

 

There are 3 interpolations method :

- None : No changes. This is the initial method and it keeps any original sector properties details.

- Linear : Sector values between first and last sectors are replaced by values computed with a linear progression. It gives regular shapes.

- Cosine : Sector values between first and last sectors are replaced by values computed with a cosine progression. It gives smooth shapes.

 

Center Properties

In the bottom-left part of the window, you can edit track height and banking.

These values depends on the "set banking from" combobox.

If you select from Center, banking will roll the track around the center of the track. It means that the middle of the track keeps its current height but one edge will be higher and the other edge will be lower.

If you select from Edge, banking will roll from the lowest edge of the track : lowest edge will keep actual track height while middle and opposite edge of the track will be higher.

Note that you can change your mind with banking on edge as often as you want in the same session of GP4Builder but if you close GP4Builder, track heights will be saved to the last banking state and you won't be able to cancel the changes later (but resetting heights).

Invert banking will just do that, invert left and right banking.

 

Side Properties

Each sector have left and right properties, so the first box asks for the side you want to edit.

Then, each property have values for first and last sectors (as specified in Main Settings panel) and the Interpolation method you want to use in-between.

 

If Bridge fences checkbox is checked, Banks widths, heights and angles will be interpolated between first and last sector to create a straight fence, whatever the track curvature in between the 2 sectors. Basicaly, from a camera high above, you will see fences as a straight wall between first and last sector.

 

If Bridge Bank Heights checkbox is checked, Banks heights will be interpolated between first and last sector to create a straight profile when looking at these banks from the side. It's a bit different from bridge fences because bridge fences will keep original arms directions and thus could create straight fences (viewed from the top) with a non straight profile.

 

 

Special Actions

You can use Displace and Rotate buttons to change sector position and orientation. Note that cc-line will automatically be updated when any track sector orientation/position is modified.

You can also select any bank edge point and displace it as any vertex. If a bank edge point is selected, a red cross will appear on this vertex. Note that snapping also apply to .dat edge points.

 

When Displace mode is on, this little panel appears to give some editing options :

- Force 16 feet distance : Original tracks are using evenly 16 feet spaced sectors and so must be created custom tracks. Checking this box will force this behaviour to your manual change. Uncheck it if you need any radical displacement, in order to place sectors for a whole new layout for instance.

- To past/next sector : Forces 16 feet distance between selected sector and past/next sector.

 

In practice

Selecting Pitlane 0 sector and using "Force 16 feet distance" and "past sector" will automatically place this sector at the expected position and direction. Indeed first pitlane sector direction must always be the same as the track sector it relies on (hosting 86 command) and its edge must be coincident with track sector tarmac edge.

 

- Propagate changes : All the changes done to current sector are propagated to the rest of the track

 

 

The Add button gives 3 choices :

- Sector : Creates a new sector after selected one. This new sector will receive all the attributes of current sector.

- Multiple Sectors : Creates multiple sectors at once

- Kerbs : Creates a full kerb line

 

The Del button gives 4 choices :

- Selected Sector : Deletes current sector

- Multiple Sectors : Deletes consecutive sectors

- All Following Sectors : Deletes all sectors past selected one up to the end of the track

- Kerbs : Deletes one or all kerbs

 

If you decide to create multiple sectors, a new window will popup to let you choose settings for these new sectors:

- Quantity : quantity of sectors to create.

- Sector Angle : Angle for each single sector. 0 means straight, positive values will create a right curve and negative ones will create a left curve..

- Radius : sets radius size of the whole curve if sectors are not straight.

- Curve Angle : Angle of the whole curve composed of all the new sectors.

- First / Last sectors : These fields show first and last sector numbers.

 

- Start/End Height : Actual heights of first and last sectors. You can also replace these heights to your wish to create any ramp.

- Slope Interpolation : You have the choice between two interpolation algorithms for altitude of every sectors between the first and the last one. Linear will create a perfectly regular slope while cosine will smooth sectors. Cosine method has anyhow a drawback : it smooth altitudes as if track before and after the new sectors was flat. So it can only be used between the bottom of a hill and its top or between the top of the hill and its bottom.

 

- Keep existing track sectors : Unchecked by default, it means that new created sectors will replace actual sectors by the new ones. Checking this box will keep actual sectors and "insert" the new sectors between current sector and the next one. As sectors should always be linked together, using this option could make sectors overlapping.

 

- Create button: It will definitely create sectors and update cc-cars behaviour.

 

Note that new sectors are visually displayed as a red wireframe in the 3D preview to simplify fine tweaking and easily check layout that will be created.

 

If you decide to delete multiple sectors, the aside window will popup. It only requires the amount of sectors you want to delete and a hit on the Apply button will do the job.

 

If you select any sector but the initial one, the Add kerbs line will also be available.

If you choose to add kerbs, the aside window will appear to let you define settings for your new kerb.

- Length : the number of sector on which the kerb will spread on.

- Side : left or right side of the tarmac.

 

Then you can set all measures for the different points of the kerb profile for the first/last kerb sector and for the rest of the kerb. The whole new kerb is displayed in red in the 3D view to let you check if everything is like you want.

As game is storing raw integer values, it was better to avoid approximation and keep these values. Conversion in meters is shown at the bottom anyhow as soon as any value is clicked..

save and Load buttons allows to save all kerbs value into presets for future works.

Once you've done, click on Create Kerbs button to accept these settings.

 

If a kerb description already exists somewhere in the sectors where new kerb will be created, a window will popup to ask if you really want to delete old kerbs and create new ones or not.

If you choose to not delete old kerb, no new kerb will be created because kerbs can't overlap.

 

In practice

If you look closely to the list, you will see that in fact, a kerb command has been added to one sector more than length you have set. It's normal, that's also the way original tracks are made.

 

You can choose separately to delete a single kerb or all the kerbs of the track, using the Del button. If selected sector has kerbs on both sides, you will also be able to choose between removing left or right one.

 

Level 2 - Commands

Commands are puzzle pieces of GP4 Tracks.

GP4 Tracks are mainly made of thousands of commands, describing for each sector all its aspects.

So each sector is made of numerous commands telling road width, grid line mapping, bank width, distance of left and right fences and so on…
All these commands can’t be explained giving without detailing their many parameters, that’s why I will build up, as Addie Walti did before for GP2/3, a Command Library Annex at the end of this guide.

 

you can select any sector with mouse while you're at command level.

You can Add or delete commands using the Add/Del buttons above the list. If you add a command, the following window will pop-up :

 

 

 

- Command List : You can pick the exact type of command you want to create. You can only create one command type at a time.

- Command Arguments : These are the commands settings and values. If you want to create a specific command for a range of sectors, you can enter the setting once for all here.

- Display : For some command type, a drawing gives some additional information on commands meaning.

- Sectors Range : You can specify here to create a command only for current sector, or for a range of sectors.

- Delete Currently selected command allows to replace current command by the new one you set

Obviously, Create Command button will quit this window and create your command.

 

 

In practice

New command is by default the same as selected one.

 


5.3 EDITING CC-LINE

CC-line is the ideal trajectory followed by computer controlled cars and player's car when he uses keyboard as controller.

In GP4, cc-line is defined for each sector by a position (on the sector width) and a direction (where cc-line points to).

As in practice, things are not that easy, some little corrections can be set too on some sectors when needed (It's not our matter here).

In reality, things are speeded up as you won't have to specify one position/direction for every sector but only for whole sections (bunch of many sectors) where cc-line has the same behaviour (straight or constant curvature). And all these sections will be placed one after the other to build the complete cc-line.

 

So basically cc-line as you will edit it will be defined by sections with following data: a length, the number of sectors in that section and a radius, the radius of the curve or 0 if it's a straight.

 

Where things can go wrong

First particularity : cc-line is covering more sectors than track has

I'm not sure to know why they did it this way but the end of a cc-line is overwriting its beginning. So passed starting line, cars are following ending of the cc-line up to its end where they switch back to the actual cc-line on this sector.

 

Second particularity : There's no CC-line in pitlane.

When you enter pitlane, car is simply taken in hands by computer following the middle of pitlane tarmac.

 

Third particularity : CC-line depends to cc-line

The way CC-line is built in itself needs accurate values because every section rely on the section before which rely on section before and this up to initial section. This means that if you change a section anywhere on the cc-line, all following cc-line sections will relay the changes and this could lead to huge deformations at end of the cc-line.

 

Fourth Particularity : CC-line is based on track sectors

CC-line is build on track sectors and thus you should be very careful when designing new tracks to keep sectors at regular intervals (usually. 16 feet) and with smooth orientation (sector's "arms" should always be close to be orthogonal to track direction).

 

Fifth Particularity : CC-Line is not all

CC-Line settings are not the only settings ruling cc-cars behaviour: cc-cars direction (set in every track and pitlane sectors) plays a very important role. Thus GP4 Builder provides a simple and effective way to fix cc-cars incoherency thanks to a single feature : Fix cc-cars behaviour. Be sure to apply this BEFORE working on cc-line as It will fix any changes made to sectors if some sector's altitude have been changed.

To have a visual sight on what's happening, you can display cc-cars direction in GP4 Builder to see where cars are not pointed toward the right direction and check the direction again after applying the fix.

 

About testing cc-lines

Here are two advice I can give to you :

- CC-Line is computed once you clicked on "PLAY" on the main menu, just before the weather menu appears. So if your game is crashing before you can see the weather menu, there are big chances it's due to cc-line. And at reverse, if you can see weather menu, you have big chances your cc-line is working.

- If game crashes there, game can freeze and freeze Windows with it, leaving only one solution : a hardware reboot. For this reason I strongly advice you to test your new cc-line by running GP4 in windowed mode. To do so, use the following lines in f1graphics.cfg file :

1                      ; f1graphics.cfg controls all settings (default 0)

1                      ; [RELEASE] Run in a window

 

CC-Lines and .ccl files

The whole cc-line can be exported to a .ccl file that will store all the cc-line sections and their settings.

.ccl files can also be imported in GP4 Builder. In that case, current cc-line will be replaced by the one stored in the .ccl file.

As cc-line can't be swapped between tracks, a warning message will appear if the .ccl and the currently opened .dat files have not the same name to ask user if he really wants to import the cc-line stored in the .ccl file.

If you imported a wrong cc-line for your track, simply close GP4 Builder without saving. This way wrong cc-line won't be saved.

 

 

Level 0 - Root

The “items” value shows the number of cc-line sections in the track.

A double-click on the "CC-Line" line will refresh list with level1 content.


Level 1 - CC-Lines

At level1, the edit list displays all the cc-line sections and their parameters defined for this track.

 

There are three types of cc-line sections :

The first section called initial cc-line section which have some special arguments and 2 regular section types, one made of 1 curve and the complex one made of 2 curves (these sections also have a special mark : ** to make them more noticeable).

 

Note that you can directly select any ccline section directly in the 3D view.

Initial cc-line section

When the initial section line is selected, a popup window will be displayed with the following data:

- Prev and Next buttons are switching selection to the previous or the next section.

- Length : Length in sectors of this cc-line section.
- Start Dfc : Specifies position of the cc-line on the width of the track. A negative value means the cc-line will start on the left side of the tarmac, otherwise it will start on the right. Here, 1024 units = 16 feet (4.87m).

- Angle : Starting angle of the cc-line but this value is not used by GP4. As starting angle, GP4 uses AngleZ value of the initial Track Sector.

- ShiftX / ShiftAngle : Defines a little correction of the cc-line. If radius is 0 (straight segment), shiftangle is a rotation value that is added to initial track sector AngleZ (real starting angle of the cc-line) else it's a more subtle value that is still unknown yet perfectly.
- Radius : Defines radius size of the curve. 0 means that this section is a straight one. Negative values set a left curve while positives defines a right curve.

regular sections

Selecting any section but the initial one gives another kind of settings :

- Prev and Next buttons are switching selection to the previous or the next section.

- Length : Length in sectors of the cc-line section.
- Shift : Offset of straight line before the beginning of the curve (and its conversion in metres).

- Start/End Sector : Track sectors where cc-line starts and ends (Indicative information only).


- Radius: Sections can have 1(simple section) or 2(complex sections) radiuses. In both cases, a radius of 0 means section is straight, a negative values set a left curve and positive ones define a right curve. If a non-nul radius value is set, section will be an ellipsoid defined by 2 radius (in millimetres). If only one radius is used, section will then have the shape of part of a circle.
- Angle : Angle value is computed from radius and length values. It’s the angle of the full curve.

 

 

5.4 EDITING CAMERAS

Each track has a set of TV cameras that will follow the action if you engage the director's mode in GP4. For this reason, cameras are chained, as we will see below.

Track cameras and .tcm files

All track cameras can be exported to a single .tcm file, using the Export Track Cameras menu.

.tcm files can also be imported to replace existing ones using the Import Track Cameras menu.

Level 0 - Root

Same as for other choices, we will assume again you now want to edit cameras.

The “items” value shows the number of cameras defined for this track. this number is important because for now, you can't create more cameras than the track originally count.

Double-clicking on the Cameras line will lead to level1.

 

Once in the camera tab, you will see that new 3D lines appear in the 3D view. Diamonds are visualizing position of each camera. The selected camera also have two black lines and one red line. Red line is poiting toward camera position sector. Black lines are pointing toward first and last sectors viewed by this camera.

Level 1 - Cameras

List now displays every camera and its major settings :

Sector is the sector where the camera is placed.
From is the sector where camera start to follow the cars.
To is the sector where camera stops following the cars.

Once you came at this level or clicked on a camera, Main view camera will instantly reproduce selected track camera animation, following an invisible car running at a specified speed.

You can delete cameras or add up to a total of 32 cameras but beware, if you exceed original camera count, cars could become invisible with latest cameras ingame. In that case, you might need to change .gp4 PVS Camera values.

 

You can enable animation if you want, using the Animate camera button and view first and last shot of this camera with the two other buttons on the below of the window.

You can view around with usual mouse center (wheel) button.

 

In practice

Note that displacing your point of view in GP4 Builder won't displace the camera as in my other tool named TeamEditor. Due to the way camera positions are defined, this feature can't be done so far.

 

When you select a camera, the Camera properties window pops-up with following content :

- Position (Sector): Sector hosting the camera.
- Distance from center : -32768 to 32767 value. Negative values means camera is on the left side of the road, positives means it is on the right. Conversion in meters is shown for information.
- Camera Altitude : 0 to 65535 value. Conversion in meters is shown for info.

- View car from sector : Sector where camera will start to follow cars.
- View car to sector : Last sector where camera will follow the cars.
- View Behind : GP3 Parameter, untested for GP4.
- View ahead : GP3 Parameter, untested for GP4.
- Zoom In : GP3 Parameter, untested for GP4.
- Zoom Adjust : GP3 Parameter, untested for GP4.
- Zoom : 0 to 65535 value. Set Camera zoom factor. Unknown unit.

 

- Unknown Setting : These values still need to be understood.

 

First Shot and Last Shot buttons simply display track camera view of the first and last sector it is covering.

Animate will display a 3D preview of the camera following the cc-line or track center if no cc-line is present for these sectors.

Prev and Next buttons are switching selection to the previous or the next sector.

 

 

 

 6 .GP4 FILE FORMAT

 

This format is the second most important with .dat one when considering GP4 tracks.

Every track has one .gp4 file named Trackname2001.gp4 file (with trackname replaced by the real track name) stored in the corresponding wad file.
.gp4 files contain the whole 3D description of any GP4 object, from a single low-poly squared wheel to a fully detailed track. But these description are only creating visual objects, no physical properties are stored in the .gp4. The physical properties are stored in the .dat file, as described in the .dat chapter.

 

In practice

GP4 Builder can read every .GP4 files but one : the flashlights because flashlights are using another form of 3D description than usual .gp4 files.

 

Multiple files edition

.gp4 file format are handled a bit differently than other formats by GP4 Builder.

Indeed if you open a .gp4 file, GP4Builder will seek for any other file format present in the same folder and open them too.

As .dat have different names than tracks, GP4 builder will search for 2 names : original s1ctxx.dat first (for original tracks) and if it fails, for a .dat with the same name as the track (for custom tracks)

 

How to display textures in the 3D View

As I wrote in the introduction of this guide, GP4Builder doesn't read .tex files used by the game directly. So all you have to do is to convert .tex files to .tga and place them in the same folder as your .gp4 file. You will find every details here.

 

How to display Jip Mapping in the 3D View

You can also display jip mappings in 3D View. All you have to do is to place the given GRIDLINE.jip or GRIDLEFT.jip file in the same folder as your .gp4 file. Then, when you will open the .gp4 file, the jip file will also be loaded. Note that if track jip mapping is very close to the game counterpart, pitlane jip mapping can still give completely wrong results due to a beta state.

 

6.1 HIERARCHY

.gp4 files have the deepest structure of all GP4 files. They have a 6 levels hierarchy for scenes and could also have two additional sections for tracks descriptions :

Scenes

Level

Left panel’s list

Popup window

Special Action

Level 0

Sections

  Fix parts link, Scale, Invert

Level 1

Scenes

  Add/Del/Move/Rotate Scene, Fix parts link, Invert, Add Track from Dat

Level 2

Objects

Object's attributes

Move, Rotate, Scale, Add, Del, Copy,

Align, Move to scene, Duplicate, Group, Import Object, Export Object, Invert Coordinates/Normals/faces creation, Compute Normals, Unify ground Normals, Fix green object, Fix parts link. If both .gp4 and .dat are opened : Add Fences, Add Track from Dat, Vertex Painting

Level 3

Parts

Surface properties

Move/Rotate/Scale, Add Part, Del Part, Add/Del Texture, Duplicate/Ungroup, Invert Normals/U&V Mapping/Faces creation, Compute Normals, Unify Ground normals, Weld, Vertex Painting

Level 4

Faces

 

Del face, Detach/Subdivide Face, Invert Normals/U&V mapping/Faces creation, Vertex Painting

Level 5

Vertices

Vertices' data

Add/Del face, Move, Repeat Move


Visibility Sets (tracks only)

Level

Left panel’s list

Popup window

Special Action

Level 0

Sections

   

Level 1

Visibility Sets

Description (Disabled)

Add PVS, Del PVS


Sunlight (tracks only)

Level

Left panel’s list

Popup window

Special Action

Level 0

Sections

   

Level 1

Lights

Light's parameters

 

 

 

6.2 EDITING SCENES


Level 0 - Root

Level0 gives access to every sections of the file. It's the scenes section we will focus on in this chapter.

The count value is the number of scenes.

Note that only tracks have Vertex Shaders and Sunlight sections, all other files have only the Scenes section.

Double clicking on the "Scenes" line will lead to level1 but you can also click in the 3d view to directly select an object. In this last case, list will be refresh to display level2 content.

 

Fix parts to object links option is available in Action menu, if you want to be sure your .gp4 file is safe. It can fix some strange ingame object disparitions that no other solution (change face order, invert normals, change distance settings) could fix.

You can also scale or mirror the whole track at this level. Anyway, this feature is not optimized yet and could be particularly slow as every single object is scaled at the same time.


Level 1 - Scenes

At this level, we have the list of all the scenes, the number of objects they are made of and if they are visible or not.

You can check the Show selected scene only option to force the 3d view to only display currently selected scene.

You can add or delete a scene with the Add/Del buttons. Note that if you add a new scene, it will contain a dummy object because a scene can't be empty.

Adding track from .dat will create a new scene and convert the .dat in .gp4 objects as described at level2 but no dummy object will be created.

You can also displace a whole scene anywhere in the world or rotate/mirror this scene.

As for level0, the fix parts to objects link is available and you can click in the 3D view to select an object and going to level2. You can also double-click on a scene line to access this level.

 

The Scene window allows to edit :

- Scene name (.gpb files only)

- Visibility. Each scene could be checked on or off for visibility. Use the Show all/none button to reset visibility of all scenes.

 

Note that you can also edit Visibility for each and every scenes at once using the little button in the Display Tool Bar.


Level 2 - Objects

Here comes editing time.

 

At level2, t he edit list displays all objects’ names and the number of parts they are made of.

Once you come at this level or click on an object name, camera will instantly be placed front to one of the object vertex (apart if you already engaged the Lock Cam button), whole object will be highlighted using the highlight color and if file opened is a track, a circle in highlight color will also be displayed around object to represent clipping distance.

You can change Vertex painting of a whole object using the top menu or the contextual menu.

 

Objects can be displaced, rotated or scaled engaging the corresponding button from the top panel.

You can also delete objects thanks to the Del button.

Once again, you can click once in the 3D view to select any object and this time, you can also double-click on an object to select face under the mouse cursor. Obviously, left list will be refreshed with level 4 content.

 

In practice

Mouse direct selection is based on the proximity of the object's center (as given in Object's properties window). So clicking around the center of the object will always give better results than clicking on a very far edge.

 

Object Attributes window

Once at level2, the “Object’s Attributes” window will appear, giving the following data about selected object :

 

Name

- Class : Object's class sets some unknown object properties (like reflection on wet tarmac or visibility).

 

Only a few properties are known about classes but here are some interesting ones :
- CROWD class used with the word "Full" in the object name as "CROWD_Fullstand" will display object only for race events and not for free races. It is used originally for crowd which is not present during free races.

- HIDDEN class is not a GP4 class but a GP4 Builder one used to mask this object in GP4 Builder. It also set visibility to 1m, which makes it barely visible in game.
- NBUILD class auto generate objects wet reflection.

- REFLECT class is used to make objects appearing through .bin surfaces in wet conditions. Objects with this class are usualy a mirrored copy of the main object. It's a cheap and accurate way to add reflection when automatic wet mirrored reflections are using CPU and could lead to incorrect display.

- SHADOW class will transform the surface in a vertical well of shadow following shape of the object and texture of this one. This means that any car that will travel above or under this object will receive a vertical shadow from it.

 

Note that Classes starting with letter "F" (for far) like FBUILD, FLAND, FTREE and FSTAND never receive automatic mirrored reflections.

All the classes could also be triggered by automatic ingame settings or manual f1graphics.cfg file to be displayed or hidden class per class.

 

A special class has been added to GP4 Builder to hide objects, it's the HIDDEN class. Once you selected that class for an object, it won't appear anymore in the 3D View and its clipping will be set to 1m. Ingame, such objects should become invisible with this setting but some as the bridges that could quickly glitch when car run just below its center.

 

- Name : Name of the object.

 

In practice

If tracks objects could have almost any name, car objects needs to have the same names as the original cars and any mistype could lead to a crash when GP4 will try to read this car .gp4 file..

Also be sure not to use any name with "flag" in it or GP4 will believe it's an animated flag and won't display your object correctly.



Position

- Centre : Object 3D center. Changing these values will displace the object in the 3D view. This position is also used by GP4 Builder as the center for rotations.

You can copy the object center 3 coordinates in 1 click by hitting the little icon on the right and when you will have selected another object, paste the coordinates to this new object hitting the same icon again.

 

Bounds

- Base : Absolute position in the scene. The difference with Center (upper) is that this point is at the lowest vertex altitude of the object. With Centre and Radius, these parameters are used by GP4 to tell if that object is visible or not. In order to be sure the object won't collapse in game, you can hit the Compute Coordinates button (see a few lines below). Base is also used as an altitude value to set the mirror plane in which the object will be reflected automatically under rain. If Show Wet Mirror Plane button is engaged, a semi-transparent white square is displayed in the 3D view to represent the mirror plane.

 

 

In practice

If an object as a weird reflexion in water, it's more probably due to incorrect Base coordinates.

 

In practice

As base is used as transformation center, you can displace it temporary to your will to move/scale an object using another center than the predefined one.


- Bounding Box : Here are defined the 2 diagonally opposite corners of a bounding box. This bounding box is used for object visibility. As Global position, if object is collapsing, be sure to hit the Update Coords. button.
- Radius : See Global Position text. Radius of the smallest sphere centered on object center and englobing all the vertices of this object.
- Update Coords Button : This button Automatically sets Global Position, Centre, Radius and Bounding Box coordinates based on all object's vertices.

 

Clipping / Visibility

- Flag : Flag sets different properties for an object. The two recognized ones so far are automatic reflection and billboarding.

- Wet reflection : Sets Flag value in order for the game to create an automatic reflection for this object. This reflection is using Base position as the height of a virtual mirror plane that would reflect the object.

 

In practice

Objects with a class starting with letter "F" (for far) like FBUILD, FLAND, FTREE and FSTAND never receive automatic mirrored reflections.

- Billboard : Sets flag value to make this object always "facing" player's view

- Camera : Sets from which cameras, this object will be visible. 0 is the more suitable as it always display the object. Some performance hit might maybe occur though but it's not clear yet.

- Clipping Distance : Sets object's clipping distance. If both Best Lod ID and Lod ID value is -1, this distance is the maximum distance you can view an object. Going 1m further, the object will not be displayed anymore. If some lod value is used, Lod ID will be used past this distance (in metres). If a 0 distance value is used object will always be visible. In GP4 Builder, a red ring is displayed around selected object to represent the circle of sight from where object can be seen.

 

Internal Links

Looks like some bone or rigging information but all values are always set to -1.

 

Matrices

- Object’s Position : Still unknown.
- Unknown : it says what it is.

 

LOD Settings

- Object ID : ID of current object
- Best Lod ID : If object lods are used, sets best object ID. If no lods are used, this value is set to -1.
- Next Lod ID : If object lods are used, this value sets Object ID used past clipping distance. if value is -1 then no object will be drawn past clipping distance.

 

In practice

objects lods was surely an experimentation made by developers but it's really a nightmare to use for a whole track made of thousands of objects. So my best advice for any new track is to use -1 setting for Best lod ID and LOD ID and to only play with Distance to prevent game from displaying out of view objects when they are not needed.

 

Visibility

- Billboard / Properties : Unknown setting yet.
- Unk2 : Unknown.

 

Add Button

The Add button lets you add new objects to your scene :

- New object : Gives choice among a few basic objects to create

- Shadows : Creates a shadow object of currently selected object

- Fences : Gives control over new ribbons created from the .dat geometry

- Track from .dat : Completely converts the .dat geometry into .gp4 objects

 

New Object

Selecting this line will display aside window with the following options :

 

Object Properties

- Name : Name of the new object. By default, name is NEW_Objectxx, xx being increased at each new object created. Beware : Do not use any name with "flag" in it or GP4 will believe it's an animated flag and won't display your object correctly.
- Class : Each object has to belong to one predefined class. Each class has internal properties but they are still mostly unknown (but a few detailed below).
- Type : Type of the object. 5 Types are existing : Horizontal surface, Vertical Surface , Crossed faces , Box and Sphere
- Sides : Available for prism and sphere objects, sets the number of sides of the object.

 

Aspect

- Texture : Texture that will be applied to created object
- Material : Material that will be set to new object..

 

Size and Position

- Size : Object's size in meters. For prisms, X value is used as radius size.
- Position : Object's global position (ground center). Coordinates are in meters.

Once you set all the new object's properties, you can click on Create button to create the object. Camera is instantly placed face to the object (apart if you fixed camera position).

 

 

New Shadows

This feature greatly help to create shadows for track objects, taking in account track Sun Direction to cast an accurate shadow of the object on a flat plane.

Shadow Type :

- Selecting "2D" will create a new flat rectangular object and a new texture in the same folder as your .gp4 file named like the selected object but with "_shadow.tga" at the end of the name. The advantage of this technic is that you can create precise and cheap on processor occupancy shadows but it only draws filled shadows, even if original object texture is semi transparent. If a texture already exists with the same name, you can choose to overwrite the existing one or to cancel shadow creation.

- Selecting "3D" will create a projected on a flat plane copy of the object, keeping original texture mapping. The advantage of this method is that it keeps texture mapping, so you can quickly re apply semi-transparent shadows to match object semi-transparent textures and use a full opaque shadow for standard opaque texture. Matter is that such shadows is using as Processor occupancy as the original object, so it's better to keep this method for very rare cases.

 

2D Texture Settings :

Width and Height : In the case you were using 2D Shadows, you can set sizes of the shadow texture. You can

Opacity : You can specify an opacity value for the shadow alpha layer. Value goes from 0 (transparent) to 255 (opaque).

 

In practice

You can quickly create final 3D semi transparent shadow textures by opening the original texture and filling the whole image in black. As you didn't touch the alpha layer that manages transparency, you instantly get a nice semi-transparent shadow texture.

 

In practice

The flat plane on which shadow is projected is placed at object's Z Base position. You can thus change this value to compute shadows at any height. It can be useful to cast shadow of objects that have no link (pillar, arm...) to the ground and thus that have an original base position above the ground.

 

 

New fences

If you opened both .gp4 and .dat files, you will be able to choose to add new fences.

 

Fences Builder window is able to create stripes around the track following banks edges, as does original fences.

 

Here are details about the controls :

Create for : You can choose to create fence for track or pitlane.

 

In practice

In pitlane, fences won't be created if no bank command exists. Thus if you want to create fences for these sectors, simply create banks command with a fence height of 0.

Side : Lets you choose to create stripes for left, right or both sides of the track. In that case, right side stripe shape is mirrored from left side one.

Type : You can choose between 3 types of fence : the standard fence, a reflected version of the fence for wet reflection or shadows of the fence (based on .gp4 Sun settings).

Sectors Range : by default, stripe will be created for the whole track/pitlane length but you can also specify a sector range if you need to create smaller stripes.

 

Wall Options

- Wall Thickness : Thickness of the fence. If it set to 0 the designed set of stripes will be created. Set any other value to create a wall. Only stripe one will be used and top, bottom stripes will be automatically generated (and starting/end caps if wall is not running the wall track long) of a full wall. (Note that caps are not created at fence gates in this version)

- Flat top : If checked, wall top will stay horizontal whatever the wall bending.

 

Mapping Options

- Force 16 feet V mapping : If checked, a basic mapping will be applied to the created fence, repeating the texture every 16 feet.

- Global U mapping : By default, one texture is applyed per sector length. This setting act as a scale to make texture applied differently along track direction. For example, set it to 2 to make texture applied twice per sector.

 

Stripe Settings

- Name : you can use any significant name for your stripe. When object will be created, some additional extension will be added at the end of the name to make it unique.

- Texture : Texture that will be applied to created stripe. You can also click on the Texture Browser button to visually select your texture

- Material : Material that will be applied to created fence. Diffuse, Emmisive and 2 sided status for this material are also disaplyed for information.

 

- Fence Head/Foot : These 2 panels let you specify the 2 extremities of your new fence. Both panel have the same settings:

 

Reference : Fences extreme vertices are placed relative to original fence position. You can choose to define your fence compared to original fence foot or to original fence head.

Width offset : Horizontal distance between reference points and the new fence vertices Positive values will lead the fence toward track tarmac while negative ones will go behind original rail.

Z Offset : Vertical distance between reference points and the new fence vertices

V Mapping : Texture V mapping coordinate that will be applied to fence vertices. Please keep in mind that in texture mapping, 0 means the top of the texture and 1 its bottom.

 

All your changes will be automatically written in the right list but also graphically displayed in the 3D View. Note that you can edit any stripe values at any time by simply selecting this stripe in the list and editing its values in the left panels.

 

Add : Add another stripe

Del : delete selected stripe

 

Create Fences button will create your new fence object in the current scene.

 

Save : Saves current set of stripes in .txt file

Load : Loads a profile of stripes created before.

 

 

New Track from .dat

If you opened both .gp4 and .dat files, clicking on the Add button will let you choose to add Track from .dat.

 

This option will convert the whole .dat file to .gp4 3D objects.

 

- Gobal Settings : You have the choice between converting track or pitlane, left or right side and which portion of the track to convert.

 

- Objects Setting : Gives the choice over the exact objects you want to create and the texture that will be automatically applied to them. if you click on any texture box, corresponding texture will appear in the preview window in order you could check your choice. Note that first and last portion are not used for pitlane (but tarmac), kerbs and cc-line that will always be created for the whole track and/or pitlane. Also note that 2 new materials will be created : a 2 sided one for walls named FencesMat and a single side one named TrackMat for all the other objects.

 

Tarmac covers side lines : All original track but Monaco have side lines separated from tarmac. This options will extend tarmac width to close the gap left by side lines.

Uniform Verges/Banks Mapping : By default, texture coordinates are set to stretch along the whole width (verge to rail distance) of banks but banks could be very wide sometimes. Checking this option will repeat texture along bank width to keep unstretched textures.

 

In practice

the trick behind uniform mapping feature is to repeat texture every 16 feet. 16 feet being also the length of each sector, ground squared texture seems unstretched.

Create Reflected walls : Checked by default, it will create mirrored walls that will be seen in wet weather conditions.

CC-Line width : You can choose to keep default (0.28m) value or use any custom one to create your own visual cc-line.

 

All the new track objects will of course follow the HD subdivisions rules as set in Preferences to let you exploit the best graphics for your track whatever the physical limitations.

 

You can also use Save and Load button to load or save presets for a future work. You can choose either to save textures or all the settings.

 

 

Level 3 - Parts

At level 3 are listed all the parts and the number of faces they are made of along with a thumbnail of associated texture (if textures are present)

As for objects, camera will be placed instantly face to selected part and this part will be highlighted.

Parts can be displaced, rotated or scaled when engaging the corresponding button from the top panel and parts can also be deleted with the Del button.

Confounded vertices of the part can be welded into single vertices to keep vertices count low or the opposite : parts shared vertices can be unwelded to independent vertices.

You can change Vertex painting of the whole part by using the top menu or the contextual menu.

 

Note that you can Add a new part, the same way as you can add new object at object level.

 

Name (.gpb files only) : Custom part name

 

Texture
- Texture List : Texture currently applied to this part is selected but you can choose any texture to apply this part in the dropdown list. Selected texture is displayed in the panel with its current pixel dimensions. You can also open Texture Browser by clicking the Texture Browser button. Texture Browser displays most recently selected textures on the first row and all other textures below. Note that you can right click on any texture to toggle between alpha and RGB layers display..

 


- Add : Adds a new texture to current texture list and applies this texture to this part.
- Del : Deletes selected texture. Be sure to use the search tab and the by texture search to be sure no other object is using this texture anymore before deleting a texture.

- Texture Preview : A thumbnail of the texture. If you specified a texture edition program, you can double click the thumbnail to open the texture in this program.

- Toggle Alpha/RGB : This button toggles between RGB layer and alpha layer. Note that you can also right click on the texture to toggle alpha.

- Texture Size : actual texture size in pixels

- Scale : When it is possible to compute these values, it gives the size of each texture pixel when mapped on the geometry. (On the example on the right, we can see that each texture pixel is measuring 16cm in width and 2cm in height on the 3D geometry). The rightmost value is a median value (still in beta state).

 

Mapping

- Quick Edit : The four buttons are simple shortcuts to common mapping operations : horizontal flip, vertical flip, left rotation and right rotation.

- Mouse Realtime Editing : Enable this button then choose Displace, Rotate or Scale menu buttons to allow realtime mouse mapping editing. you can also limit editing to selected axis. Z axis is unused but for scaling where it keeps texture ratio while scaling it.

- Manual mapping : the right part of this panels allows simple but effective mapping changes

By selecting Displace, texture will slide on the object along U and V axes (remind that U means texture horizontal axis from left to right and V, texture vertical axis from top to bottom).

Scale selection will multiply or divide the texture on the same part surface.

Values are unbound but can be understand as percent, 0 means 0%, 1 means 100%.

So a displacement of U=0.5 will displace texture on the texture horizontal axis by half its width.

A scale of U=0.5 will simply squeeze 2 textures in the width of the previous unique one.

 

Material : Material currently applied to this part and its properties. Note that all properties shown in this window can't be edited. If you want to edit them, just click on the Edit button to open the Material Editor window. All these properties are described in the Material editor chapter but basically, you have to check that diffuse color is white (apart if object is a tree) and that 2 sided state is what it should be for this texture (usually, semi-transparent textures need 2 sided material when opaque ones only need 1 side ones).

 

Surface
- Surface behaviour : Displays actual behaviour for all the faces of this part. If different behaviours have been applied to some faces of this part, the "custom" behaviour will apply. Simply select another behaviour and all the faces will receive this new behaviour. The Change button directly call for the Change Behaviour window.

 

In practice

You can graphically display behaviours for the whole track by disabling textures (F2 shortcut)



Level 4 - Faces

Level4 presents the list of all the faces compounding selected part and the behaviour currently set for each face.

Faces can be displaced along global axis or along local axis to force displacement along faces edges.

Faces can be detached to new or existing part using the Detach feature. They can also be subdivided from the Edit menu. Even if it's less useful than at Parts level, you can invert U or V mapping coordinates.

You can also directly click on faces in the 3D view to select one or several faces (using usual Ctrl and Shift keys) and if you want to edit vertices, just double-click in the face close to the vertex to edit and list will be refreshed with level 5 content.

Confounded vertices of the face can be welded into single vertices or the opposite : face shared vertices can be unwelded to independent vertices.

You can change Vertex painting of faces using the top menu or the contextual menu.

 

 

Level 5 - Vertices

Each face is composed of 3 vertices, so will always see only 3 vertices in the level5 list.

Selecting a vertex will instantly display a small (size can be changed) yellow (color can be changed) cross at vertex position in the OpenGL preview to show which vertex is selected.

Vertices can be displaced when engaging the corresponding button from the top panel. This move can also be repeated to other vertices.

Local axis can be enabled to force displacement along faces edges.

Even at this level, you can still click on another face in the 3D view to select another vertex (as long as it belongs to the same object).

Once you chose a vertex, you can choose to add a new face using this vertex. To do that, simply click the Add Button (or make a right click) and choose New Face.

Confounded vertices can be welded in a single vertex or the opposite : one shared vertex can be unwelded to independent vertices.

You can browse through faces with left and right arrows.

 

You can also quickly enable/disable snapping and set its range of application from the Snap tool bar.

 

When a vertex is selected, a popup window appears showing vertex’ properties :

- Position coordinates : Vertex’ world position.

The copy/paste button can help copying all coordinates at once. To use it, simply select a vertex, hit the appropriate button to copy position/normal or mapping coordinates, then select target vertex and hit again the appropriate button to paste coordinates.
- Normal coordinates : Vertex’ normal vector.
- UVMap 1 coordinates : U (horizontal, from left) and V (vertical from top) diffuse texture coordinates. These coordinates are set between 0 and 1, 1 meaning 100% of the dimension of the texture.
As % values are not very expressive, GP4 Builder also displays pixels values, computed from the .tga texture if it exists, in the same folder as the opened .gp4 file.

Note that by clicking and dragging in both U and V boxes, you can dynamically change mapping in realtime in the 3D view. Click and drag the value with an horizontal mouse move to increase or reduce the value.

Lock button : enables or disables realtime mapping changes.
- EnvMap 2 & 3 : These are EnvMaps coordinates used for carlightmap textures for non-tracks files. These data can be edited if they exist in a file.
- Colors : Diffuse and Specular vertex colors and their alpha values. These colors are totally wrong with objects imported from Zanoza Z-Modeler but you can fix them through the action menu.



6.3 EDITING VISIBILITY SETS

Level 0 - Root

PVS could stand for Primitive Vertex Shader or for Potential Visible Sets. Most probable answer is the second which is an internal way to define visibility for some areas of a global scene.

Level 0 list allows you to choose to edit visibility sets. The count value is the number of visibility sets in the current file.



Level 1 - Visibility Sets

Here you can preview all visibility sets raw data.

 

Main

- Index : It's the PVS index. Value is given for information though.

- Show car up to camera : This value sets the last camera from which car will be visible. Note that highest possible value is 32.

 

In practice

If when you added some cameras to your track, cars were invisible from these latest cameras, it might come from this setting.

- Arg2 : Unknown

 

Matrix

I have to admit that I can’t understand how this works but data used as floating values are quite clearly describing a 4*4 matrix.

If someone has some knowledge on this, I would be glad to better understand how this works.

 

Note that you can add or delete PVS. This is not advisable thought as long as we don't know the use of these settings.

 

 

6.4 EDITING SUNLIGHT

Level 0 - Root

If .gp4 file opened is a track, level0 will offer you to edit the Sunlight. The count value is the number of lights which is usually of 1 for tracks and of 0 for any other .gp4 file.
Changing the number of lights is not possible because GP4 can’t handle more than one light at a time.

 

Level 1 - Sunlight

List displays light name and the “Light Data” popup window.

When you enter in the Sun section, light on the track will instantly change according to Sun direction values and will be refreshed in realtime when any direction value will be changed.

 

The content of the Light Data window is as follow :

- Name : Here you can change light’s name (not sure it has any interest but who knows…).
- Type : DirectX type of light. DirectX support many light types but GP4 seems to only handle type 0 one that looks to be a directional light, at infinite position and thus projecting parallel rays.
- Row 1 : These values might be used for some sun properties but they are still unknown.
- Row 2 : These values might be used for some sun properties but they are still unknown.
- Direction : This is the direction vector, it describes the direction of parallel sun rays. X and Y direction can use any value but Z can only use values UNDER -0.5 (from -0.5 to -infinite).
Examples :
Using a sun direction of 0,0,-1 will create top-down rays meaning that sun comes from above.
Using a sun direction of 1,0,-1 will create 45° rays pointed to X+ axis.
- Row 4 : I think that these values were used initially to set position of the sun but that developers finally abandon that way and rather used infinite light source only needing a direction.

 

 

 

 

 7 .GPB FILE FORMAT

 

This file format has been created to enhance .gp4 and .dat file formats. Because both these formats have been created for the game, they can't store more data than the game creators planned for them. But GP4Builder now allows a lot of changes and settings that can't be saved in these formats. Thus .gpb file format was created.

Basically, .gpb files store an enhanced version of a single .gp4 file. And moreover, If this .gp4 is a track and that the .dat was opened too, the .gpb will also store an enhanced version of the .dat.

 

Concerning edition, opening a .gpb is like opening both a .gp4 (and its linked .dat if present) so all the details from .gp4 and .dat sections of this guide applies.

But it also provides some enhancements listed below :

.gp4 enhancements

- Meshes are not saved as in a regular .gp4 file and thus might be read faster than a .gp4 file

- Scene names can be edited

- Parts names can be edited

- All viewport camera settings are saved in the file

.dat enhancements

- Per sector HD settings can be edited

- Global HD settings are saved in the file (Preferences sector subdivision 1 and 2)

 

 

If you work with .gpb files and want to release your work, just open your .gpb file and go to "file menu" and pick "save as". Choose .gp4 file format in the extension list and GP4Builder will create the corresponding .gp4 file (and .dat file if your .gpb stores one).

 

Note that this format is still young but provides enough flexibility to handle a lot of other features in the future. It was designed this way at least.

 

 

 ANNEX I - Commands Library

 

DAT files are describing tracks as a succession of sectors and each sector is described by many commands.
These commands are very numerous because they all describe a precise part of a sector as the width of the track or the distance from bound of the tarmac to side fences.

Each command has a given number of arguments as shown in the table below :

 

cmd

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

0x80

1

1

1

0

0

2

0

0

1

1

5

5

1

1

2

2

0x90

1

1

2

 

1

1

0

0

1

1

2

0

6

 

0

0

0xA0

0

0

0

0

0

 

2

2

0

1

3

2

4

2

1

2

0xB0

3

1

1

 

2

2

1

1

3

 

2

 

 

2

2

2

0xC0

1

1

2

2

3

7/6

1

2

7

8

8

 

2

3

1

1

0xD0

2

0

1

1

0

1

0

0

0

1

 

0

1

2

3

3

0xE0

3

1

1

2

2

2

2

12

9

9

1

1

1

1

20

4

0xF0

6

0

4

4

7

7

6

8

 

 

 

 

 

 

 

 



A1.1 COMMANDS

 

I will only describe in this document commands that have been fully or at least partially checked with GP4 and that have arguments really working as they suppose to do.

Most of the commands descriptions credits must go to Addie Walti who did the huge work of trying every of these commands for GP3 (and maybe GP2) and even if not all these commands are still used in GP4 nowadays, his database was very precious to build that GP4 listing.


0086 – Connect Pitlane Start

This command with no argument is declared in the track sector in which pitlane starts.

 

 

0087 – Connect Pitlane End

This command with no argument is declared in the track sector in which pitlane ends.


0088 – Left Pits Start

This command is declared in the pitlane sector where pits (garage) area starts. This command is only used if garages are on the left side of the pitlane. If garages are on the right side, 0089 command is used instead.

1 Argument:

- Unused : This argument seems to always be 16.

 

 

0089 – Right Pits Start

This command is declared in the pitlane sector where pits (garage) area starts. This command is only used if garages are on the right side of the pitlane. If garages are on the left side, 0088 command is used instead.

1 Argument:

- Unused : This argument seems to always be 16.

 

 

0096 – Speed Limiter On

This command have no argument and is declared in the pitlane sector where speed limiter is activated.

 

 

0097 – Speed Limiter Off

This command have no argument and is declared in the pitlane sector where speed limiter is deactivated. This command MUST be placed after the Pits End (F1) command and before Pit Lane Fences End (A0) command.

 

 

009B – Pit Lane Start

This command have no argument and is declared in the pitlane sector where pit lane starts to leave track.

 

 

009E – Pit Lane End

This command have no argument and is declared in the pitlane sector where pit lane completely rejoins the track.

 

 

009F – Pit Lane Fences Begin

This command have no argument and is declared in the pitlane sector where pit lane starts to have fences. No jip mapping will be displayed before this command.

 

 

00A0 – Pit Lane Fences End

This command have no argument and is declared in the pitlane sector where pit lane fences stop. No jip mapping will be displayed after this command.

 

 

00AD – Track Banking

This command is declared in every sector to define banking of the whole sector.

2 Arguments:

- Sector Offset : Defines the number of sector before the banking value is applied. If value is 0, value is applied at the beginning of the sector, if it is positive, banking is linearly applied up to specified sector (using 1 applies the value at the end of the sector).
- Banking Amount : Banking angle with horizontal plane in an internal format and its conversion in degrees. If value is positive, left side of the track will be the highest (as in right long curves of Indianapolis) and vice-versa for negatives values.



00B4 – Left Track Width

This command is declared in every sector to define width of the tarmac left side.

2 Arguments:

- Sector Offset : Defines the number of sector before the width value is applied. If value is 0, value is applied at the beginning of the sector, if it is positive, width is linearly applied up to specified sector (using 1 applies the value at the end of the sector).
- New width : Width of the left side of the tarmac in an internal format and its conversion in metres.



00B5 – Right Track Width

This command is declared in every sector to define width of the tarmac right side.

2 Arguments:

- Sector Offset : Defines the number of sector before the width value is applied. If value is 0, value is applied at the beginning of the sector, if it is positive, width is linearly applied up to specified sector (using 1 applies the value at the end of the sector).
- New width : Width of the right side of the tarmac in an internal format and its conversion in metres.



00BD – Sun Position

This command is declared in the first Sector, but its use is unknown.

 

 

00CA – Kerb Description

This command is declared in every sector having a kerb.

Here is it’s content :

- Side : Defines side of the kerb, 2 means left, 3 right. This is particularly necessary when 2 kerbs are set in the same sector.
- Distance d1: d1 sets distance from tarmac edge to kerb internal edge.
- Distance d2 : d2 sets distance from tarmac edge to first kerb internal edge.
- Distance d3 : d3 sets distance from tarmac edge to second kerb internal edge.
- Distance d4 : d4 sets distance from tarmac edge to kerb external edge.
- Height h1: h1 sets height of kerb internal edge.
- Height h2: h2 sets height of first kerb internal edge.
- Height h3: h3 sets height of second kerb internal edge.


00CC – Horizon adjustment

This command is declared in the first Sector, but this command is no more used in GP4 and can be deleted.

 


00D9 – Dry Lane

This command can be declared in any track or pitlane sector to set a dry area. This property is also set in the .bin file at vertex level. .bin and .dat dry declarations are supplemental, it means that if one of them is setting a dry property for one sector, this sector will be dry ingame.

2 Arguments:

- Sector Offset : unknown.
- Number of fry sectors : Number of sectors, starting from this sector where track will stay dry under rain conditions. note that 2 additional sectors will be used before and after this area as transition from wet to dry and the reverse.



00DE – Left Black Flag Area

This command is declared in the first Sector, Sector 0, and is declared as many times as there are left side black flag areas in the track.

3 Arguments:

- Start Sector : Sector starting the area under black flag
- End Sector : Sector finishing the area under black flag
- Speed Limit : Speed limit in miles per hour and its km/h conversion. If player’s car runs above this speed limit, player will have the black flag penalty.



00DF – Right Black Flag Area

This command is declared in the first Sector, Sector 0, and is declared as many times as there are right side black flag areas in the track.

3 Arguments:

- Start Sector : Sector starting the area under black flag
- End Sector : Sector finishing the area under black flag
- Speed Limit : Speed limit in miles per hour and its km/h conversion. If player’s car runs above this speed limit, player will have the black flag penalty.



00E8 – jip Mapping

This command can be declared in any track or pitlane sector to place tarmac lines.

9 Arguments:

- Sector Offset : number of sectors ahead before jip mapping will be applied. (Example : Set it to 2 if you want your jip to be applied 2 sectors after the current sector)

- Number of Tiles : how many times jip picture will be repeated along track direction. If this value is 0 or 1, jip picture is displayed once.
- Tiles every : if Number of tiles is above 1, game will display the jips every x sectors. If this value is 0 or 1, jip will be displayed every sector, else this value sets the number of sector between two jips.
- Jip ID : Jip picture ID. Check the right picture to find what jip correspond to what ID, it has a red frame. Note that you can directly click in the picture to pick the Jip ID.
- Start Width Offset : Lateral position of the jip picture. 0 means jip picture left-bottom corner will be at the center of the track. Negative values are on the left side and positive on the right. Track width range is from -128 to 127.
- Distance Offset : Distance between end of the sector and the top of the jip picture. A sector is 32 pixels long.
- Unknown : All we know is that value can be 0, 16, 32 or 48
- Width Tiles : Number of times the jip picture will be repeated laterally from left to right (value must be in range 0 - 31).
- Tiles Width Offset : Lateral distance between each jip picture (if your jip picture is 64 pixels wide, enter 64 there to obtain a continuous horizontal line).

- Unknown : Value can be 0 or 1.

Jip Width and Jip Height gives sizes of selected jip in texel.

 

In practice

Note that jip pictures are mapped as follow : the left edge of the jip picture is aligned with the middle of the selected sector while the top edge of it is aligned with the end of the sector.

 

In practice

Also note that Jip mappings will only appear for sectors between the Pitlane Start (9B) and Pitlane End commands (9E)

 


00EF – Track Complementary Data

This command is declared in track sector 0 and comes to complete initial sector's data.

4 Arguments:

- AngleZ2 : Refined initial sector direction in 1/65535 unit. This value has to be added to AngleZ track property to get real track orientation.
- Slope2 : Refined initial sector slope in 1/65535 unit. This value has to be added to Slope track property to get real track slope.
- Left Width Offset: SDI believes this value is for left width offset but I hadn't check it yet.
- Right Width Offset : SDI believes this value is for right width offset but I hadn't check it yet.

 

 

00F0 – Sector's Orientation

This command is declared in every Sector and defines center of track sector.

6 Arguments:

- CC Dir2 : Refined CC-Cars direction in 1/65535 unit.
- CC Pitch2 : Refined CC-Cars pitch in 1/65535 unit.
- Direction : Direction of sector's center and its conversion in degrees.
- Direction2 : Refined Direction in 1/65535 unit and its conversion in degrees.
- Pitch : Pitch of sector's center and its conversion in degrees.

- Pitch2 : Refined Pitch of sector's center and its conversion in degrees.

 

 

00F1 – Pits End

This command is declared in the pitlane sector where pits area ends. In original tracks, pits end command is always 33 sectors (11 teams x 3 sectors) after pits start command (0088 for left side or 0089 for right side);

 

 

00F2 – Left Kerb Start

This command is declared in first sector of a left kerb.

4 Arguments:

- Sector Offset : unknown.
- Kerb Length : Number of sectors where this kerb is present.
- Start offset : Position of the beginning of the kerb in the current sector. Values can be between 0 and 16384, 8192 means that the kerb start at the exact middle of the current sector.
- Unknown4.

00F3 – Right Kerb Start

This command is declared in first sector of a right kerb.

4 Arguments:

- Sector Offset : unknown.
- Kerb Length : Number of sectors where this kerb is present.
- Start offset : Position of the beginning of the kerb in the current sector. Values can be between 0 and 16384, 8192 means that the kerb start at the exact middle of the current sector.
- Unknown4.

 

00F4 – Initial Bank Description

This command is declared in track sector 0. It has exactly the same function has the F5 command but has the particularity to set the initial sector's bank descriptions instead of current's sector bank descriptions.


00F5 – Bank Description

This command is declared in every Sector, and is declared twice in each sector, one time for each side it describes.

7 Arguments:

- Side : This value can be 16384 (right side) or -32768 (left side).
- Fence Distance : Distance between fence and tarmac edge and its conversion in metres
- Fence Distance 2 : Refined fence distance in 1/65535 meters unit and its conversion in centimetres. Add this value to Fence Distance to have final distance.

- Arm Direction : Direction on the horizontal plane of invisible arm supporting verge.
- Arm Direction 2 : Refined direction of arm supporting verge.

- Height Offset : Height offset between ending point of bank arm and sector altitude.

- Fence height : Defines height of the fence, usually 840 which stands for 1 metre.

 

 

00F6 – Sector's Position

This command is declared in every Sector and defines center of track sector.

6 Arguments:

- X Position : X Position of sector's center.
- X Position 2 : Refined X Position in 1/65535 unit and its conversion in centimetres. Add this value to X Position to have final position.
- Z Position : Z Position of sector's center.
- Z Position 2 : Refined Z Position in 1/65535 unit and its conversion in centimetres. Add this value to Z Position to have final position.
- Y Position : Y Position of sector's center.
- Y Position 2 : Refined Y Position in 1/65535 unit and its conversion in centimetres. Add this value to Y Position to have final position.

00F7 – Verges Description

This command is declared in every Sector and describes verges.

8 Arguments:

- Left Verge Width : Width of left verge.

- Left External Height : Height of the verge at it's most external edge
- Sector count : Unknown value.

- unknown 4: Unknown values, maybe left verge horizontal and vertical orientations as for Banks Descriptions.
- Right Verge Width : Width of right verge.

- Right External Height : Height of the verge at it's most external edge

- Sector count2 : Unknown value.

- unknown 8: Unknown values, maybe left verge horizontal and vertical orientations as for Banks Descriptions.

 

 

 

 ANNEX II - Building a track

 

I'm sincerely sorry because this chapter will have to stay in progress for this release.

I definitely can't add in time all the advices I originally wished to put in this guide but this chapter will detail every steps to create a whole new track, from .dat re-creation to textures choices. It will also point out everything you have to pay close attention when creating your track and the best way to avoid the deception of seeing a track crashing in game.

All of this will be added as soon as possible.

 

Only one word anyhow and it will introduce to this chapter : With GP4, you have to forgot about the "start from ground" logic. You rather have to think with this idea : "let's take an existing track and let's update it to my will". That's the GP4 modding philosophy : always updating to higher levels.

 

A2.1 THE DAT FILE

Choosing a .dat file

GP4 Tracks are made of a few files, each file handling a special kind of information about the track. What's important to know right now is that all files can be created from a single one : the .dat file.

The .dat file stores the physical structure of the whole track so that's the file you will need to edit first as soon as you want to create a new track or rework the layout of an existing track.

As you maybe read in the .dat chapter of this guide, .dat files are all stored in the circuits folder of your GP4 installation folder.

So before starting a new track, it's better to open a few existing .dat and choose wisely one of them as a base for your future work. It could be interesting to choose a track with a layout close to the one you want to create but it's also important to check 2 points : pit lane side (compared to track) and garage side (compared to pitlane). These 2 points could be changed lately but as a first work, it will be easier if you pick a track that has pitlane and garages the right side.

 

You can already eliminate Monaco (S1CT07) because it's a special case, it has a pitlane on the right and garage on the right but it also has special settings that set cars very close to the pitlane and in diagonal when they are in the garage. So let's forget about this one. The two best choices in my mind are Monza (right pitlane, right garage) and Canada (left pitlane, left garage). They both have a clean pitlane along a long straight.

It's not as important right now as the pitlane side but you have to know that each track have a different track side cameras limit. Thus if you plan to create a long track, it's better to have enough cameras to cover the whole track. SPA and Melborne have the highest camera limit (20).

 

To make it easy for you to pick the right track, here is the list of the original tracks :

 

.dat file track pitlane garages cameras
S1CT01 Melborne right right 20
S1CT02 Sepang right right 17
S1CT03 Interlagos left left 12
S1CT04 Imola right right 13
S1CT05 Catalunya right right 13
S1CT06 A1-Ring right right 12
S1CT07 Monaco right right 21
S1CT08 Gilles Villeneuve left left 18
S1CT09 Nurburgring right right 14
S1CT10 Magny-Cours left left 15
S1CT11 Silverstone right right 16
S1CT12 Hockenheim right right 18
S1CT13 Hongria right right 12
S1CT14 SPA right right 20
S1CT15 Monza right right 14
S1CT16 Indianapolis right right 13
S1CT17 Suzuka right right 16

 

 

Now that you chose a base .dat file, open it and go to Tools menu and select Track Flag List.

Check it attentively. Forget any Jip Mapping line. You will see 2 lines in the Track list and 9 lines in the Pitlane list.

These are very important. Each line sets a command to specify the beginning or the end of a pitlane related element.

Look at the track list commands for example, you have a connect pitlane start and a connect pitlane end. Without these 2 commands, GP4 won't know where cars can leave the track to enter the pitlane and where they will leave the pitlane to enter back in the track.

So with all your future changes you will have to check these lists to be sure everything is in place.

Hopefully, GP4Builder will help you and guide you to add missing commands if you have deleted one of them or to displace ones you might have misplaced.

Anyhow, your track won't work if you have any red (ERROR) line in here, so be careful and check the list before any in-game test.

 

Another thing, if you want to create a new track, you will have to delete most of the sectors and recreate them. The matter is that cc-line sections (line that cc-cars are using to find the best trajectory) are still defined for a full track and it could result in bizarre things (crashes to name the most known one). So to avoid any trouble, the best is to go in the cc-line sections and delete all but the initial section, this way you will be sure your track won't crash due to the past cc-line.

 

Editing the .dat file

It's time to edit the .dat to create the track of your dreams. So go to the last sector of the main straight you want to keep and use the Del button to delete every sectors following currently selected one.

Now, you can create you new layout thanks to the Add button, selecting Multiple sectors. Note that verges and bank width of the last remaining sector will be used for all the sectors you will create. It could be nice thus to tweak them a bit now. Anyway there are tools to edit them later as you want. Choose an amount of sectors, select a radius and create your first curve. And go ahead, Add\Multiple sectors, set radius to 0 and set a new straight...it's that easy up to the very latest moments...when you will need to close the track.

If you're lucky, end of the track is aligned with the beginning. there's nothing to do here but being sure the last sector overlap (a little or almost completely, never mind as long as it overlaps it) the first sector. If there's a gap, simply create an additional sector. In the other case (you're as lucky as everyone), the end of the track won't be aligned with the beginning. In that case, there's no magic, you have to remove your last straight sectors, rework your last curve, rebuild the last straight again and check if you was a little more lucky this time. It's a test and trial game this time, but hopefully, you don't need to be precise to the millimeter. so do your best, make sure last sector overlap the first and you're done.

Fine, layout done.

 

It's time to work on the pitlane now because before you could test your track, you have to be sure pitlane entry is smoothly leaving your track and pitlane exit is smoothly reaching your track. Only then will you be able to test your new track for the first time. So take your time, displace the pitlane first sector to its new position (somewhere in the track sector where you set the Connect Pit Lane Start command) and align it with your new track layout direction. Then, you can either recreate the whole pitlane the way you created your track or if most of the pitlane is fine, simply displace and rotate pitlane sectors to create new smooth pitlane enter and exit. To help you in this task, the Move+rotate mode from the Preferences window can speed up your work. Thanks to this mode, once you selected the first sector, you can browse sectors with up and down keyboard arrows, move sector with a left+drag click and rotate it with a right+drag click.

 

Last things to do before an in-game test

Now that both your track and pitlane are set, there are a few things to do before trying your all new track for a first time :

 

First : did you check the track flag list ? There's a big chance some of the commands are missing (at least the connect pitlane start one and surely more if you recreated the whole pitlane). So go to the sector where your new pitlane starts, double click the sector to see its commands and hit the Add button, choose command and select the Connect Pitlane Start. For other commands, be sure to set only one command per sector and follow the advices GP4Builder will give you in the track flag list. If you have any doubt, check the track flag list of one of the original track. A quick check at the commands order will help you to place yours the right way.

 

Second : if you look at pitlane entry and exit, you can see that track rail is crossing pitlane and will block the car. To remove them, select track sectors with the blocking rails and check the fence gate checkbox on the appropriate side from the Sector Window. GP4Builder instantly displays the changes and your pitlane pit and exit will quickly be free to race on.

 

Third : go to Action Menu and hit the Fix cc-cars behaviours. This will fix cc-cars direction and avoid any weird car behaviour during your in-game tests.

 

OK, it's test time. Save your work, place your saved .dat in the Circuits folder (if you did not save it in this folder yet) and start GP4.

Normally, if you followed the steps above (deleted ccline sections, closed track with overlapping last sector, created a new pitlane smoothly reaching track with all its command and with the two connect command well placed on the track, fixed cc-cars behaviour), track might run.

Don't be surprised by what you see anyhow, track layout have changed but track visual objects are still those of the base track. If you use GPxPatch, there's a way to see your new track anyhow : hit "8" key to show the little track map. Here's your new track.

 

 

A2.2 THE GP4 FILE

Getting the files

It's fine to know your new .dat file is working but it's quite frustrating not being able to see our new track.

So it's time to deal with the .gp4 file. Depending on the .dat file you chose sooner, you will have to edit the appropriate .gp4 file (check table from .dat section above).

The matter is this .gp4 file is stored in the .wad file with the same name. So here you will need a first tool to unpack files from the .wad.

I create Wadupdater for this usage so I advice to use it but you can also use EasyWad from Zaz if you prefer.

Whatever the tool, it's quite easy to select your wad and unpack all the files it contains into a new folder.

 

You can now see the track .gp4 file and a lot of files with .tex extension. These are all the textures used by the track.

Even if you can yet open the .gp4 file, you won't be able to see any texture because GP4 Builder can't read tex files, only .tga files.

So there's a new tool to use here to batch convert .tex files to .tga files. Once again I created TexResizer for this purpose but you can also use Zaz's Slimtex.

Such tool will convert all the files into .tga files that will be easier to read and edit.

 

OK, so all the files are available now so the best thing to do it to create a new folder and gather your .dat file, the .gp4 file and all the .tga files into this folder.

 

Raw conversion

You can now open the .gp4 file and appreciate the full texturized track. Your .dat layout is there too and might go through the original track.

The first thing to do is to engage the "show only 1 scene button" from the tool bar to only see the content of the selected scene. select each scene one by one to find the one with all track tarmac objects (and usually other banks, verges and landscape objects). Once you found it, delete it. This will remove all past TRACK objects (tarmac). As you will recreate these objects, it's better to remove them all to avoid any conflict later.

Create a new scene (Add Button/ New Scene) then choose Add button again and select "Track from .dat".

A new window pops up. We don't need to deal with settings right now and you can check them here for more details so all you have to do is to choose a texture for each part of the track. As you have converted textures, you can browse them thanks to the Texture Browser icon face to each part and pick a nice one from the original track. So just pick a tarmac one for tarmac, a sideline one for side line (or tarmac if you can't find the sideline one), select a grass one for verges and banks and a rail (or any long advert) one for rails and hit the create button.

3 seconds later, your track is created in full 3D, respecting every details from your .dat file. Nice isn't it ? You can even already preview a lap thanks to the Display menu/View 1 lap feature.

There are just a few thing to do before trying your new track ingame : first, save your track (sounds obvious), then go to File Menu then Convert .dat and Create .bin files. Bin files will replace track tarmac with a dynamic tarmac ingame (handling dry and wet weather effects, painted white marks and lines...) so it's important to create them or you will have a full transparent tarmac in game.

Finally, using a wad tool, you have to replace existing file in the track wad by the new created ones : the .gp4 track itself and the 3 .bin files.

 

OK, now you can start GP4 and enjoy a raw version of your new track. For now, you just have the basic elements but with some work, you will be able to add buildings, garages, fences, trees and everything else (tunnels ?) to create a full featured track.

 

 

To be continued...

Sorry guys but I have to stop here for this guide revision. In a future version, I will told you about some refinements, like adding kerbs, creating custom fences or other track layout related objects. So see you next time.

 

 

 

 ANNEX III - Track Troubleshooting

 

This annex has been added to help fixing troubles that could raise when you will try your custom track in game. There's hopefully fewer and fewer reasons to get troubles as GP4 Builder now warns for most of the troubles (incorrect flags, too many faces/vertices and more).

A3.1 TRACK DOESN'T LOAD

Track crashes at mid track loading

- Check that .dat Gp4info wad prefix is empty or points to an existing .wad file. GPxPatch debug file will point this crash address: 0x0046b634. This address means the .wad file was not found.

Game crashes :

- It could come from cars or anim wad but if you're sure it happens since a track change only, you'd better check your .dat file again. Checking track flags is the first reflex to have, checking cc-line section value is another one.

- You made heavy kerbs changes and something went wrong with the kerbs flag : if you have a doubt about this, make a backup of your .dat file then select track sectors and hit del button, choosing all kerbs. Do the same for pitlane and check ingame if things are solved.

- Pitlane entry curve is too sharp : there's no final rule about this but you might always try to avoid pitlane making a 90° or more angle with the track before pitlane completely left track banks.

- Some .gp4 scene have more than 65534 faces or vertices. GP4Builder is designed to warn you about this when you close your .gp4 file but you can also check this by looking at file details in File menu.

 

A3.2 TRACK LOADS

No pitcrew in stands : if you completely rebuilt the pitlane or moved the track up or down from its original altitude without rebuilding the .col file, you might experience missing pitcrews. Pitcrews are indeed walking on top of .col surface so you need to convert .gp4 or .dat surface to .col to create the new .col garage floor surface that will handle pitcrews in game. If you create the .col from the .gp4 file, be sure your garage floors have the TRACK Class to be correctly converted.

 

Car stalls before garages : In fact, car stalls because it doesn't have any place to stop by. So creating a verge/bank will let it stop at its own garage correctly. In order to do this, be sure to create F5 commands for all 33 sectors between Pits Start (89) and Pits end (F1) commands and set any value but 0 for verges and banks width.

 

Warp zone in the rails send the car in pitlane entry : I got this one with a custom Monaco track. Displacing 86 Connect Pitlane command one sector before or after the real pitlane first sector fixed this weird behaviour.

 

Car is expulsed onto track at pit entry or at pit exit : Be sure all the first and last pitlane sectors where some fences are not present have F5 commands and gates correctly set to let the car going through fences. Sometimes, setting a gate 1 sector sooner than the real fence end could also fix the trouble for pit exit.

 

Game seems freezed for 10 second when hitting "Play" : I got this once and found the trouble, A0 command (pitlane fence end) was placed very far from the real end of the pitlane, causing some computation troubles to the game. Displacing the command from its actual position to a further one solved this.

 

Car goes in the air at the end of the garage lane : got this with an incorrectly placed A0 command. This command has to be placed in the last sectors of the pitlane, where pitlane tarmac reaches track banks. Using it sooner cause some kind of invisible barrier sending your car in the air.

 

Car falls down the track : I got this with a track where pitlane was crossing track running below it but A0 command was incorrectly placed. My guess is that GP4 uses pitlane verges and bank altitude instead of track verges and bank ones between the A0 command and the final pitlane sector. So be careful with A0 command and be sure to put it where pitlane reach track fences.

 

Missing parts of the tarmac : First thing, rebuild .bin from .dat and check again. if problem is still there. Check the .gp4 file for any double TRACKXX (track tarmac) object because when you recreated the track from .dat, you maybe forgot to delete some of the original TRACK objects. The same applies for pitlane (PITLANEXX objects).

 

Some track objects are or become invisible : After you checked that Clipping Distance for these objects were fine, you can try to fix most troubles by going into Action Menu. Using Fix Parts to object links and then Recover lost parts might produce some good results on your track stability.

 

game crashes when resuming from pause : Just like for objects becoming invisible, using Fix Parts to object links and then Recover lost parts might produce some good results in some cases.

 

 

Invisible cars when viewing them from track cameras : This happens if you created more cameras than the track handles or if you use a track in a slot that doesn't handle enough camera. you can crank up new Camera setting in .gp4 PVS section to fix this or use GPxPatch to set this track in another track slot (position in the season). In one case, I suggested to reset all 6 first PVS values to 0 (but very last 1 in 4th raw and column) and it fixed the trouble.

 

A3.3 DEBUGGING

If none of the cases above is yours, then you will have to search for the problem in deep.

 

Here are steps to be sure to check 99% of the possible errors. Note that you are supposed to check ingame if track is loading and / or working correctly after each step in order to note at which step bug was solved and what was wrong afterall.

 

- check and fix any trouble (red line) reported by track flag list
- recompute cc-cars behaviour
- check there's no .wad name in GPx infos

- Deleting all but first ccline and set all values but section length to 0 for this section
- check that no two cameras are in the same sector and none of them are pointing to a non existing sector
- remove all pitlane kerbs
- remove all track kerbs
- check and fix any overlapping in verges/banks arms
- check track command for pitlane start (86) was really before first pitlane sector
- checking track command for pitlane end (87) was really before last pitlane sector
- add F5 commands for pitlane sectors without them (mostly pitlane sector with fence gates)
- edit track banks angle/distance to only need one sector gate for pitlane entry/exit (in case pitlane was leaving track in bias and was going trough several track sector fences)
- move a few first pitlane sectors to stay completely inside track width
- rotate pitlane first sectors before pitlane start fence command to be closer to track sector
orientation
- check that jip commands are not pointing to an unknown Jip ID
- check other commands

 

 

 

 CREDITS

 

I can't end this document without crediting many people :

 

To those who helped me at startup to discover Delphi and to read binary files : Sven Mitlehner and Jon Walton,

To those who gave me invaluable documentation and technical data : Madman (.gp4 file format), René "SDI" Smit (cc-line), Adrian "Addie" Wälti (.dat file format) and Patrick Cloosterman (best cc-line and banking code ever made),

To those who tried this tool again and again and gave me reports and feature ideas : Daniel "Dahie" Senff, Ricardo Lampert, Erwin Maliepaard, MarioB, Gildoorf Rozencranft, PrBlanco, Jim "Jimbob1" Connors and Adrian "Addie" Wälti,

To my friend and mate for GP4 LANs and site management : Duffer,

And to all other people I met during that time I've passed building tools for GP4 Community and they are so numerous that I can't enumerate all of them in this document,

 

Thank you very much for your support.

 

Of course, my last and not least credits and thanks goes to Geoff Crammond's Team who made one of the best F1 game ever once again.

 

Laurent "Lo2k" Rousseau