I created a simple track using Bob's Track Builder and Blender:
It has about 6 turns and some ridiculous camber on some of the turns. I am using this as a test for working with BTB, which I am going to be doing some more work with once things are working smoothly.
Here's my track:
http://vdrift.while-true.net/closed_track_1.tar.bz2
The above tarball contains all the following:
- DirectX (text) format .x files exported from BTB
- .blend file created from importing .x files in Blender and manipulating somewhat
- VDrift track folder for closed_track_1
- objects exported with export-all-joe-0.3.py, jpk created using joepack utility
- list.txt created by the above Python script
- roads.trk created with vdrift-trackeditor
- track.txt created with vdrift-trackeditor
- about.txt
The problem seems to be that it's not loading the surfaces. The symptom is that it fails
Code:
assert (surface_id < (int)surfaces.size());
in src/objectloader.cpp:275 (I modified it slightly to split up the assertion conditions and printed out the variables, which you can see in the output):
Code:
ERROR: Error setting GUI option "game.number_of_laps" to GAME value "0"
ERROR: force feedback: can not open /dev/input/event0 (Permission denied) [src/forcefeedback.cpp:48]
ERROR: Error setting GUI option "game.number_of_laps" to GAME value "0"
ERROR: Error loading texture file: data/tracks/chris_track_1/trackshot.png
INFO: Loading track from path: data/tracks/chris_track_1
INFO: Can't find surfaces configfile: data/tracks/chris_track_1/surfaces.txt
INFO: No Surfaces File. Continuing with standard surfaces
INFO: No lap sequence found; lap timing will not be possible
surface id: 1, surfaces.size: 0
vdrift: src/objectloader.cpp:275: std::pair<bool, bool> OBJECTLOADER::ContinueObjectLoad(std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MODEL_JOE03, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, MODEL_JOE03> > >&, std::list<TRACK_OBJECT, std::allocator<TRACK_OBJECT> >&, const std::vector<TRACKSURFACE, std::allocator<TRACKSURFACE> >&, bool, const std::string&, TEXTUREMANAGER&): Assertion `surface_id < (int)surfaces.size()' failed.
SIGABRT detected, releasing the mouse
Aborted
So, any ideas what could cause the surface loading to fail, so that the surfaces vector ends up empty? Whatever is going on, vdrift-trackeditor didn't choke on the track at all...
One other thing, BTB seems to like to use 5 vertices across the width of a track, but vdrift-trackeditor only supports 4...I just used 2 for this export. Could this be causing the problems I'm having?