01-09-2010, 12:44 PM,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
getting Carolina.blend convert into vdrift
Hi,
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.
Thanks,
vikas :cry:
|
|
01-09-2010, 01:20 PM,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
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,
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
Hi,
I am also new to vdrift and haven't created a track yet.
The export-all-joe-0.3.py 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):
Code: 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:
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,
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
Yeah, I had a look at the export-all-joe-0.3.py script.
From line 774:
Code: if (nextObject.getData().faces[0].image is not None):
...
save_joe(....)
It will export textured objects only 8)
|
|
01-09-2010, 06:35 PM,
|
|
joevenzon
Administrator
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
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,
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
So there is no need to set the start position/orientation in the track.txt manually?
edit:
Did some tests. The minimum track.txt to get the Track editor running looks like this: hock:
But you'll get this in stdout.txt:
Code: 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,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
Hi,
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.
Vikas
|
|
01-10-2010, 09:35 AM,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
Hi,
I tried your modified script like this:
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?
thanks,
vikas
|
|
01-10-2010, 09:58 AM,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
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,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
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,
|
|
NaN
Posting Freak
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
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):
|
|
01-10-2010, 12:18 PM,
|
|
thevikas
Junior Member
|
Posts: 9
Threads: 2
Joined: Jan 2010
|
|
FINALLY!!!!
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.
Thanks for helping NaN.
|
|
|