the arm wrote:I've played through the game a few times and each experience was enthralling. As I played I became curious about some of the technical stuff in Journey. Particularly the technical side of the sand. Basically - How does the sand work?
John wrote:Who disturbs my slumber?!
The sand, eh? It turns out the sand is kind of complicated. It's the result of a bunch of different systems that Martin (another programmer) and I worked on, plus a whole lot of fine tuning by Matt on the art-side. The grass in Flower was actually fairly simple to describe, but for the sand in Journey, we basically just kept throwing feature after feature at it until we had to ship the game.
This may get kind of long, so only the very intrepid or very bored should venture beyond this point. If you do not fit in either of those two categories and you for some reason keep reading, well, I'm so sorry ...
Technically, I'd divide the sand into 2 main parts: the heightmap and the texture.
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.
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.
Okay, I think that's enough for now. There's some other stuff in there, like a fluid simulation, a dust system, and fancy bloom, but since I'm pretty sure my mom's the only one still reading to this point, I think I'll just end it here. Hi Mom!
John wrote:Who disturbs my slumber?! (...)I think I'll just end it here. Hi Mom!
John wrote: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.
akryl9296 wrote:What for did you used fluid simulation in sand?
nipsen wrote:John wrote: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.
Was this part just a triggered animation, or did you deform the heightmap layer in some specific way.. or smooth it out towards some restraint that were set on beforehand, that kind of thing..?
benmerrick3d wrote:Are you planning on releasing any more information like this? Such as a making of, etc? I would love to see more about it. A video in the game engine showing how the sand particles react to the player, etc would be awesome too.
John wrote:though I'm scared we'll just end up sounding like jerks :p
Users browsing this forum: No registered users and 3 guests