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 |
INSTALLATIONGP4 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 CONVENTIONSStarting 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.
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 STARTINGGP4 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 displayAs 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.
When backups could save your lifeTo 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.
|
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 MENUSFile 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.
- 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.
- 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.
- 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.
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.
- 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.
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 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.
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.
- Quit :Closes GP4 Builder.
Edit Menu
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.
- 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.
- 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 :
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.
- 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.
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.
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.
- 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.
- 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.
- 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.
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.
- 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.
- 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). - Remove Duplicates: Automaticaly compares all materials, deletes duplicates and reassign the remaining unique material to objects.
- Name : Material Name - Transparency : I still haven’t
checked if that parameter is used by GP4. - Self-Illumination : if checked, part won’t receive dynamic computed lightning.
- Ambient / Emissive colors : Usage
unknown yet. - Power : Usage unknown
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.
- 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 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. 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
- 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. - 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. - Ghost Mesh opacity : This is the percent of opacity of the .gp4 objects when Physics tab is selected.
- 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.
- 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.
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.
Note that .gpb file format stores both sector subdivision settings.
- Curved HD Fence : Propagate sector edge interpolation to fences.
- 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.
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
Search Tab
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. - 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.
- 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
1.4 OPENGL DISPLAY
Navigating through OpenGL DisplayTwo 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.
Default modes are as follow :
In Displace XY/Z mode, mouse buttons will act as follow :
In Rotate/Zoom mode, here are the controls effects:
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.
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 : 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.
If Scale Button
is engaged, mouse moves won’t move the virtual camera but will scale
the selected object :
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 SHORTCUTSGP4 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
F5 : Refresh scene F6 : Switch Displace 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 |
2 .BIN FILE FORMAT |
Three .bin files are present in every GP4 track wads : 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.
2.1 HIERARCHY.bin files have a 4 levels hierarchy :
Note that you can use (right click) context menu at any level to invert normal or change area behaviour. 2.2 EDITING FILELevel 0 - Root
Level 1 - Sections
Level 2 - Faces
Level 3 - Vertices
|
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
3.2 EDITING FILELevel 0 - Root
Level 1 - Points
|
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.
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.
4.1 HIERARCHY.col files structure have a 4 levels hierarchy :
4.2 EDITING FILELevel 0 - Root
Level 1 - Behaviour Areas
Level 2 - Faces
Level 3 - Vertices
|
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 ViewT 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
CC-Line section
Cameras section
5.2 EDITING TRACK/PIT SECTIONSAbout Physical TrackIn 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 LimitationsGrand 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 ConversionsAs 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.
Anyhow every file generated from the .dat will benefit from the settings defined for subdivision in the Preference window.
Level 0 - Root
Level 1 - Sectors
Track Initial SectorAs 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 :
- 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.
Ordinary Sector
- 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.
- 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.
- 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 ActionsYou 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.
Level 2 - Commands
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…
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.
5.3 EDITING CC-LINECC-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 wrongFirst 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-linesHere 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 filesThe 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
Level 1 - CC-Lines
Initial cc-line section
regular sections
5.4 EDITING CAMERASEach 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 filesAll 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
Level 1 - Cameras
Sector is the sector where the camera
is placed. 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.
- Position (Sector): Sector hosting
the camera. - View car from sector : Sector where camera will start to follow cars.
- 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.
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 ViewAs 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 ViewYou 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
Visibility Sets (tracks only)
Sunlight (tracks only)
6.2 EDITING SCENESLevel 0 - Root
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
Level 2 - Objects
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.
Object Attributes windowOnce at level2, the “Object’s Attributes” window will appear, giving the following data about selected object :
Add Button
Selecting this line will display aside window with the following options :
Level 3 - Parts
Level 4 - Faces
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
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.
6.3 EDITING VISIBILITY SETSLevel 0 - Root
Level 1 - Visibility Sets
6.4 EDITING SUNLIGHTLevel 0 - Root
Level 1 - Sunlight
|
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. Each command has a given number of arguments as shown in the table below :
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 StartThis command with no argument is declared in the track sector in which pitlane starts.
0087 – Connect Pitlane EndThis command with no argument is declared in the track sector in which pitlane ends.
0088 – Left Pits StartThis 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 StartThis 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 OnThis command have no argument and is declared in the pitlane sector where speed limiter is activated.
0097 – Speed Limiter OffThis 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 StartThis command have no argument and is declared in the pitlane sector where pit lane starts to leave track.
009E – Pit Lane EndThis command have no argument and is declared in the pitlane sector where pit lane completely rejoins the track.
009F – Pit Lane Fences BeginThis 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 EndThis 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 BankingThis 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). 00B4 – Left Track WidthThis 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). 00B5 – Right Track WidthThis 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). 00BD – Sun PositionThis command is declared in the first Sector, but its use is unknown.
00CA – Kerb Description
00CC – Horizon adjustmentThis command is declared in the first Sector, but this command is no more used in GP4 and can be deleted.
00D9 – Dry LaneThis 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.
00DE – Left Black Flag AreaThis 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 00DF – Right Black Flag AreaThis 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 00E8 – jip Mapping
00EF – Track Complementary DataThis 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.
00F0 – Sector's OrientationThis command is declared in every Sector and defines center of track sector. 6 Arguments: - CC Dir2 : Refined CC-Cars
direction in 1/65535 unit. - Pitch2 : Refined Pitch of sector's center and its conversion in degrees.
00F1 – Pits EndThis 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 StartThis command is declared in first sector of a left kerb. 4 Arguments: - Sector Offset : unknown. 00F3 – Right Kerb StartThis command is declared in first sector of a right kerb. 4 Arguments: - Sector Offset : unknown.
00F4 – Initial Bank DescriptionThis 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
00F6 – Sector's PositionThis command is declared in every Sector and defines center of track sector. 6 Arguments: - X Position : X Position of
sector's center.
00F7 – Verges DescriptionThis 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 - unknown 4: Unknown values, maybe left
verge horizontal and vertical orientations as for Banks Descriptions. - 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 FILEChoosing a .dat fileGP4 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 :
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 fileIt'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 testNow 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 FILEGetting the filesIt'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 conversionYou 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 LOADTrack 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 LOADSNo 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 DEBUGGINGIf 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 - Deleting all but first ccline and set all values but section length to 0 for this section |
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