The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
|
VDrift coordinate system - 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: VDrift coordinate system (/showthread.php?tid=1206) |
VDrift coordinate system - NaN - 01-10-2010 I've been thinking about moving the track editor functionality into blender. But I am somewhat irritated by the coordinate transforms. A vertex(parkinglot track) in blender (-15, 179, 4.5) has the following coordinates in the track editor (179, 4.5, -15) :o edit: This means a 90° rotation around x-axis followed by 90° around z-axis? - NaN - 01-13-2010 I had a look at the code. So we have: Code: TRACK::LoadParameters() So what do we have here take position xyz from start position and load it as zxy. The same happens to the orientation. Code: bool CAR::Load Load applies a 180 degrees rotation to the orientation around z-axis. Code: void CAR::CopyPhysicsResultsIntoDisplay() The orientation is updated by the physics multiplied with a -90 degrees rotation around z-axis(the fixer again). Well, I've got a track export plugin which allows to do the complete track setup/creation within blender. But not being able to reproduce this orientation transforms in the plugin it returns incorrect orientations. PS: My test track for the track exporter - joevenzon - 01-14-2010 Ooh, rainbow road! :-) That's got to be a hard track to drive on. The transforms are crazy. Sorry about that. When I rewrote everything I had to keep the insanity intact to avoid changing the data. I went back and fixed the car coordinate system: http://wiki.vdrift.net/Coordinate_systems but haven't fixed the track coordinate system. Anyway, it sounds like you have it figured out now. Are you still having trouble reproducing the orientation? One option would be to change the track orientations to match blender like I did with the .car file. I've actually been meaning to rewrite the track file format and combine the track.txt and list.txt and surfaces.txt and so on into one file. wow - portets - 01-15-2010 i really like that track.. alot! supertuxkart.sourcefourge would probably really like that track too. for their kart game, you should check it out - NaN - 01-15-2010 Yeah, the track is a homage to Mario Kart 64. - NaN - 01-29-2010 Hey Joe I had a look at some of the track JPKs in blender. They have z-axis as up-axis. So the coordinate system transforms affect roads.trk, track.txt only? I could write a tiny script to fix the coordinate transforms in this files. Or we change the track file format now. Joining track.txt and surfaces.txt and roads.trk. (I am almost done with the import/export trk scripts.) - joevenzon - 02-01-2010 So, what's the coordinate system now, and what's the desired coordinate system? Is the desired coordinate system the opengl coordinate system that VDrift uses to render stuff (Y=up)? Or is the desired cooridnate system the blender coordinate system (Z=up)? - NaN - 02-02-2010 Personally, I would prefer the opengl(Y=up) orientation to get rid of the fix rotations in the code. I would modify the importer/exporter scripts and update the JOEs and JPKs. We would lose compatibility to old data. This could cause confusion among users/contributors - joevenzon - 02-04-2010 Maybe increment the version counter on the .joe files, process them to change their rotations to the Y=up coordinate system, then (at runtime) if it's the old version, apply the rotation fix, if not, don't. Eventually once there are a couple of releases out with the newer coordinate system support, remove support for the old. What do you think? - NaN - 02-04-2010 Sounds good. So the next step is moving the rotation fixes into the joe loading code? - joevenzon - 02-05-2010 Yeah, that sounds good. |