The online racing simulator

Live for Speed, Graphics Progress Report: South City - part 2

Hello Racers,

In our last report on the website we showed some images of the updated South City and demonstrated day to night transitions and night driving. Since then, Eric has continued to work on South City and Scawen has continued to develop the graphics system. We posted some intermediate progress reports on the forum.

In this report we will link to the intermediate reports, talk about more recent updates and show some new screenshots. The information is quite technical so if you aren't that interested in the internals of game development, feel free to skip straight to the screenshots which can hopefully speak for themselves!

Recent intermediate reports on the LFS Forums:

  • LFS converted to Direct3D 11
  • Tree objects moving with the wind
  • New buildings at South City
  • Image-based automatic exposure
  • Video showing exposure adjustment
  • Day and night scenes at South City
  • lfs_city_block
  • lfs_endurance_entry
  • -14641497 34292355 371751 -3224 1540 0.0 60.0
  • -29026339 34863865 2140962 10095 3260 7.4 60.0
  • -14559624 22717529 95752 -21704 -663 0.0 68.8
  • -869321 6451295 667404 15696 -368 0.0 68.8
  • 620196 2328081 856738 26967 -677 0.0 70.0
  • 2927346 21830374 151964 814 -141 0.0 70.0

A live echo render has been implemented. This replaces the old system that was pregenerated and stored in the path (an invisible structure used to track your car's location as you drive around). A special image for each ear is drawn, containing depth and angle information. The image is analysed by a compute shader on the graphics card creating a histogram for each ear. The histogram is read back by the CPU and used to update the reverberators.

For people who don't know all about graphics cards, a compute shader is a special program that runs on the GPU. The modern GPU is really a special computer that can do some things very quickly by doing the same calculation on hundreds or thousands of different pixels simultaneously. These days it is not only about drawing triangles. The automatic exposure histogram is now also calculated by a compute shader, saving CPU time.

A new system has been developed for occlusion culling. This is the process of not drawing (in each frame) objects that are 'occluded' because they are hidden by nearer objects. The frame rate must stay high even in an environment full of detailed objects. For example you may be near a building so there is no point drawing thousands of objects that are behind it. This is especially important for driving views as we must first draw mirror views then the main view. In VR it's even worse as these views are drawn twice each, slightly offset for each eye. Also we can avoid drawing some objects into the shadow maps, as there is no point casting shadows onto objects we cannot see.

The difficulty is in knowing which objects are hidden. Until now, the visible objects were stored in the path. For open configurations we needed to add paths for side roads, car parks and open areas to keep the frame rate high. The paths were also used for lighting and echo information

With the multi-storey car parks at South City it was hard to see how to make a path to cover all driveable areas. So we now have an octree system that analyses the driveable surfaces and creates cuboids to cover all places you might be in your car. The octree is subdivided where necessary to deal with multiple ground heights, such as bridges, tunnels and car parks. The occlusion data is computed and stored in the octree, then used to switch off areas that cannot be seen from your location.

  • lfs_occlusion_octree_SO
  • lfs_occlusion_octree_WE

The shadow system has been optimised to allow sunset and sunrise with good frame rates. Realtime shadows are very important for realistic graphics and allow lighting to change with time. The shadow maps are a series of special images of the world, drawn from the direction of the sun, containing depth information so the GPU can calculate whether each pixel in your view is in the sun or shade. One notable problem for performance is when the sun is low in the sky and you are on the far side of the track area, away from the sun. In this case so many of the world's objects are between the sun and your view, and any of these objects might contribute to the shadows you can see. By taking a more detailed look at which objects are visible from your location, LFS can now reduce the area drawn into the shadow maps.

  • lfs_shadows_1_before
  • lfs_shadows_2_after
  • lfs_shadows_3_explain
  • lfs_shadows_4_external

Finally we'd like to show you a few more work-in-progress screenshots of the updated South City. Extra areas and scenery are being added and roads are being opened increasing the possibilities of extra configurations.

  • 17763992 -7937747 396162 24174 -447 0.0 60.0
  • 18780153 -20095234 102881 -19066 -1132 0.0 60.0
  • -19121831 -33605024 451767 6919 -290 0.0 60.0
  • -17546215 -22797626 393577 -3131 -234 0.0 60.0
  • 14825267 -22931216 134750 29206 -1761 0.0 60.0
  • 7138327 29985839 77549 -1401 -828 0.0 70.0
  • -9521094 43107534 1535260 4921 743 0.0 70.0
  • 7738360 27097804 903916 7657 1481 0.0 60.0
  • -1415383 -7098539 868189 -17881 -1712 0.0 60.0
  • 8054406 289469 517851 -25895 -258 0.0 60.0
  • 18697312 -1066939 224982 4985 -704 0.0 70.0
  • 16317718 -14767805 402687 29170 369 0.0 60.0

We hope you like the pictures and videos!

Please check out our next progress report for further progress news.

- LFS Developers


Further reading: Graphics Progress Report: South City - part 3

FGED GREDG RDFGDR GSFDG