Page 3 of 4

Re: How to build Custom Tracks

PostPosted: Thu Jun 05, 2014 10:15 am
by Reaper392
07CobaltGirl wrote:
Reaper392 wrote:how exactly does the rounding the track length to the nearest 0.2m work? Is the rounding applied on the 2D lengths and then the lengths are converted into 3D lengths which take into account their slope, or are the original 2D lengths converted into 3D lengths and then rounded to the nearest 0.2m?

*edit*
Also, do the distances to the split timers use the 2D length or the 3D length


I can't explain the .2m part, but the distances in the track editor use the 3D length. The 2D length is end-to-end regardless of height changes. The 3D length accounts for actual travel distance due to height changes.


Thanks for that, but sadly it doesn't really help me because I'm making my own track editor (just as a technical exercise, I almost certainly wont release it unless I can get one of my very ambitious ideas working). I need to know how the rounding works so I can incorporate the same rounding in my own program.

Re: How to build Custom Tracks

PostPosted: Thu Jun 05, 2014 7:32 pm
by Der Bayer
In Automation you define the 2D track map with the first 3 lines of the track definition. So if you say a straight is 100 meters long, it will be 100 meters in 2D projection, no matter if it is sloped or not. The simulation then calculates the actual length of the straight, so a 100 meter straight with a slope angle of 10% is 100.5 meters long. It then calculates the car's position in 0.2 meter steps. So if it gets to 100.4 meters, it is still on the straight and will do another step on the straight before moving to the next track segment. So the car will be on the straight for 100.6 meters and then go to the next segment. It resets the distance counter at the beginning of the next segment (it starts counting from 0 again), so the 0.1 meters extra will not be carried over to the next segment and not be added to it's length.
So if you make a program which plots the track map in 2D, the map will be very slightly different if you ignore the slopes. The Matlab file I sent you actually does that, but it's usually not a big problem and can hardly be noticed. If you want to be 100% precise, you have to calculate the slopes in and make the 3D driving line and then only take the 2D projection.

Re: How to build Custom Tracks

PostPosted: Fri Jun 06, 2014 1:00 am
by Reaper392
Thanks, that's exactly what I needed to know.

Re: How to build Custom Tracks

PostPosted: Mon Sep 01, 2014 6:33 am
by 07CobaltGirl
Is anyone else having issues with custom tracks not lining up correctly?

Re: How to build Custom Tracks

PostPosted: Mon Sep 01, 2014 10:28 am
by Daffyflyer
07CobaltGirl wrote:Is anyone else having issues with custom tracks not lining up correctly?



Ahh, is that still going on as of B1415? I'll poke Caswal about it if so.

Re: How to build Custom Tracks

PostPosted: Mon Sep 01, 2014 12:42 pm
by 07CobaltGirl
Yes. I did the adjusting it by 23px to make it work, but it makes it a chore to build tracks with the editor.

Re: How to build Custom Tracks

PostPosted: Tue Sep 02, 2014 2:11 pm
by zeussy
There is a new B1416 optional update ( viewtopic.php?f=13&t=4731 ). Should fix the issue, and has a couple of other little changes.

Re: How to build Custom Tracks

PostPosted: Tue Sep 02, 2014 3:42 pm
by 07CobaltGirl
Track releases will resume over the next week. :D

Re: How to build Custom Tracks

PostPosted: Sun Dec 21, 2014 12:21 am
by BitTwiddler
I wrote a small viewer so you can see your tracks path without having to load up automation. It's not perfect, it doesn't take into consideration automations turn angle error. If anyone has a nice algorithm for that, i'll ad it in, otherwise that's a lot of testing I would need to do.

Just drag your track folder, such as "Example Track" onto the TrackViewer.bat, and it'll load up the preview. I noticed some minor (yet unsolved) glitches where the path might disappear for a short ways, and there might be small gaps between the end of a curve and the start of the next bit of track (I can fix that later). I can post the source if anyone wants it, it's all java code. I may consider redoing it in C/SDL later on. But I want to get all the bugs figured out first.

example.jpg
example.jpg (74.93 KiB) Viewed 9327 times


AutomationTrackViewer.zip
(310.43 KiB) Downloaded 435 times

Re: How to build Custom Tracks

PostPosted: Sun Dec 21, 2014 12:45 am
by strop
Awesome! That will be a MASSIVE help. This is a particularly valuable service you've done, especially for more complicated future efforts.

Re: How to build Custom Tracks

PostPosted: Sun Dec 21, 2014 2:43 am
by Jakgoe
Mods, can you guys make the track viewer, as well as the track editor, sticky posts? It would save any would-be track builders a fair bit of hunting.

Re: How to build Custom Tracks

PostPosted: Fri Jan 23, 2015 3:43 am
by jtreign9097
I made a track i went over it a few times in notepad ++ not sure i see anything. maybe i am missing something?... both track.png and track.lua are in there own folder. image is the correct size also

---------------------------
Lua Error:
---------------------------
tolua++ dbcall failed!: [string "--client\functional\CCustomTrackList.lua..."]:42: F:\Users\ALI\Documents\Automation\\Tracks\Bayport\track.lua:19: ']' expected near 'Object'

---------------------------


--You Can use 0, 1, -1 instead.
local STRAIGHT = 0
local LEFT = 1
local RIGHT = -1

Track = {
Name = "Bayport",
--Track Image Info
--Track Image must be 1280 x 720
--Start Position on the Image x,y from Top Left
Start = { 707, 713 },

--How many pixels per meter ( Pixels / Length )
--Measure a long straight and then manipulate from there
Scale = 1 / 1,
Layout = { LEFT, STRAIGHT, LEFT, STRAIGHT, LEFT, LEFT, LEFT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, STRAIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, },
LayoutInfo = { 8.5, 256, 10, 128, 83, 3.5, 1, 72, 25, 33, 100, 36, 9, 13, 7, 15, 2, 26, 23, 20, 6, 17, 25, 15, 28, 15, 15, 90, 90, 15, 5, 25, 3, 3, 100, 100, 15, 15, 15, 15, 4, 100, 100, 5, 100, 100, 100, 25, 15, 25, 19, 15, 15, 90, 15, 100, 100, 15, 100, 172, 90, 26, 15, 15, 100, 17, 15, 100, 15, 17, 15, 15, 15, 59, 100, 12, 19, 10, 16, 2, 2, 2, 15, 1, 1, 1, 8, },
CornerRadius = { 512, 0, 213, 0, 71, 221, 139, 0, 80, 0, 0, 100, 77, 0, 99, 50, 0, 55, 45, 155, 29, 0, 0, 0, 20, 65, 55, 10, 15, 28, 44, 0, 100, 100, 0, 0, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 15, 0, 0, 100, 0, 0, 15, 0, 25, 26, 0, 100, 100, 0, 100, 0, 100, 100, 100, 0, 0, 0, 0, 0, 5, 100, 0, 0, 2, 0, 0, 0, 0, },
Slope = { [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
Sportiness = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
Camber = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
Split1 = 45,
Split2 = ,
}

Re: How to build Custom Tracks

PostPosted: Fri Jan 23, 2015 4:57 pm
by 07CobaltGirl
jtreign9097 wrote:I made a track i went over it a few times in notepad ++ not sure i see anything. maybe i am missing something?... both track.png and track.lua are in there own folder. image is the correct size also

---------------------------
Lua Error:
---------------------------
tolua++ dbcall failed!: [string "--client\functional\CCustomTrackList.lua..."]:42: F:\Users\ALI\Documents\Automation\\Tracks\Bayport\track.lua:19: ']' expected near 'Object'

---------------------------


--You Can use 0, 1, -1 instead.
local STRAIGHT = 0
local LEFT = 1
local RIGHT = -1

Track = {
Name = "Bayport",
--Track Image Info
--Track Image must be 1280 x 720
--Start Position on the Image x,y from Top Left
Start = { 707, 713 },

--How many pixels per meter ( Pixels / Length )
--Measure a long straight and then manipulate from there
Scale = 1 / 1,
Layout = { LEFT, STRAIGHT, LEFT, STRAIGHT, LEFT, LEFT, LEFT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, RIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, LEFT, RIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, RIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, LEFT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, LEFT, STRAIGHT, RIGHT, STRAIGHT, LEFT, RIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, RIGHT, RIGHT, STRAIGHT, STRAIGHT, LEFT, STRAIGHT, STRAIGHT, STRAIGHT, STRAIGHT, },
LayoutInfo = { 8.5, 256, 10, 128, 83, 3.5, 1, 72, 25, 33, 100, 36, 9, 13, 7, 15, 2, 26, 23, 20, 6, 17, 25, 15, 28, 15, 15, 90, 90, 15, 5, 25, 3, 3, 100, 100, 15, 15, 15, 15, 4, 100, 100, 5, 100, 100, 100, 25, 15, 25, 19, 15, 15, 90, 15, 100, 100, 15, 100, 172, 90, 26, 15, 15, 100, 17, 15, 100, 15, 17, 15, 15, 15, 59, 100, 12, 19, 10, 16, 2, 2, 2, 15, 1, 1, 1, 8, },
CornerRadius = { 512, 0, 213, 0, 71, 221, 139, 0, 80, 0, 0, 100, 77, 0, 99, 50, 0, 55, 45, 155, 29, 0, 0, 0, 20, 65, 55, 10, 15, 28, 44, 0, 100, 100, 0, 0, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 15, 0, 0, 100, 0, 0, 15, 0, 25, 26, 0, 100, 100, 0, 100, 0, 100, 100, 100, 0, 0, 0, 0, 0, 5, 100, 0, 0, 2, 0, 0, 0, 0, },
Slope = { [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [object Object], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
Sportiness = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
Camber = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
Split1 = 45,
Split2 = ,
}



What are these????

Re: How to build Custom Tracks

PostPosted: Tue Mar 24, 2015 3:48 pm
by jztemple
I have a really newbie question or perhaps issue. I've downloaded three tracks from three different threads on the forum, placed the tracks in C:\Users\[my name]\Documents\Automation\Tracks in their own folders like this:

C:\Users\[my name]\Documents\Automation\Tracks\AlbertPark\
track.lua
track.png

C:\Users\[my name]\Documents\Automation\Tracks\Avus1959\
Avus 1959.txt
track.lua
track.png

C:\Users\[my name]\Documents\Automation\Tracks\Circuit de Spa-Francorchamps\
track.lua
track.png

When I start up the game and loaded a car and then went to "Custom Tracks" and opened the menu, no custom tracks appeared:
Image

What am I doing wrong? Is there another step to activate the custom tracks in the game? This is the Steam version, in case that's pertinent.

Re: How to build Custom Tracks

PostPosted: Tue Mar 24, 2015 4:28 pm
by 07CobaltGirl
The location of tracks has changed with the implementation of Steam. They are now located in ~/Documents/My Games/Automation/Tracks. Other than this change, they are still the same as they were before.