racer home

Lidar file format

 

Home Fine resolution surface data in the form of LIDAR.


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

 

Introduction

Racer is used in professional race simulators where things often go beyond what you'd normally encounter doing mods for a racing game. One of these things is the track surface, which on the high-end can be defined using LIDAR points. LIDAR is conceptually just a big chunk of points (XYZ and sometimes color data) from which the user has to create something drivable from. Data sets are generally very large, so you may be limited to what you can process in a limited timeframe.

Note that the RLD format is currently only available in licensed versions of Racer.

Racer's Lidar file format

Racer accepts binary Lidar files with an .RLD extension (Racer LiDar). The file format is a very simple binary file.

Part Description
Header

char[4] RLD0
char[4] HEAD
int32 points
int32 triangles

Points char[4] "VERT"
points times float x,y,z
Triangles char[4] "TRIS"
triangles times int32 index[3] (indices into VERT array)
Blocks

char[4] "BLKI"
int32 blocks
int32 blockStart[blocks]
int32 blockPoints[blocks]

For example: blocks=1, blockStart[0]=0, blockPoints[0]=100 (if points=100) would define a single block. Some debugging paint functions may colorize these blocks; other than that, this part really has no function.

The points are 3D vertices, the triangles indicate which vertex (point) is used for each Lidar mesh triangle (normally use counter-clockwise ordering to get the right normal).

The blocks may need some explaining; often, the Lidar data is split into geographical parts (called 'blocks' here). This is nothing more than some metadata which is used in Racer to give different blocks different colors.

Example binary file

Here is an example dump extract from an actual .rld file, which contains a 81 (0x51) points and 128 triangles. The binary file can be downloaded at this link.


00000000: 52 4c 44 30 48 45 41 44 51 00 00 00 80 00 00 00   RLD0HEADQ.......
00000010: 56 45 52 54 35 5e 3c c1 9a 99 a9 40 df b0 29 43 VERT5^<....@..)C
00000020: f6 28 20 c1 a8 c6 85 40 87 b7 29 43 b6 f3 03 c1 .( ....@..)C....
00000030: 6d e7 43 40 d7 c4 29 43 33 33 97 c0 aa f1 52 3f m.C@..)C33....R?
00000040: 6a dc 29 43 cb a1 3d c0 3d 0a 97 be b4 e8 29 43 j.)C..=.=.....)C
00000050: 5e ba 99 bf b8 1e b5 bf 1d fa 29 43 12 83 48 c1 ^.........)C..H.
00000060: 3b df 83 40 a4 b0 29 43 a2 45 2c c1 ec 51 40 40 ;..@..)C.E,..Q@@
00000070: 4c b7 29 43 31 08 10 c1 fc a9 f1 3f 5a c4 29 43 L.)C1......?Z.)C
00000080: b2 9d e7 c0 cb a1 45 3f 6f d2 29 43 d1 22 af c0 ......E?o.)C."..
00000090: d7 a3 b0 be ac dc 29 43 df 4f 6d c0 0c 02 bb bf ......)C.Om.....
000000a0: b4 e8 29 43 39 b4 f8 bf f4 fd 24 c0 db f9 29 43 ..)C9.....$...)C
000000b0: e5 d0 54 c1 96 43 3b 40 62 b0 29 43 fe d4 38 c1 ..T..C;@b.)C..8.
000000c0: 1d 5a e4 3f 0a b7 29 43 17 d9 1c c1 1d 5a 24 3f .Z.?..)C.....Z$?
000000d0: dd c4 29 43 2f dd 00 c1 00 00 00 bf 33 d3 29 43 ..)C/.......3.)C
000000e0: 5e ba c9 c0 0e 2d d2 bf 71 dd 29 43 8f c2 91 c0 ^....-..q.)C....
000000f0: ac 1c 32 c0 73 e8 29 43 81 95 33 c0 33 33 7b c0 ..2.s.)C..3.33{.
00000100: 9a f9 29 43 fa 7e 62 c1 44 8b cc 3f 21 b0 29 43 ..)C.~b.D..?!.)C
00000110: a2 45 46 c1 6a bc f4 3e 87 b6 29 43 4a 0c 2a c1 .EF.j..>..)CJ.*.
00000120: 1d 5a 24 bf 5a c4 29 43 0a d7 0d c1 73 68 e1 bf .Z$.Z.)C....sh..
00000130: b0 d2 29 43 64 3b e3 c0 4e 62 38 c0 71 dd 29 43 ..)Cd;..Nb8.q.)C
00000140: b4 c8 aa c0 31 08 80 c0 b4 e8 29 43 08 ac 64 c0 ....1.....)C..d.
00000150: 0a d7 a3 c0 58 f9 29 43 f8 53 6f c1 6a bc b4 3e ....X.)C.So.j..>
00000160: 62 b0 29 43 1b 2f 53 c1 66 66 46 bf 87 b6 29 43 b.)C./S.ffF...)C
00000170: 3d 0a 37 c1 81 95 f3 bf 9c c4 29 43 79 e9 1a c1 =.7.......)Cy...
00000180: 4a 0c 42 c0 33 d3 29 43 37 89 fd c0 b8 1e 85 c0 J.B.3.)C7.......
00000190: b2 dd 29 43 7d 3f c5 c0 4c 37 a9 c0 f0 e7 29 43 ..)C}?..L7....)C
000001a0: f4 fd 8c c0 df 4f cd c0 17 f9 29 43 d9 ce 7b c1 .....O....)C..{.
000001b0: 6d e7 5b bf 21 b0 29 43 d9 ce 5f c1 62 10 00 c0 m.[.!.)C.._.b...
000001c0: 46 b6 29 43 d9 ce 43 c1 e9 26 49 c0 5a c4 29 43 F.)C..C..&I.Z.)C
000001d0: d9 ce 27 c1 b8 1e 89 c0 f2 d2 29 43 d9 ce 0b c1 ..'.......)C....
000001e0: fc a9 ad c0 b2 dd 29 43 b2 9d df c0 3f 35 d2 c0 ......)C....?5..
000001f0: f0 e7 29 43 b2 9d a7 c0 83 c0 f6 c0 93 f8 29 43 ..)C..........)C
00000200: 39 b4 12 c1 50 8d af 40 c2 b7 29 43 21 b0 2e c1 9...P..@..)C!...
00000210: 65 19 d4 40 1a b1 29 43 a4 70 ed c0 0c 02 8b 40 e..@..)C.p.....@
00000220: 95 c5 29 43 d5 78 b5 c0 91 ed 4c 40 eb d3 29 43 ..)C.x....L@..)C
00000230: aa f1 7a c0 ae d8 03 40 28 de 29 43 0c 02 0b c0 ..z....@(.)C....
00000240: 96 43 6b 3f 2a e9 29 43 75 93 d8 be 1d 5a 64 be .Ck?*.)Cu....Zd.
00000250: 51 fa 29 43 81 95 cf c0 39 b4 f8 3f f2 d2 29 43 Q.)C....9..?..)C
00000260: 5f 07 ae bf b5 37 a8 bf 8d f8 29 43 e4 83 06 c0 _....7....)C....
00000270: 5c 8f 1e c0 52 f8 29 43 58 a8 3d c0 ed 9e 74 c0 \...R.)CX.=...t.
00000280: 10 f8 29 43 d0 d5 6e c0 1b 9e a0 c0 dc f7 29 43 ..)C..n.......)C
00000290: ed 0d 92 c0 62 10 ca c0 8d f7 29 43 f0 a7 ac c0 ....b.....)C....
000002a0: 60 76 f3 c0 11 f7 29 43 18 95 14 bf 6b 2b f6 bd `v....)C....k+..
000002b0: c8 f8 29 43 2c d4 39 c1 aa 60 a6 40 76 b1 29 43 ..)C,.9..`.@v.)C
000002c0: a1 f8 45 c1 f0 a7 80 40 3b b1 29 43 30 4c 52 c1 ..E....@;.)C0LR.
000002d0: 4f af 34 40 f9 b0 29 43 88 f4 5f c1 40 a4 bf 3f O.4@..)C.._.@..?
000002e0: b1 b0 29 43 92 cb 6c c1 9c c4 80 3e f2 b0 29 43 ..)C..l....>..)C
000002f0: ba 49 79 c1 86 38 76 bf b1 b0 29 43 6b 2b 2c c1 .Iy..8v...)Ck+,.
00000300: 42 cf d0 40 b1 b1 29 43 f0 a7 84 c1 aa f1 0a c0 B..@..)C........
00000310: df af 29 43 02 2b 6d c1 d1 22 53 c0 46 b6 29 43 ..)C.+m.."S.F.)C
00000320: 25 06 51 c1 fc a9 8d c0 d7 c3 29 43 48 e1 34 c1 %.Q.......)CH.4.
00000330: 8f c2 b1 c0 b0 d2 29 43 6a bc 18 c1 23 db d5 c0 ......)Cj...#...
00000340: 35 de 29 43 1b 2f f9 c0 b6 f3 f9 c0 ae e7 29 43 5.)C./........)C
00000350: 60 e5 c0 c0 25 06 0f c1 52 f8 29 43 dd 24 06 c1 `...%...R.)C.$..
00000360: be 9f d6 40 03 b8 29 43 4e 62 22 c1 04 56 fa 40 ...@..)CNb"..V.@
00000370: 5b b1 29 43 d9 ce d3 c0 48 e1 b2 40 12 c5 29 43 [.)C....H..@..)C
00000380: 29 5c 9b c0 02 2b 8f 40 26 d3 29 43 8f c2 45 c0 )\...+.@&.)C..E.
00000390: ba da 56 40 64 dd 29 43 9a 99 a9 bf 8b 6c 0f 40 ..V@d.)C.....l.@
000003a0: 6c e9 29 43 ae 47 e1 3e 3b df 8f 3f 93 fa 29 43 l.)C.G.>;..?..)C
000003b0: 2b f6 c5 c0 66 66 0d c1 d6 f6 29 43 72 f9 8f 3e +...ff....)Cr..>
000003c0: b1 bf 9c 3f 09 f9 29 43 bd 63 83 c1 a4 70 11 c0 ...?..)C.c...p..
000003d0: 76 b0 29 43 73 d7 1f c1 8a 1f f7 40 f2 b1 29 43 v.)Cs......@..)C
000003e0: 54 52 49 53 38 00 00 00 39 00 00 00 07 00 00 00 TRIS8...9.......
000003f0: 07 00 00 00 01 00 00 00 38 00 00 00 01 00 00 00 ........8.......
00000400: 07 00 00 00 08 00 00 00 08 00 00 00 02 00 00 00 ................
00000410: 01 00 00 00 02 00 00 00 08 00 00 00 09 00 00 00 ................
00000420: 09 00 00 00 30 00 00 00 02 00 00 00 30 00 00 00 ....0.......0...
00000430: 09 00 00 00 0a 00 00 00 0a 00 00 00 03 00 00 00 ................
00000440: 30 00 00 00 03 00 00 00 0a 00 00 00 0b 00 00 00 0...............
00000450: 0b 00 00 00 04 00 00 00 03 00 00 00 31 00 00 00 ............1...
00000460: 32 00 00 00 0c 00 00 00 0c 00 00 00 05 00 00 00 2...............
00000470: 31 00 00 00 39 00 00 00 3a 00 00 00 0e 00 00 00 1...9...:.......
00000480: 0e 00 00 00 07 00 00 00 39 00 00 00 07 00 00 00 ........9.......
00000490: 0e 00 00 00 0f 00 00 00 0f 00 00 00 08 00 00 00 ................
000004a0: 07 00 00 00 08 00 00 00 0f 00 00 00 10 00 00 00 ................
000004b0: 10 00 00 00 09 00 00 00 08 00 00 00 09 00 00 00 ................
000004c0: 10 00 00 00 11 00 00 00 11 00 00 00 0a 00 00 00 ................
000004d0: 09 00 00 00 0a 00 00 00 11 00 00 00 12 00 00 00 ................ 000004e0: 12 00 00 00 0b 00 00 00 0a 00 00 00 32 00 00 00 ............2...
000004f0: 33 00 00 00 13 00 00 00 13 00 00 00 0c 00 00 00 3...............
00000500: 32 00 00 00 3a 00 00 00 3b 00 00 00 15 00 00 00 2...:...;.......
00000510: 15 00 00 00 0e 00 00 00 3a 00 00 00 0e 00 00 00 ........:.......
00000520: 15 00 00 00 16 00 00 00 16 00 00 00 0f 00 00 00 ................
00000530: 0e 00 00 00 0f 00 00 00 16 00 00 00 17 00 00 00 ................
00000540: 17 00 00 00 10 00 00 00 0f 00 00 00 10 00 00 00 ................
00000550: 17 00 00 00 18 00 00 00 18 00 00 00 11 00 00 00 ................
00000560: 10 00 00 00 11 00 00 00 18 00 00 00 19 00 00 00 ................
00000570: 19 00 00 00 12 00 00 00 11 00 00 00 33 00 00 00 ............3...
00000580: 34 00 00 00 1a 00 00 00 1a 00 00 00 13 00 00 00 4...............
00000590: 33 00 00 00 3b 00 00 00 3c 00 00 00 1c 00 00 00 3...;...<.......
000005a0: 1c 00 00 00 15 00 00 00 3b 00 00 00 15 00 00 00 ........;.......
000005b0: 1c 00 00 00 1d 00 00 00 1d 00 00 00 16 00 00 00 ................
000005c0: 15 00 00 00 16 00 00 00 1d 00 00 00 1e 00 00 00 ................
000005d0: 1e 00 00 00 17 00 00 00 16 00 00 00 17 00 00 00 ................
000005e0: 1e 00 00 00 1f 00 00 00 1f 00 00 00 18 00 00 00 ................
000005f0: 17 00 00 00 18 00 00 00 1f 00 00 00 20 00 00 00 ............ ...
00000600: 20 00 00 00 19 00 00 00 18 00 00 00 34 00 00 00 ...........4...
00000610: 35 00 00 00 21 00 00 00 21 00 00 00 1a 00 00 00 5...!...!.......
00000620: 34 00 00 00 3c 00 00 00 3d 00 00 00 23 00 00 00 4...<...=...#...
00000630: 23 00 00 00 1c 00 00 00 3c 00 00 00 1c 00 00 00 #.......<.......
00000640: 23 00 00 00 24 00 00 00 24 00 00 00 1d 00 00 00 #...$...$.......
00000650: 1c 00 00 00 1d 00 00 00 24 00 00 00 25 00 00 00 ........$...%...
00000660: 25 00 00 00 1e 00 00 00 1d 00 00 00 1e 00 00 00 %...............
00000670: 25 00 00 00 26 00 00 00 26 00 00 00 1f 00 00 00 %...&...&.......
00000680: 1e 00 00 00 1f 00 00 00 26 00 00 00 27 00 00 00 ........&...'...
00000690: 27 00 00 00 20 00 00 00 1f 00 00 00 35 00 00 00 '... .......5...
000006a0: 36 00 00 00 28 00 00 00 28 00 00 00 21 00 00 00 6...(...(...!...
000006b0: 35 00 00 00 3d 00 00 00 4f 00 00 00 40 00 00 00 5...=...O...@...
000006c0: 40 00 00 00 23 00 00 00 3d 00 00 00 23 00 00 00 @...#...=...#...
000006d0: 40 00 00 00 41 00 00 00 41 00 00 00 24 00 00 00 @...A...A...$...
000006e0: 23 00 00 00 24 00 00 00 41 00 00 00 42 00 00 00 #...$...A...B...
000006f0: 42 00 00 00 25 00 00 00 24 00 00 00 25 00 00 00 B...%...$...%...
00000700: 42 00 00 00 43 00 00 00 43 00 00 00 26 00 00 00 B...C...C...&...
00000710: 25 00 00 00 26 00 00 00 43 00 00 00 44 00 00 00 %...&...C...D...
00000720: 44 00 00 00 27 00 00 00 26 00 00 00 36 00 00 00 D...'...&...6...
00000730: 4d 00 00 00 45 00 00 00 45 00 00 00 28 00 00 00 M...E...E...(...
00000740: 36 00 00 00 50 00 00 00 3e 00 00 00 29 00 00 00 6...P...>...)...
00000750: 29 00 00 00 46 00 00 00 50 00 00 00 46 00 00 00 )...F...P...F...
00000760: 29 00 00 00 2b 00 00 00 2b 00 00 00 48 00 00 00 )...+...+...H...
00000770: 46 00 00 00 48 00 00 00 2b 00 00 00 2c 00 00 00 F...H...+...,...
00000780: 2c 00 00 00 49 00 00 00 48 00 00 00 49 00 00 00 ,...I...H...I...
00000790: 2c 00 00 00 2d 00 00 00 2d 00 00 00 4a 00 00 00 ,...-...-...J...
000007a0: 49 00 00 00 4a 00 00 00 2d 00 00 00 2e 00 00 00 I...J...-.......
000007b0: 2e 00 00 00 4b 00 00 00 4a 00 00 00 4e 00 00 00 ....K...J...N...
000007c0: 37 00 00 00 2f 00 00 00 2f 00 00 00 4c 00 00 00 7.../.../...L...
000007d0: 4e 00 00 00 3e 00 00 00 38 00 00 00 01 00 00 00 N...>...8.......
000007e0: 01 00 00 00 29 00 00 00 3e 00 00 00 29 00 00 00 ....)...>...)...
000007f0: 01 00 00 00 02 00 00 00 02 00 00 00 2b 00 00 00 ............+...
00000800: 29 00 00 00 2b 00 00 00 02 00 00 00 30 00 00 00 )...+.......0...
00000810: 30 00 00 00 2c 00 00 00 2b 00 00 00 2c 00 00 00 0...,...+...,...
00000820: 30 00 00 00 03 00 00 00 03 00 00 00 2d 00 00 00 0...........-...
00000830: 2c 00 00 00 2d 00 00 00 03 00 00 00 04 00 00 00 ,...-...........
00000840: 04 00 00 00 2e 00 00 00 2d 00 00 00 37 00 00 00 ........-...7...
00000850: 31 00 00 00 05 00 00 00 05 00 00 00 2f 00 00 00 1.........../...
00000860: 37 00 00 00 04 00 00 00 0b 00 00 00 32 00 00 00 7...........2...
00000870: 32 00 00 00 31 00 00 00 04 00 00 00 0b 00 00 00 2...1...........
00000880: 12 00 00 00 33 00 00 00 33 00 00 00 32 00 00 00 ....3...3...2...
00000890: 0b 00 00 00 12 00 00 00 19 00 00 00 34 00 00 00 ............4...
000008a0: 34 00 00 00 33 00 00 00 12 00 00 00 19 00 00 00 4...3...........
000008b0: 20 00 00 00 35 00 00 00 35 00 00 00 34 00 00 00 ...5...5...4...
000008c0: 19 00 00 00 20 00 00 00 27 00 00 00 36 00 00 00 .... ...'...6...
000008d0: 36 00 00 00 35 00 00 00 20 00 00 00 27 00 00 00 6...5... ...'...
000008e0: 44 00 00 00 4d 00 00 00 4d 00 00 00 36 00 00 00 D...M...M...6...
000008f0: 27 00 00 00 4b 00 00 00 2e 00 00 00 37 00 00 00 '...K.......7...
00000900: 37 00 00 00 4e 00 00 00 4b 00 00 00 2e 00 00 00 7...N...K.......
00000910: 04 00 00 00 31 00 00 00 31 00 00 00 37 00 00 00 ....1...1...7...
00000920: 2e 00 00 00 00 00 00 00 06 00 00 00 39 00 00 00 ............9...
00000930: 39 00 00 00 38 00 00 00 00 00 00 00 06 00 00 00 9...8...........
00000940: 0d 00 00 00 3a 00 00 00 3a 00 00 00 39 00 00 00 ....:...:...9...
00000950: 06 00 00 00 0d 00 00 00 14 00 00 00 3b 00 00 00 ............;...
00000960: 3b 00 00 00 3a 00 00 00 0d 00 00 00 14 00 00 00 ;...:...........
00000970: 1b 00 00 00 3c 00 00 00 3c 00 00 00 3b 00 00 00 ....<...<...;...
00000980: 14 00 00 00 1b 00 00 00 22 00 00 00 3d 00 00 00 ........"...=...
00000990: 3d 00 00 00 3c 00 00 00 1b 00 00 00 22 00 00 00 =...<......."...
000009a0: 3f 00 00 00 4f 00 00 00 4f 00 00 00 3d 00 00 00 ?...O...O...=...
000009b0: 22 00 00 00 47 00 00 00 2a 00 00 00 3e 00 00 00 "...G...*...>...
000009c0: 3e 00 00 00 50 00 00 00 47 00 00 00 2a 00 00 00 >...P...G...*...
000009d0: 00 00 00 00 38 00 00 00 38 00 00 00 3e 00 00 00 ....8...8...>...
000009e0: 2a 00 00 00 42 4c 4b 49 01 00 00 00 00 00 00 00 *...BLKI........
000009f0: 51 00 00 00 Q...

Axis system

Most axis systems in Racer follow the OpenGL format. Since Lidar is most often used in high-end situations, this format follows the ISO format. Upon loading, Racer will internally convert to OpenGL format implicitly. Notice the ISO axis system is X=forward, Y=left, Z=up.

Future changes

Not many changes are expected, because of the simplicity of the format. However, a 'normal' section may be added to pregenerate smoothed normals.

 

Generating RLD files

Although for high-end purposes you might want to directly generate RLD files, you can also create them in alternative ways.

Generating RLD files - ASE to RLD

This method uses a console command in Racer to create an RLD file from an ASE file. The steps involved:

Then to make an RLD file out of an ASE file:

To test whether it worked, continue:

 


 
Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated July 3, 2014 )