Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bullet dynamics
05-09-2010, 02:35 PM,
 
There are 42 tracks in vdrift-data repo. That's a lot of work.
Reply
05-09-2010, 02:56 PM,
 
I did a diff on interlagos roads.trk. The changes after your fixes affect internal bezier patch points P[1,0]-P[2,3]. These are generated procedurally to guarantee a smooth surface. Have there been changes to this algorithm at some time in the past?

We could eventually simply recalculate them?
Reply
05-09-2010, 03:38 PM,
 
the algorithm was changed at some point to accommodate for the selection of 2,3 or 4 vertices at a time (there is a thread here discussing this). but the problem is even worse. i just checked ring2007 and it has holes in the bezier surface and it was done with the latest version of the track editor so even re-tracing it might not fix the problem.
Reply
05-09-2010, 03:41 PM,
 
Did re-tracing help on other tracks? There has to be a bug in the ray cast algorithm then.
Reply
05-09-2010, 03:53 PM,
 
it did actually and the surfaces are different (do a diff to see what changed). there could also be a bug in the ray cast algorithm. an easy track to test is rouen as the hole is right under the start/finish line (i guess you need to make the changes i posted to see it)
Reply
05-09-2010, 04:10 PM,
 
Looks bad. Will do some debugging.
[Image: shot002t1jyq.jpg]
Reply
05-09-2010, 04:22 PM,
 
The front wheel rays report no collision after crossing the start line.
Reply
05-09-2010, 05:04 PM,
 
the patch is there (shows up in the track editor). actually that one is really easy to fix as this is the last patch. but it will be good to find out why the wheels report no collision.

--alex--
Reply
05-09-2010, 05:15 PM,
 
I hacked the racing line code to draw the patches. There is a gap.
[Image: shot0034l18i.jpg]
Reply
05-09-2010, 05:22 PM,
 
To draw the patches:
Replace lines 38-41 in roadpatch.cpp with:
Code:
MATHVECTOR <float, 3> v0 = patch.GetPoint(0,0);
    MATHVECTOR <float, 3> v1 = patch.GetPoint(0,3);
    MATHVECTOR <float, 3> v2 = patch.GetPoint(3,3);
    MATHVECTOR <float, 3> v3 = patch.GetPoint(3,0);
And color vdrift-data\textures\effects\racingline.png completely red.
Enable racingline.
Reply
05-09-2010, 05:34 PM,
 
Strange. Ruudskogen also has a gap but it doesn't affect the car.
Reply
05-09-2010, 05:56 PM,
 
To see the separate patches:
Modify lines 74-76:
Code:
    uvs[5] = 1;//(v2-v1).Magnitude();
    uvs[6] = 0;
    uvs[7] = 1;//(v2-v1).Magnitude();
Use a color gradient for racingline.png.
[Image: shot004gk1xx.jpg]
Reply
05-09-2010, 06:14 PM,
 
OK. There is no gap. The racing line code won't draw the last patch. Due to support for open ended tracks I guess.
[Image: shot007vyzwp.jpg]
To change this add after line 134 in roadstrip.cpp
Quote: else
{
nextpatch = &(*patches.begin());
}
Reply
05-09-2010, 07:02 PM,
 
I was able to fix the last patch at rouen by using the third point row as first.

Original(third point row(lines 9-12) doesn't fit):
Code:
-583.278 43.9189 212.332
-579.998 43.9189 211.711
-576.718 43.9189 211.089
-573.438 43.9189 210.468
-583.213 43.9202 212.661
-579.935 43.9202 212.038
-576.657 43.9202 211.416
-573.379 43.9202 210.794
-584.023 43.8964 208.364
-580.749 43.8964 207.74
-577.475 43.8964 207.116
-574.201 43.8964 206.491
-583.084 43.9227 213.318
-579.81 43.9227 212.694
-576.535 43.9227 212.069
-573.261 43.9227 211.445

Modified:
Code:
-584.023 43.8964 208.364
-580.749 43.8964 207.74
-577.475 43.8964 207.116
-574.201 43.8964 206.491
-583.278 43.9189 212.332
-579.998 43.9189 211.711
-576.718 43.9189 211.089
-573.438 43.9189 210.468
-583.213 43.9202 212.661
-579.935 43.9202 212.038
-576.657 43.9202 211.416
-573.379 43.9202 210.794
-583.084 43.9227 213.318
-579.81 43.9227 212.694
-576.535 43.9227 212.069
-573.261 43.9227 211.445

The question is why the first row of the last patch is set as third?
Reply
05-09-2010, 07:26 PM,
 
there is probably a bug in the track editor. joe is the expert at that.

--alex--
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)