Forums

Full Version: bullet dynamics
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
There are 42 tracks in vdrift-data repo. That's a lot of work.
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?
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.
Did re-tracing help on other tracks? There has to be a bug in the ray cast algorithm then.
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)
Looks bad. Will do some debugging.
[Image: shot002t1jyq.jpg]
The front wheel rays report no collision after crossing the start line.
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--
I hacked the racing line code to draw the patches. There is a gap.
[Image: shot0034l18i.jpg]
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.
Strange. Ruudskogen also has a gap but it doesn't affect the car.
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]
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());
}
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?
there is probably a bug in the track editor. joe is the expert at that.

--alex--
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16