Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting Carolina.blend convert into vdrift
01-09-2010, 12:44 PM,
getting Carolina.blend convert into vdrift

I read the track editor wiki. and also with my last answer, checkout vdrift-art and located some test tracks like carolina. Im not able to understand how does a blend file convert into vdrift track. I also can't understand what does export-joe do?

I compiled the editor and did a ./run but it always loads empty. I edited the editor.config to choose my new track by giving it the dirname.
My editor/data/tracks/nice2 contains list.txt, blend file and screenshot PNG. export created no joe files so objects is empty.
How can I load the blend file into editor? or is it that I export from blender in some other format?

Im sorry but reading the wiki many times still did not clear my problem.
Please suggest.
vikas :cry:
01-09-2010, 01:20 PM,
After some testing, i userstand that track.txt should exist when loading editor. who/how to create it?
Also, road.trk is the file which loads track into editor. how to I convert blend into road.trk?
01-09-2010, 03:29 PM,

I am also new to vdrift and haven't created a track yet.

The script exports your blend file in joe fileformat. You should get at least an joe file and a list.txt. If not there is something wrong with your track.
Open CarolinaMP.blend in blender. Select the track mesh. Export joe. Select "Export only the selected object". You should get a joe and a list file.
Exporting all(without selecting "Export only the selected object") worked for me after uv-mapping the mesh and applying a texture to it. I might post a small tutorial if you're interested.

I also think you need to write track.txt by yourself.
You might use this one for testing(parkinglot):
cull faces = on
non-treaded friction coefficient = 1.000000
treaded friction coefficient = 0.900000
lap sequences = 0
start position 0 = 7.524787,2.211630,-5.473845
start orientation-xyz 0 = -0.017149,0.907452,0.037216
start orientation-w 0 = 0.418152

I guess lap sequences are used for auto tracing?

You might want to change "start position 0" to a position on your track. (In blender place a cube somewhere on your track an read its position(press N Key))

The "start orientation 0" is a quaternion. It describes the orientation of the camera/car on the track(I guess). The bad thing is, in blender the orientation is shown in X,Y,Z-Axis rotation angles. I think the rotation sequence is X, Y, Z. So RotX is φ, RotY is θ, RotZ is ψ. The quaternion is:
[Image: 8f24d7035f36dd398e6253a521d7ac0c.png]

The road.trk is generated by the Track editor. It defines the road surface for the track ie the bezier patches which you have traced in the Track editor.
01-09-2010, 05:43 PM,
Yeah, I had a look at the script.
From line 774:
if (nextObject.getData().faces[0].image is not None):
It will export textured objects only 8)
01-09-2010, 06:35 PM,
Mostly right, a couple of corrections:

NaN Wrote:I guess lap sequences are used for auto tracing?
Those are actually used for the start/finish lines (and any timing sectors in between) -- confusing name, I know.

Quote:You might want to change "start position 0" to a position on your track. (In blender place a cube somewhere on your track an read its position(press N Key)). The "start orientation 0" is a quaternion. It describes the orientation of the camera/car on the track(I guess).

Start position 0 through whatever are the starting positions for the cars when you start a race. The first car gets put at start position 0, the next at start position 1, and so on. You can generate start positions and orientations in the VDrift track editor by pressing the L key once you've positioned the track editor camera at the position and in the direction where you want the first start position to be. Press K to clear the last start position if you mess up.

I apologize for the confusing track creation process, I've been meaning to write a proper track editor for a while now.
01-09-2010, 06:44 PM,
So there is no need to set the start position/orientation in the track.txt manually?

Did some tests. The minimum track.txt to get the Track editor running looks like this: Confusedhock:
cull faces = on
But you'll get this in stdout.txt:
CONFIGFILE::GetParam():  start position not found in data/tracks/carolina/track.txt
CONFIGFILE::GetParam():  start orientation-xyz not found in data/tracks/carolina/track.txt
CONFIGFILE::GetParam():  lap sequences not found in data/tracks/carolina/track.txt
No track named carolina, creating a new one.
01-10-2010, 02:06 AM,

With all the suggestions I could finally load my blend into track editor. (It felt really great though my track is just a simple textured curve mesh).

Then I also got to tracking left-right-left-right style and did some length (not whole track). saved and then vdrift complained about starting positions. I tried a few times but I don't know how to give starting positions.

How exactly should I position the camera for start position marking?

This is the problem (stdout):

INFO: Loading track from path: /usr/share/games/vdrift/data/tracks/nice2
INFO: Can't find surfaces configfile: /usr/share/games/vdrift/data/tracks/nice2/surfaces.txt
INFO: No Surfaces File. Continuing with standard surfaces
INFO: No lap sequence found; lap timing will not be possible
INFO: Track loading was successful: 1 unique models, 1 unique textures
INFO: Objects before optimization: 1, objects after optimization: 1
INFO: Collision objects: 1 (internal), 0 (external)
INFO: Car loading was successful: XS
ERROR: Car is starting too far away from the track or isn't over the track at all

This is where im stuck now. Please suggest.

Thank you everyone for helping me. Smile
01-10-2010, 06:52 AM,
Hi vikas,

Delete everything except "cull faces = on" in your track.txt.
Then start the editor.
Move to your starting position on the track and press L to add it.
When you're done save the track by pressing S.
The track.txt should contain your starting positions.
01-10-2010, 09:35 AM,

I tried your modified script like this:
[Image: blender-vdrift-track-shot2.png]

the game is still saying:
Car is starting too far away from the track or isn't over the track at all

The track and all the empty mesh points are at Z-ZERO.

how to fix this?

01-10-2010, 09:43 AM,
Yeah, i removed the script. There seems to be a coordinates problem. Trying to understand it right now. Use an empty track.txt(it should contain:"cull faces = on" only) and set the start positions in the track editor.
01-10-2010, 09:58 AM,
track editor is not helping right now.
i don't know how to position the camera accurately enough so that it will accept the position.
should i "center" point the starting position using the big white circle on the track?
or should I move the camera such as if i was sitting in the car on the track starting position itself?
01-10-2010, 10:07 AM,
is the a proper size or wide a track should be? I feel i made a very small or maybe thin track which may even be smaller than the car itself. :p
01-10-2010, 10:11 AM,
The white circle is to select track vertices. The start position is the position of the camera, not the white circle. It is a first-person perspective cam.

Grab the vdrift-art\models\tracks\Parkinglot and open it in blender. I tried it in the track editor and it worked.

This is how it should look like(parkinglot track):
[Image: parkinglot8qi2.jpg]
01-10-2010, 10:58 AM,
The Nissan 350z model in vdrift-art\models\cars\350z has a height of 1.208 units in blender and 1.315 meters in real life. So the scale is 1:1.
01-10-2010, 12:18 PM,

My tiny track got loaded in the game! Im very happy.
I scaled my track 3 times and then track editor was moving slow enough to adjust the camera correctly. Smile

Thanks for helping NaN. Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)