05-16-2010, 04:07 PM,
|
|
NaN
Posting Freak
    
|
Posts: 2,024
Threads: 120
Joined: Jan 2010
|
|
trk importer/exporter
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/t...VDrift+Art
|
|
05-16-2010, 06:27 PM,
|
|
NaN
Posting Freak
    
|
Posts: 2,024
Threads: 120
Joined: Jan 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/c...ezier.html
Create four points and move them around to see what happens.
|
|
05-16-2010, 06:42 PM,
|
|
alex25
Senior Member
   
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
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--
|
|
05-17-2010, 11:34 AM,
|
|
joevenzon
Administrator
      
|
Posts: 2,679
Threads: 52
Joined: Jun 2005
|
|
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.
|
|
05-17-2010, 12:31 PM,
|
|
NaN
Posting Freak
    
|
Posts: 2,024
Threads: 120
Joined: Jan 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.
|
|
|