Today we'd like to explain a new graphical feature that we are introducing to our games with update 1.38. The article is very technical - we have asked our programmers to help out, and the explanation is quite complex. However, we felt that it may actually be interesting for at least some of the people in our audience to be exposed to this material - to see that what is happening under the hood of a game engine involves a lot of research and hard work of our programming team. In addition to the technical details, we thought that providing the context and explaining the performance trade-offs may be useful and important for most of the players.
Jaroslav a.k.a. Cim (one of our brave and skilled programmers working on graphics improvements)
The TL;DR summary of the text below is that Screen Space Ambient Occlusion is a cool new but performance-heavy technique to enrich the rendering of our game world. You do not have to use it if you feel it lowers performance too much for your liking, or you may like it and can afford to trade a few frames per second for improved shadow and depth perception. The effect may be subtle, it mostly works on subconsciousness level, but once you get used to it, it may be hard to go back. It is another milestone in our lighting/shadowing improvements plan that we are now executing, to be followed by new HDR light processing and introduction of more normal-mapped surfaces in upcoming updates.
The technique has its limitations and quirks. It has been used by several AAA games in recent years, and even if it's not perfect, it helps the human perception system to understand the scene better, and we hope that adding it to the technology mix of our truck sims is beneficial. We will no doubt want to introduce additional ways of shadowing computation that will improve or even supersede it.
[table][tr]
[td]
[/td]
[td]
[/td]
[/tr][/table]
We are under constant pressure to improve the looks of our game by a vocal subset of our fan base. At the same time, there is always a desire to make the games run faster. On top of these sometimes competing requests coming from the playerbase, our very own art department is ever eager to get hold of new graphical toys to make our game richer and better. Whenever we introduce a new graphical feature into the game, we try to do it in a way that doesn't hurt the performance for players with older computers, we don't want to make the game incompatible for our existing customers. That's why there is an option to switch SSAO off completely, and several settings for its quality/performance.
[table][tr]
[td]
[/td]
[td]
[/td]
[/tr][/table]
The work of our programmers on the new SSAO/HBAO techniques also required changes to our art and art creation pipeline. All the 3D models in our games had to be revisited by the art department, and any instances, where any fake shadows and darkening were already applied to a model by an artist, were changed. For some more complex game models, this was a simplification that actually reduced the number of triangles in them enough to improve rendering performance. To some extent, we have traded a part of tentative future manual effort that would be needed for building individual good-looking 3D models for an algorithmic rendering pass that unifies the shadowing look for the whole scene, helping to "root" objects like buildings, lamp-posts, and vegetation to the terrain.
[table]
[tr]
[td]
[/td]
[td]
[/td]
[/tr][tr]
[td]
[/td]
[td]
[/td]
[/tr][tr]
[td]
[/td]
[td]
[/td]
[/tr][tr]
[td]
[/td]
[td]
[/td]
[/tr]
[/table]
What SSAO stands for and how it works
Before we start - note that SSAO is a general acronym for "screen space ambient occlusion". The name encompasses all of the various ambient occlusion (AO) techniques and their variants that work in screen space (it means that they obtain all information at runtime from data that are rendered on the computer screen and into related memory buffers). There is SSAO (Crytek 2007 tech that basically gave a general name to all techniques), MSSAO, HBAO, HDAO, GTAO, and many more other techniques each using differently tuned approaches, each having its benefits and downsides. We have based our approach on a horizon-based technique called GTAO that was introduced in a 2016 paper by Activision. The ambient occlusion (AO) name part means that we evaluate how much of incoming light (predominantly sky light, but sometimes the computed occlusion gets applied also to other lights) gets occluded at a particular place in the game world. Imagine that you are standing on flat ground - you would see the whole sky above, so there is 0% occlusion, the ground gets fully lit by the sky. Now imagine that you are at the bottom of a well - you would see only a small patch of sky, that means sky gets occluded almost 100% and contributes only a little to the ambient lighting in that well, and naturally it is quite dark at the bottom of the well. A specific level of ambient occlusion at a particular place affects lighting computations and creates shadowed areas in creases, holes, and other 'complex' places. It can get anywhere between 0% and 100% based on their surroundings. [table] [tr] [td]
[/td] [td]
[/td] [/tr][tr] [td]
[/td] [td]
[/td] [/tr] [/table] Computing the occlusion in high detail and precision is resource-intensive; basically, you would need to shoot rays from any evaluated position in all directions and test whether they hit the sky or not, and then average the result. The more rays you shoot, the better information you get but at a greater computation cost. This process could be possibly processed off-line, like when the game map gets saved by its designer. Some games and engines use this approach. But that way you are only able to bake ambient occlusion information about static non-moving objects because there are no vehicles, no animated objects present at that time. So instead of baking static information (which would also take a lot of time and storage space given the scale of our world map), we want to compute it on the fly, in run-time. That way we can compute it also for interaction with vehicles, opening bridges, animated objects, and so on. There is a catch though. For such a computation approach, we only have data that are visible on the screen (recall "screen space"), so once some part of the game world gets out of the visible frame, it can't be used for occlusion evaluation. This limitation creates various artifacts such as disappearing occlusion on a wall originally caused by an object that just got behind the edge of the screen and thus became invisible not just for you but also for the algorithm, so it ceased to contribute to occlusion computation. [table] [tr] [td]
[/td] [td]
[/td] [/tr][tr] [td]
[/td] [td]
[/td] [/tr][/table] Ok, now we know what to evaluate (ambient occlusion) and we know what data we have (what we see on screen). What do we do? Well, for each pixel on the screen (that is 2 million pixels in HD resolution, times four(!) in 400% scaling!) our shader code needs to query the z-buffer value of its surrounding pixels trying to get a notion of the geometric shape of the area surrounding it. We can do only a limited number of these "taps" as there is a steeply increasing performance cost with increasing tap count, this is an operation that is really taxing the 3D accelerator. The limit on the number of taps, in turn, affects the ambient occlusion precision (and in certain situations may create inaccuracies and banding). Imagine that you want to evaluate your surroundings on a 2-meter straight line, and are willing to spend 8 taps to approximate it. You query the line every 25 centimeters, and any detail smaller than that may happen to be totally unnoticed unless you are lucky and hit it spot on (or unlucky, because you may miss it the next frame so the surroundings would suddenly appear to change between frames and cause flickering). The further your algorithm probes, the less precise it is. So you need to limit the size of an area you analyze around each game pixel which in turn limits how far the AO 'sees' - that is why it is not suitable for computing occlusion in large spaces like under bridge arches. [table] [tr] [td]
[/td] [td]
[/td] [/tr][tr] [td]
[/td] [td]
[/td] [/tr][/table] We have mentioned that the technique of our choosing is horizon-based. This means that we are not probing the environment by shooting rays in the 3D world, instead, we analyze a hemisphere above/around each pixel to see how far it opens up until it is blocked, how much light is let in by the surrounding geometry using the z-buffer as our proxy. The hemisphere is actually approximated by several runs along a line rotated around the given pixel. If we can follow along this hemisphere in full, there is no occlusion. If the algorithm taps a value in the z-buffer that would block incoming light, it defines the level of occlusion. The algorithm is optimized for performance but its limitation is that once it hits anything, even possibly a small object, it stops probing any further. This may cause an "over occlusion" problem and may be spotted as a visual artifact when some relatively thin object such as a traffic sign post causes strong occlusion on a nearby wall. You can try to detect such small objects and skip them, which in turn may produce "under occlusion" on thin ledges. We have opted for the former. [table] [tr] [td]
[/td] [td]
[/td] [/tr][tr] [td]
[/td] [td]
[/td] [/tr][/table] There is also another interesting and useful property of horizon based techniques. Depending on how much of a hemisphere above a given pixel is occluded, you can compute the direction that is least occluded. The amount of occlusion can be thought of as an ice cream cone with varying apex angle oriented in that direction. This direction is called a "bent normal" and we use it for various light computations like for occluding a reflection on shiny surfaces. The idea is that if you look at the surface and the mirror-reflected direction gets out of this cone, we consider it (at least partially) occluded, tuning down the reflection intensity. The best way to see that effect is to look at bigger and round chrome parts, like the diesel tanks, with SSAO on and off. [table] [tr] [td]
[/td] [td]
[/td] [/tr][tr] [td]
[/td] [td]
[/td] [/tr][/table] So you see, the idea is not that hard, for an expert graphics programmer anyway ;), but there is a lot of computation involved, putting quite some strain on the 3D accelerator. So we have created several performance profiles, each using a mix of optimization techniques:
- Using less taps per direction - it is faster but lets AO miss bigger objects than with finer sampling.
- Reprojecting AO results from the previous frame - it lets us hide the artifacts from undersampling, but may create ghosting when reprojection fails (when what you see between frames changes a lot).
- Rendering in half-resolution - reduces the number of computations to 1/4 but creates less fine AO - the result may be slightly blurry shadowing
[ 2020-07-07 17:08:25 CET ] [ Original post ]
🕹️ Partial Controller Support
- American Truck Simulator - Linux [20.12 M]
- American Truck Simulator - Steampunk Paint Jobs Pack
- American Truck Simulator - Wheel Tuning Pack
- American Truck Simulator - Arizona
- American Truck Simulator - Steering Creations Pack
- American Truck Simulator - Halloween Paint Jobs Pack
- American Truck Simulator - Christmas Paint Jobs Pack
- American Truck Simulator - Valentine's Paint Jobs Pack
- American Truck Simulator - Heavy Cargo Pack
- American Truck Simulator - New Mexico
- American Truck Simulator - Oregon
- American Truck Simulator - Classic Stripes Paint Jobs Pack
- American Truck Simulator - Special Transport
- American Truck Simulator - Washington
- American Truck Simulator - Forest Machinery
- American Truck Simulator - Utah
- American Truck Simulator - Space Paint Jobs Pack
- American Truck Simulator - Pink Ribbon Charity Pack
- American Truck Simulator - Idaho
- American Truck Simulator - Colorado
- American Truck Simulator - Mack Anthem®
- American Truck Simulator - Freightliner Cascadia® (3r/4th Generation)
- American Truck Simulator - Western Star® 49X
- American Truck Simulator - Wyoming
- American Truck Simulator - Texas
- American Truck Simulator - Cabin Accessories
- American Truck Simulator - Goodyear Tires Pack
- American Truck Simulator - Volvo Construction Equipment
- American Truck Simulator - International LT®
- American Truck Simulator - Retrowave Paint Jobs Pack
- American Truck Simulator - Montana
- American Truck Simulator - International 9900i
- American Truck Simulator - Lode King & Prestige Trailers Pack
- American Truck Simulator - Western Star® 57X
- American Truck Simulator - Oklahoma
- American Truck Simulator - Wild West Paint Jobs Pack
- American Truck Simulator - Kansas
- American Truck Simulator - Western Star® 5700XE
- American Truck Simulator - Volvo VNL
- American Truck Simulator - W900 Tuning Pack
- American Truck Simulator - Nebraska
- American Truck Simulator - Arkansas
- American Truck Simulator - Farm Machinery
- American Truck Simulator - Michelin Fan Pack
- American Truck Simulator - Kenworth T680 2022
- American Truck Simulator - Sports Paint Jobs Pack
- American Truck Simulator - JCB Equipment Pack
- American Truck Simulator - Mack Pinnacle
- American Truck Simulator - Freightliner Cascadia® (The Fifth Generation)
Game mechanics are based on the highly successful model from Euro Truck Simulator 2 and have been expanded with new features, creating the most captivating game experience from SCS Software.
American Truck Simulator puts you in the seat of a driver for hire entering the local freight market, making you work your way up to become an owner-operator, and go on to create one of the largest transportation companies in the United States.
Features
- Drive highly detailed truck models officially licensed from iconic truck manufacturers.
- Your truck is your new home. Make it yours by changing cabins, chassis, paintjobs, adding tuning accessories or more powerful engines.
- Lots of different cargoes to choose: From food to machinery to hazard cargoes.
- Multiple types of trailers – from reefers to flatbeds, from dumpers to lowboys and goosenecks.
- The longest trailers (up to 53 ft) will challenge your skills and patience while hauling and during parking.
- Deliver your cargoes to a rich variety of companies and locations like refineries, oil storage, gas stations, car factories, or roadworks.
- Various simulation settings for trucking enthusiasts: Air brake simulation; different types of brakes: retarder, Jake brake, trailer brake; multiple types of transmissions straight from real trucks, brake intensity, and more.
- Feel like inside a real cabin: Adjust your seat, mirrors and position your head to get the best view of the road.
- Drive safely, follow the rules and speed limits – police will fine you if you aren't careful!
- Ensure that you are not delivering overweight cargo – you may be checked at the weigh scales.
- Use the route adviser as your personal assistant during the travels.
- Try the life of a truck driver for hire. By delivering the cargoes safely and improving your skills, become the owner of your own, successful company!
- Build your own fleet of trucks, buy garages, hire drivers, manage your company for maximum profits.
- Make your trucking time better by listening to your favorite songs via built-in music player or streaming your favorite radio stations.
- Capture your favorite moments with a photo mode offering rich set of editing options.
- Great support for steering wheels, gamepads and other input devices.
- Long-time support of the game, including new features.
- Obtain challenging Steam achievements and collect all hand-painted Steam trading cards.
World of Trucks
Take advantage of additional features of American Truck Simulator by joining our online community on World of Trucks, our center for virtual truckers all around the world interested in Euro Truck Simulator 2, American Truck Simulator and future SCS Software's truck simulators.
- Use in-game Photo Mode to capture the best moments and share them with thousands of people who love trucks.
- Favorite the images you like the most and return to them anytime in the future.
- Discuss the screenshots with everyone using World of Trucks.
- See the best images hand-picked by the game creators in Editor's Pick updated almost every day. Try to get your own screenshot on this list!
- Upload and use your custom avatar and license plate in the game.
- More features coming soon!
To join World of Trucks, simply sign up with your Steam account on the join page. You will need to own American Truck Simulator or Euro Truck Simulator 2 to join World of Trucks.
World of Trucks is an optional service, registration on World of Trucks isn't required to play the game.
- OS: Ubuntu 14.04 64-bit
- Processor: Quad core CPU 3.3 GHzMemory: 8 GB RAM
- Memory: 8 GB RAM
- Graphics: Intel HD 630 or similar (2GB VRAM)
- Storage: 25 GB available spaceAdditional Notes: Disk Space for American Truck Simulator base game
- OS: Ubuntu 14.04 64-bit
- Processor: Quad core CPU 4.6 GHzMemory: 12 GB RAM
- Memory: 12 GB RAM
- Graphics: NVIDIA GeForce GTX 1660 or similar (2 GB VRAM)
- Storage: 25 GB available spaceAdditional Notes: Disk Space for American Truck Simulator base game
[ 6105 ]
[ 1086 ]