Reading circuit file

sdecorme

Hi,
I would like to make an application able to read a circuit file to draw only the internal and the outside edges of the track.
Which file I have to use , is there some sample code to explain hoaw to read this files .
Thanks you
 
That sounds as if you want to make an "anti cutting"-tool.
But there are no track-files which include exactly the lines you need.

But i remembered a tool with which you can create such files.
Look HERE
 
Hi,
I don't how is the track files are made, I start from nothing.
Thanks for the linksit give me a name.
But there is no info on it.
In fact it look like a circuit viewer without all the detail on the track.
 
Download the tool, there normally should be a "read me" included.

I just remember that you have to drive the inner and outer line for each track by yourself (you'll will have to use that tool for it to create files while you do that, i think) and the tool will take these files to detect cutting in online races.
 
What I want to do is to take a track file and read directly this file to make a text file with the inner and outer line for the track.
 
Sorry but such a file don't exists.
The available files don't include the exact inner and outer lines of the track.
 
I've found that in the .scn of the track there is a list of gmt file. I think it means that each gmt is a part of the track so I've to extract the mas file and find a way to read the gmt files.
 
That will not help.
The *.gmt files are 3D models and 1 file normally includes different parts of the track, like road, curbs, gras, gravel....

But what you want to have, if i understood you right, is the exact inner and outer borderline of the track.
 
Little correction.
You can load the *gmt's into a 3D software (3DSMax, 3DSimEd) and get the X,Y,Z coordinates of each point of the polygones that is on the line you want to define.

But that's a LOT of work.
 
Of course too much work , and I need an automatic function because I don't know wich circuit I want to load.
 
Please tell us for what reason you want to have it, maybe there is another solution.
 
I want to draw on my software the exact inner and outer borderline of the track to put the car position I get from my dll.
 
The aiw file is providing all data related to fastline and track limits. However for each way point there are several parameters which do not know what they mean. Drawing a track with one line is wuite easy. I already did that in excel some time ago. If interested I could upload it.

I would expect that if you really need outside and inside you can easily manage that by defining a standard width. If you are trying to program a display, I would not recommend real width since they would get confused due to the scale and I would just define it as a variable to be adjusted to look fine.

Enviado desde mi GT-I9505 usando Tapatalk 2
 
Yes I really need the outside and inside the put the car on the track. My display is very simple and the Rfactor scale is in meter.
 
Yes I really need the outside and inside the put the car on the track. My display is very simple and the Rfactor scale is in meter.

If you really need the outer and inner line there is no standard rfactor-file from which you can get these.
 
I know this I think I have to read all the gmt file in the order given by the .scn file. But I don't know the .gmt structure file.
If you have info about this ?
 
I'll give you an example:

This is a *.gmt of the rfactor standard track essington:
track_gmt_essington.png


As i told you before, you can see that the object has road, gras, gravel.
Now i take just a part of the road:
track_text.png


I think you would like to have the positions of the white lines right?
Now look how the polys are:
track_poly.png


Now you can see that you would have to try to get the points of the polys that are on the white lines.
But i have no idea and think that is impossible to get it from the file without using a 3D-Software and with using it, it is far away from working automaticly, like you want to have it. It will be a lot of work, like i told you.

Maybe someone else has an idea how to get the needed lines without too much work but in my opinion it is not possible.
 
With this explanation , I think I will try with another way .
Wich software do you use to draw the wireframe ?

Thanks you4
 
With this explanation , I think I will try with another way .
Wich software do you use to draw the wireframe ?

Thanks you4

There are several softwares to do it.
3ds max, bobs track builder and 3dsimed (this last one for limited editing things)
However you will not get very much from those I would think. In the AIW file the width of the track is defined as well as the centerline so borderlines sgoyld be calculated. However, the different parameters are not explained (maybe there is a thread in the track modding section, I dont know).

In any case I would follow that direction: AIW based tool. Yesterday had a look at it and I dont think is too difficult to draw a circuit from it.

Enviado desde mi GT-I9505 usando Tapatalk 2
 
With this explanation , I think I will try with another way .
Wich software do you use to draw the wireframe ?

Thanks you4

I use 3DSimEd or sometimes 3DSMax for working on 3D-Models.

Like SPASKIS said, to get a simple map of the track you can use the information in the AIW-file.

But maybe this tool can help you: INFORMATION/DOWNLOAD
 
I've contacted this guys because I've another project to draw some line on Rfactor, so is plugin have all I need but he didn't share anything :( .
I've found this about the aiw file
"Each wp_pos is a position, with wp_perp giving you the direction." here
 
Here are the waypoints (the green objects in the middle of the road) as they are on the track:
waypoints.png


And all needed information for each is in the AIW-file.
Unfortunately i am not a programmer, so i can't tell you how to get this information into a format you need, in an easy way.

Maybe the creator of THIS Plugin can help you.
It includes a tool with which you can read out the waypoints and put the information into a sql-table which is used to show a map with php-code.
 
With excel or openoffice calc you can process data from AIW file and get this:

https://db.tt/XuCEKOfw

The map could be drawn with different colors per sector.

Enviado desde mi GT-I9505 mediante Tapatalk
 
Yes this is what I would like to do ,I've already found the way to draw the path but not the circuit . Where can I found your excel file .
The final way of my thread is to understand all the data of each waypoint to be able to generate an AIW data from an external source.
Thanks you
 

Back
Top