The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
Racer track conversion howto - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: Racer track conversion howto (/showthread.php?tid=234)



Racer track conversion howto - thelusiv - 06-02-2006

Joe has written a howto for converting Racer tracks (such as the ones found on racer-xtreme.com) and checked it into the vdrift-trackeditor SVN repository. Here it is in its current form. Note that these instructions (and the tools too) assume that you're running Linux.

  • Unzip and put racer files in temporary folder RACER_TP (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces).
  • Create new folder for track in track editor folder TRACKEDITOR_TP.
  • Convert all texture names to lowercase in TRACKEDITOR_TP via
    Code:
    find . -type f -name \*.tga|sort -r|awk '{f=tolower($1);
    if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh
  • Make folder TRACKEDITOR_TP/objects/
  • Run the following command:
    Code:
    dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof
    If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces.
  • Open track editor /data/tracks/editor.config and set active track to TRACKEDITOR_TP.
  • Run the track editor. Trace the roadways and mark the starting position (press H for help).
  • CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run
    Code:
    joepack/joepack -c objects.jpk *.joe
  • Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP. Erase VDRIFT_TP/objects/*.joe (since they are in the pack file).
  • Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt
  • Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track.
  • Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen.
  • Add the track selection screenshot to VDrift/gui/tracks/VDRIFT_TP.png (hopefully these png files will be moved into the folders of the individual tracks soon).
  • Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes.
  • Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the command
    Code:
    mogrify -transparent rgb\(255,0,255\) file.png
    This can be scripted to speed things up of course.
  • Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come).
  • Done!


To do all these things you'll need all the stuff in the trackeditor repository. Most of these tools are still a bit rough around the edges, but they're usable.


- thelusiv - 06-02-2006

I'm working on converting a track to get to know the process better. I've gotten everything done up to the listedit step. I can't figure out how to use the set command. I've even looked at the source code for the listedit too, and I see that it requires several parameters but i have no idea what values to use.


- FFuser - 06-02-2006

I've posted this on the wiki


- joevenzon - 06-02-2006

thelusiv:

Here's a crash course on it. You basically can do load, save, ls, set, and quit. Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format:

Code:
#vdrift object list file format v0.4
#format is:
#0 model filename (no spaces allowed)
#1 texture filename (no spaces allowed)
#2 mipmap texture (1 for true, 0 for false)
#3 disable lighting (1 for true, 0 for false)
#4 is this a skybox? (1 for true, 0 for false)
#5 is this object a transparent blended texture? (1 for true, 0 for false)
#6 reserved
#7 reserved
#8 ignore
#9 collide-able (1 for true, 0 for false)

The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do:

Code:
ls 1 sky*

To find all of the objects that have the skybox property set to true (1), do:

Code:
ls 4 1

Note that all of the objects will start with default properties.

The set command is similar. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do:

Code:
set 1 sky* 4 1

Understand?


- thelusiv - 06-04-2006

Thanks Joe, I think I have a good grasp of the listedit tool now. I used this info to finish up Spa-Francorchamps which I checked in tonight. There are little problems, like a strange box in the middle of the road, and the track shot could be better.