The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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 property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 866 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_parser.php 866 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key 1 - Line: 885 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_parser.php 885 errorHandler->error
/inc/class_parser.php 938 postParser->mycode_parse_post_quotes
[PHP] postParser->mycode_parse_post_quotes_callback1
/inc/class_parser.php 816 preg_replace_callback
/inc/class_parser.php 451 postParser->mycode_parse_quotes
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
trk importer/exporter - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Cars & Tracks (https://www.vdrift.net/Forum/forumdisplay.php?fid=11)
+--- Thread: trk importer/exporter (/showthread.php?tid=1288)

Pages: 1 2


trk importer/exporter - NaN - 05-16-2010

I wrote a simple(stupid) trk importer and exporter. They are meant to be used to adjust the bezier surface control points manually.

Import jpk + import trk (ring2007):
[Image: ring0syvmb.jpg]

The bezier surface is the active(pink) mesh in the above screenshot. It's control points(vertices) need to be adjusted to cover the track mesh. Right now the are intersecting it(lie below the track mesh).

Volunteers are welcome. Smile
Download: http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art


- alex25 - 05-16-2010

this is a bug in the current implementation. joe promised to fix it but nothing has happened yet. i'll take a look at what you did. thanks.

--alex--


- NaN - 05-16-2010

I fixed the Karussell:
[Image: t8365sp.jpg]
[Image: fixedb94ub.jpg]

Schwalbenschwanz needs to be adjusted too I think.


- alex25 - 05-16-2010

your import script assumes that we are in 2-vertex mode selection. if you look at that part of the track in the track editor you'll see it was done using 4-vertex mode selection. are you sure your script works for that case as well? if we fix the track editor i can redo the track really fast. even better a converter would be nice, that takes the old bezier surface and then corrects it.

--alex--


- NaN - 05-16-2010

I converted it back to be able to see all patch segments. This 4-vertex mode is setting the middle control points to one value(compare roads.trk r360 vs r539). It's like taking 4 control points of a bezier and merging point 1 and 2.

The importer script simply reads the control points and creates a mesh. In the end every patch has to consist of 16 points.


- alex25 - 05-16-2010

how does the track editor know when you are in different vertex selection modes? something has to be different between them otherwise the track editor will render the patches the same (which it doesn't).

--alex--


- NaN - 05-16-2010

Quote:merging point 1 and 2
I guess this is how Joe tried to add support for road buckles.


- NaN - 05-16-2010

Quote:which it doesn't
I don't know what the track editor renders. But there are always 16 points per patch. This is how it is defined.


- NaN - 05-16-2010

By the way. I've found a nice applet to get a feeling for the control points.
http://www.cs.princeton.edu/~min/cs426/classes/bezier.html

Create four points and move them around to see what happens.


- alex25 - 05-16-2010

that's exactly what i'm saying. there has to be extra information in there which you are not aware of. the track editor renders the points i selected when i made the track. this is not the case any more, now everything is rendered in 2-vertex selection mode. please restore the previous version or i'll do it. i worked hard to make that track, don't fuck it up.

--alex--


- NaN - 05-16-2010

Wait a moment. In the 4-vertex selection mode you are setting the corner(0, 3) and the middle points(1, 2). The problem is that the surface won't go through points 1, 2.

Feel free restore the previous version.


- alex25 - 05-16-2010

NaN Wrote:Wait a moment. In the 4-vertex selection mode you are setting the corner(0, 3) and the middle points(1, 2). The problem is that the surface won't go through points 1, 2.

did you look at the code in the track editor? anyway, this was discussed in this thread http://vdrift.net/Forum/viewtopic.php?t=975

Quote:Feel free restore the previous version.
done.

--alex--


- NaN - 05-16-2010

I think the best way would be to use three points(2 corners + 1 center) and force the bezier to pass through them(calculate the control points 1,2 from the center point).

Edit:
I think I can write a script to do this.


- joevenzon - 05-17-2010

So, my original solution was to make the track editor allow you to assign the intermediate control points (1 and 2: either assigning them both to the same point (in 3-vert mode), or to different points (in 4-vert mode)), but that didn't quite produce the results desired. It'd be nice if you fixed this so that the control points get moved so that the surface goes through the intermediate point(s) selected, however in addition: There are tracks (like that part of the nurburgring) where the different parts of the road are meant to be discontinuous left-to-right, so instead of manipulating control points in a bezier, there should really be more than one bezier. I was thinking I'd add support for that when I eventually rewrote the track editor, but who knows when that will happen, so feel free to implement this if you think of a good way to do it.


- NaN - 05-17-2010

Quote:control points get moved so that the surface goes through the intermediate point(s)
I've been thinking about doing it in VDrift at load time. Don't want to touch the trk files. alex25 is kinda sensitive regarding this.

Quote:when I eventually rewrote the track editor
My grand plan is to implement the track editor functionality in a blender plugin. For my very personal use, haha.