X

TheFeed

ThatGameCompany Programmer Details The Sand Technology In Journey

G4TVLeah
1 Comment

Posted April 9, 2012 - By Leah Jackson


Journey

John Edwards, one of the programmers on Journey, went on the official Thatgamecompany forums to detail how he and programmer Martin Middleton created the beautiful sand in the game. The forum post is pretty complex, but the two-part description is fascinating if you can keep up. Here's a small snippet:

"Heightmaps literally describe the height of the terrain at each point on the map. In Journey, instead of using just one heightmap, we used three. Matt would model a very rough version of the sand for the entire level in Maya, and then we would load it up into the game and apply something called B-Spline interpolation to it to make it super smooth. That yielded the nice shapes of dunes in the distance, but up close it was way too smooth, and just looked like melted plastic. So we added two more heightmaps on top to simulate a thin layer of "loose sand."

Click after the break to learn more about Journey's heightmaps and textures.

Journey

Heightmap

Heightmaps are used by many games to render terrain. Heightmaps literally describe the height of the terrain at each point on the map. In Journey, instead of using just one heightmap, we used three. Matt would model a very rough version of the sand for the entire level in Maya, and then we would load it up into the game and apply something called B-Spline interpolation to it to make it super smooth. That yielded the nice shapes of dunes in the distance, but up close it was way too smooth, and just looked like melted plastic. So we added two more heightmaps on top to simulate a thin layer of "loose sand." In one heightmap, we stored all the little tiny ripples that get formed by the wind, as well as the journeyers' trails. In the last heightmap, we stored the "sand waves" which don't actually exist in real life, per se, but made areas with lots of wind, like the bridge area and the sunken city descent, feel a lot better.

It was important to use three separate heightmaps because heightmaps can take up a lot of memory. If we tried to store the entire terrain of the game at full detail, you'd need to tape 4 PS3s together just to get the thing to run. But by storing the dunes at very low detail (and then smoothing them dynamically as they got close), and only storing the "loose sand" for a small distance around the player, we were able to get things working on the standard single-PS3 configuration.

Texture

The texture probably took the longest to get right. We went through about half a dozen different techniques until we found something that worked. In the end, the idea behind the texture is that if you think about an individual grain of sand, it is basically a sharp crystal, where each side is like a little mirror. So one way to think of the surface of a sand dune is that it's made up of trillions of little mirrors, all pointing in different directions. That's why it sparkles the way it does in the sun.

The PS3 is a pretty powerful device, but even it has it's limits, so we had to settle with simulating just 8 million little mirrors (and actually we even grouped those up into sets of 1000). When the journeyer, or a cloth creature, or the wind pushes the sand, we use a physics simulation on the SPUs to move all the little mirrors against each other. So, that's the basic idea, but then taking that mirror texture and using it to create just the right amount of sparkle ended up consuming about 2 months to settle on the 60 lines of shader code that actually render the sand on the PS3's graphics card.

What do you think of the description? Pretty cool, huh?

ThatGameCompany Programmer Details The Sand Technology In Journey
http://www.g4tv.com/thefeed/blog/post/722573/thatgamecompany-programmer-details-the-sand-technology-in-journey/
http://cache.g4tv.com/ImageDb3/293362_S/journey.jpg
BlogThread_722573

ADVERTISEMENT

Blog Tags

g4tv.com
  • Sara Underwood's Naked Bike Ride

    Posted: June 22, 2011

    1,269,017 Views | 05:20

  • International Sexy Ladies Show: Messy Cat Fight

    Posted: January 27, 2010

    595,806 Views | 00:49

  • Adult Star Kirsten Price Tests Kinect's Nude Filter

    Posted: November 12, 2010

    1,407,175 Views | 04:33

  • Best Nude Scenes in Video Games

    Posted: June 29, 2009

    1,504,774 Views | 03:12

  • International Sexy Ladies Show: Wrestling in Moscow

    Posted: June 19, 2009

    122,012 Views | 01:24

AdChoices