The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
|
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): 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. 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: 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 2I guess this is how Joe tried to add support for road buckles. - NaN - 05-16-2010 Quote:which it doesn'tI 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 editorMy grand plan is to implement the track editor functionality in a blender plugin. For my very personal use, haha. |