Solar System: Inside Project CARS’ Galileo Engine

By Duncan Harris on September 23rd, 2013 at 9:00 pm.


This is the latest in the series of articles about the art technology of games, in collaboration with the particularly handsome Dead End Thrills.

Grid 2 may have vandalised one for the sake of selling The Most Expensive Game Ever That Isn’t This (£125,000 plus whatever it takes to scrape that grotesque livery off), but gaming’s real answer to the BAC Mono is the hip, gorgeous, and ever so slightly mad Project CARS. With barely-legal performance for a game still in alpha, its exposed wishbones and dampers only add to the sense of crowdsourced cool. Mmmm, those naked springs.

I’m hesitant to use the word ‘guts’ in what’s now basically a porn metaphor, but be warned: this is about the game’s insides. Its parts. Maybe turn off your webcam if that’s going to cause you problems.

Image-based lighting is key to pCARS’ often photorealistic looks, a dynamically convolved cubemap driving its ambient lighting to avoid the flat, CG-like surfaces of mere mortal car games. But we’re not going to talk about that because then we’d end up talking about everything, and I have to pick the kids up at 5. So, while we’re on the subject of time…

The ‘Galileo’ lighting engine in pCARS – and by extension the game’s day/night cycle and much of its weather – boasts accurate modelling of sun and moon positions based on the Astronomer’s Almanac algorithm, and tested against data from NASA and the US weather agency. So says render and tools programmer Kevin Boland, who at one point had it simulating the planetary alignment of the solar system as well, “but even for us that was a little OTT.

“The initial brief was just a timecycle, day to night. Then Ian [Bell, cofounder and head of studio] started asking for some more features. And then more… and more… Soon the task from my point of view required a complete rethink. It became clear very early that we need to be as realistic as we possibly can. So our goal became to write something that we could grow as the expectations of the system got bigger and bigger.”

The new model differs from more traditional weather simulation “in the same way chalk and cheese differs,” he explains. “Before, we would try to model every scenario we could think of. We’d fixate upon what the game would look like going from sunny to thunderstorm, and trying to balance that. It was a nightmare as no matter what we did it never met our expectations, or a new requirement would come in.”

A traditional time-of-day system might keyframe in changes in sky colour or atmospherics based on the clock, “but 12am in England is very different to 12am in California, and 7pm in July looks very different to 7pm in mid-winter,” says art director Darren White. “It soon became clear that if we drove everything by sun elevation then these different dates and locations would almost sort themselves out.”

Take Spa Francorchamps, for example, known in this game as ‘Belgian Forest’. What pCARS wants to know about that are longitude, latitude, altitude, orientation to true north, time and date. In return it gives you the sun or moon’s position in the sky, the phase of the moon, the temperature, and plenty more.

“Pretend the day doesn’t work based on the 24hr clock, but on a 0-360 degree clock for the sun’s altitude in the sky – you can key a lot of elements from that,” says White. “For example, if the sun’s at ’0′ it’s at the horizon, so it’s sunrise; ’180′ is sunset, and so on. From that we can set items like its colour, intensity, etc. It could drive things like weather and rain, too; the system is flexible enough for us to have wetter roads at night if we want, though most weather elements have one keyframe throughout the timecycle and the changes in weather come from blending between different conditions.”

Anything else? Boland: “Sound is fun. Did you know that, based on your altitude and temperature, the density of air changes and thus how sound travels? I have all the code in for this. If you then factor in wind direction, we could have some pretty awesome stuff relating to sound. This actually came about because we needed to know the base temperatures for the tire modelling, which is again related to altitude of track, sun altitude, and then angle of refraction, giving the intensity of the sun for heat.

“In future we’ll have a calculation for the season and then combine that with the weather conditions. The weather feeds in other elements to the physics systems, like water levels for the tires, amount of spray being thrown up, etc. What I’m saying is that our system allows us to model more effectively the chain reaction that happens. Not everything is driven by sun elevation but it’s the theoretical starting point for almost all of it, just like in the real world.”

Going purely on screenshots, this might seem to run counter to how pCARS often appears. Recently added lightning storms evoke the terrifying night races of Slightly Mad’s Shift 2 Unleashed, where the game would become almost hyper-realistically tense. Elsewhere in pCARS you’ll find dawns, dusks, coronas and refractions that occupy other edges of reality.

Adding to the confusion, there’s often no telling where studio art direction stops and community input begins when it comes to those screenshots. pCARS comes with the TweakIt tool that grants full control over the weather system’s many parameters. I use it all the time, commanding Mother Nature just like Sean Connery in that Avengers movie. At least I think there was an Avengers movie; remembering it just makes me black ou–

“There’s no point in making a complex weather system if you don’t push the weather to extremes,” explains White. “It makes for more interesting visuals and more varied and challenging racing. We developed all the tools to make pretty much whatever weather conditions we wanted to, so I guess the more hyperrealistic visuals and more dramatic conditions like thick fog and torrential thunder storms came from us pushing the tools as far as we good.

“The community has driven the art direction and there was always a loud voice demanding realistic visuals, so we’ve pushed that as much as we can. Occasionally users post reference that is more extreme and hyperrealistic, such as anamorphic lens flares or Hollywood style post processed images, but the majority of the community tend to argue against that, preferring something that’s more a recreation of what you’d see with your own eyes.”

Those early adopters/players/testers – oglers? – of pCARS are used to being newly bowled over with every key update, the game really only competing with itself when it comes to DX11 motorsmut. And more is on its way. The team has started implementing fullscreen fog “but it won’t work with MSAA in DX9,” while arguments are being had over crepuscular (god-) rays, the angle, intensity and colour of which would involve sun elevation and possibly weather.

In the meantime, shots from recent pCARS builds can be found here, though you’ll be better served by the official community galleries. I’d have more but my graphics cards, like the famously rectangular Icarus, flew too close to the sun over Bathurst.

Game and developer can be followed on Twitter.

__________________

« | »

, , , .

20 Comments »

  1. identiti_crisis says:

    This is all wonderful (beautiful even), but I can’t help but feel that this kind of attitude should have given us similar results years ago, especially on PC.

    Stuff like altitude affecting local conditions is the kind of thing you’d expect in the typically anal world of simulation (that I love), but actually it seems more important that sessions are repeatable. Then there’s the image based lighting – PS2 racing games had it. And the PGR games had excellent weather effects, too. PC has always had better texture detail, more or less, but the extra memory that allows this has never really been used for anything interesting like it is on consoles (maybe that’s a driver / abstraction issue, I don’t know.) Mind you, pCARS cripples my PC, so why should I care?!

    I wonder if it’s telling that these things are only happening now because SMS is effectively free from publisher direction, or because the “community” is so vocal? I expect it’s both, actually.

    • Gap Gen says:

      I remember reading a similar article in PC Gamer way back about the first Operation Flashpoint, where they also talked about modelling the speed of sound, etc. Clearly it’s always possible, the trick is to figure out at what point people stop caring – I’m unsure what “stellar geography of the solar system” means exactly (unless the term applies to things that aren’t stars), but they’re right that while it might be nice to get Venus rising at the right time, provided you’re actually moving slowly enough to notice, it’s not going to affect the lighting or the feel of the game all that much.

      • identiti_crisis says:

        Speed of sound is important, because it affects your perception of the battlefield. At least, I used to shit my pants in sniper duels in Delta Force because you don’t hear the bullet that kills you being fired, until after it hits you – but when it hits you, it’s very loud, and the screams that accompany it didn’t help. Without speed of sound modeling, you get a pre-warning at much lower volume! But it basically delays information, as well as serves as information if you have a visual correspondence to work with.

        The “stellar geography” (stellar objects in the right places, presumably) makes sense in OpFP / ARMA, too, but is only really a nice detail in a racing game / sim.

        What I mean is that motor racing games, and I include racing “sims”, are a pretty stagnant arena on PC. It’s gone very much in the way of ego massaging like shooters have, rather than on focusing on the multiple facets of an involving driving model, impressive and useful tech and interesting game mechanics. Then they look at the console racers and imitate all the “wrong” parts of them. Plus “crowd-sourced” games like pCARS just amplify the pandering to the “cool factor” effect, although it’s a little bit exciting still.

        It’s not just about racing, either; I’m getting most of my kicks in GTA V just by driving around and enjoying the well-balanced physics and variety and character of the vehicles in the game. I intend to do the same in GT6 when it arrives, and is all I do in pCARS. A specific car, a specific location; explore both. In that context, it helps if the game is a little more expressive and dynamic; even emergent, to a degree (like weather simulation, which I don’t think pCARS is actually doing – yet?)

        • Gap Gen says:

          I was mainly curious how the solar system has stellar geography when it contains only one star, but it’s possible that the term relates to how constellations project onto the solar system, maybe.

          • Duncan Harris says:

            Doesn’t make much sense, does it. One second…

          • Gap Gen says:

            Cool, thanks! Wasn’t sure if it was a technical term I wasn’t aware of.

          • identiti_crisis says:

            Ah, missed that. I guess it doesn’t make sense if you think of only the Sun as being a stellar object. I think the older meaning is simply star-like, which would include Venus etc.

            It sounded cool, though, didn’t it? ;)

          • FlowState says:

            I would say instead “Celestial Geography,” although, since we’re being anal here, geography means – roughly – “earth writing”. So maybe “Celestial Mapping”?

            Anyways, this does sound amazing. Though, as a programmer, I hope all these details are a matter of detail, not a main focus of the dev team. Premature Optimization is the root of all evil, after all.

          • Gap Gen says:

            Also, I guess “astronomy” refers to stars as well, even though it also includes planets and suchlike, although I think “astrum” means star in a poetic context, plus the Romans didn’t really know what anything up there really was. But yeah, unsure what the technical term would be in this case. (Note that the above was me being slow on the uptake this week, rather than pedantic).

        • Cinek says:

          ” in GTA V just by driving around and enjoying the well-balanced physics” – YOU’VE GOT TO BE KIDDING ME.
          GTA V doesn’t have anything I would call “physics”. It’s a joke what they implemented there. You can bounce your jet off the road and keep on flying like if nothing would happen – WTF?! Not to mention lighting-fast cars, that can stop from 100 to 0 in the instant by hitting a wall, and yet – still drive. Or skidding… gash… there’s so many horrible things in that game. Never, ever use word “physics” in the same sentence as “GTA V” unless there’s a negation there.

    • Dozer says:

      One of my sidelined projects is to check the accuracy of the night sky in X-Plane, so that we can use authentic celestial navigation as used from the 1920s to the 1960s. A friend of mine has made a beautiful model of a 1950s periscope sextant – http://www.dh-aircraft.co.uk/news/files/96eb54e98a365457e0c1de96d570b03b-100.html

  2. hamburger_cheesedoodle says:

    Very neat- I don’t have access right now, so I have to wonder how well it will end up running. That said, I do much prefer games whose maximum settings exceed the capability of the current top-end consumer hardware. They tend to come from game studios who have an eye to the future, who hope their game remains engaging for years, and one excellent way to do this is to make the game look great on medium settings and stunning on the maximums, which helps increase the longevity quite a bit.

    It’s a shame that more games don’t take this sort of attitude towards simulation, assuming it can be done practically. I can’t help but think of a Bethesda game where the sun and atmospheric conditions drive the weather, instead of it always being static. Having changing seasons, or even changing weather conditions in one area, would spice up open-world games like that considerably.

  3. liquidsoap89 says:

    Is it still not possible to get in to this game? I’ve wanted to try it forever, but I remember hearing that I lost my opportunity to get in a while ago.

  4. Ub3rs0ldat says:

    Seems like an unnecessary amount of detail for something that’ll get forgotten once you start playing.

    • John Connor says:

      You seem to have mistaken this for a game. It’s not a game, it’s a racing simulator. Ideally you’d be able to learn the Nurburgring in this, drive out there and nail it in a real car – weather conditions and all.

      • Cinek says:

        Not to mention that it’s a great showcase of what’s possible if you don’t limit yourself too much – and that alone is a brilliant thing.
        (I’m most curious though how bad console ports will be comparing to the PC master game)

  5. PopeRatzo says:

    For god’s sake, can I please, pretty please have Burnout Paradise 2?

    Not the half-assed NFS: Most Wanted, but actual Burnout Paradise 2. With races, stunt driving, open world, chase, crashing, and maybe add some cops.

    I’d even be happy to hear DJ Atomika again, if I could just pick a car and go drive it off a cliff, over 5 buses and onto the roof of a parking garage.

    I hate it that you make be beg, Criterion.

  6. rockman29 says:

    How do I even get access to this? Can you still buy it and get alpha access? I’m noob and don’t understand these new magical funding concepts… :(

    I would like to play the game, so I can do some… rigorous testing of my… rig.

Comment on this story

XHTML: Allowed code: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>