Author Message

amilmand

00
Posts: 259

Location: ---
Occupation:
Age:
V$:
#150097   2018-10-08 18:19          
Well good guess on the .spl format but no cigar unfortunately those lines define a "closed cubic Hermite spline"
Quote from LINK
The .spl file spline row format (%LF is float %d is int) is:
(%lf %lf %lf) (%lf %lf %lf) %lf %lf %d %lf %lf %d:
(pos XYZ), (normal XYZ), splineWidth, targetVelocity, I do not know the rest
the two ints are used as bools
the list of first two vectors define a closed cubic Hermite spline.
The main concern again is the "density" of the spline as the Hermite spline description (well this is of course a guess (that it defines a Hermite spline) but it "fits evidence") defines normals which are well... normalised (they need to be or the AI gets confused) so they really cant be straightforwardly converted to their .trc lane equivalent (and further complication is that while the AI follows a .spl spline its movement is subject to the physics engine, and the spline defined is more of a hint of the path to take and not a direct definition opposed to the .trc, I bring this up because the .spl-s I ran into in modded maps were in most cases grossly missaligned (from a .spl standpoint this doesnt matter as the physics engine helps and keeps the car on the ground and generally forces the car to move "believably")).

But 3dsmax uses Bézier splines if you have a homebrowen solution to export those that might work (as far as I know the closest 3dsmax natively has that generates spline like data is the export to adobe illustrator but that doesnt help much I dont think)

MikeShinodaSLR:
some sort of documentation to make it easier for others.
The article (LINK) is a good starting point the code is mainly a direct implementation of that knowledge and some elaborate stuff in the GameFileManager (and the trc related file types but that is a bit more complicated than the rest and I think less hmm popular)

I always think its nice if someone shows love for such an old game so keep on modding :)
(if you have questions about the code or anything just ask ;) )