Talk to me about the sand.

Discussions on our third PS3 game, Journey. What do you think of our latest game?

Talk to me about the sand.

Postby the arm » Wed Apr 04, 2012 2:27 am

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?
the arm
 
Posts: 3
Joined: Wed Apr 04, 2012 2:14 am

Re: Talk to me about the sand.

Postby Klowny » Wed Apr 04, 2012 2:48 pm

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?

I have no idea how the sand works, but it's mesmerizing in places. The end of the Underground Passage area comes to mind. The sand there shimmers in irridescent colors and just looking at it floors me every time.
User avatar
Klowny
Legend
 
Posts: 4016
Joined: Mon Mar 12, 2012 12:42 am
Location: Up and to the Right

Postby Amish_Gramish » Sat Apr 07, 2012 5:38 am

I don't know much, but I know it's an algorithm that calculates and populates the sand. I'll see if I can get John to post here with some tekno babble. (TGCers should make a band with that name!)
PSN: Amish_Gramish
Aethes Music Store
No Logo LLC
User avatar
Amish_Gramish
Community Manager
 
Posts: 3114
Joined: Wed Oct 25, 2006 2:34 pm
Location: Moorhead, MN

Postby John » Sat Apr 07, 2012 4:49 pm

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.

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.


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!
oh nose!
PSN Name: BaffleCakes
John
TGC Core Member
 
Posts: 173
Joined: Tue Oct 24, 2006 4:40 pm
Location: Santa Monica, CA

Postby Klowny » Sat Apr 07, 2012 5:19 pm

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.

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.


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!

That was really quite facinating.

So it I tape 8 PS3s together can I expect to get sand in my shorts and shoes?

Thanks for the explanation. You guys did a terrific job, as did your moms.
User avatar
Klowny
Legend
 
Posts: 4016
Joined: Mon Mar 12, 2012 12:42 am
Location: Up and to the Right

Postby johnsmom » Sat Apr 07, 2012 6:37 pm

Thanks, son my son. I did enjoy that.
And, Amish: I told John to reply to this post last night. I laughed when I saw that you were going to ask him, too. More people must disturb his slumber.
And, John, I promise not to abuse my new posting privileges!
Mommy
johnsmom
 
Posts: 1
Joined: Sat Apr 07, 2012 6:17 pm

Postby the arm » Sun Apr 08, 2012 12:42 am

Ah! Such a munificent response! All of the work you described that went into building the environment is intriguing. Some of what you talk about is familiar, but there are other parts that get me excited to do some research.

Wonderful problem solving that resulted in a stunning game. Thank you for the great work and great reply.

(I'll be keeping and ear out for Tekno Babble)
the arm
 
Posts: 3
Joined: Wed Apr 04, 2012 2:14 am

Postby Amish_Gramish » Sun Apr 08, 2012 3:16 am

Just bumping for the awesomeness of John's response!

(Sorry for awakening you from your slumber!)
PSN: Amish_Gramish
Aethes Music Store
No Logo LLC
User avatar
Amish_Gramish
Community Manager
 
Posts: 3114
Joined: Wed Oct 25, 2006 2:34 pm
Location: Moorhead, MN

Postby akryl9296 » Sun Apr 08, 2012 3:27 am

John wrote:Who disturbs my slumber?! (...)I think I'll just end it here. Hi Mom!


That seems like a lot of problem solving. Does this looks like that every time there's need to program something new? What for did you used fluid simulation in sand?
akryl9296
 
Posts: 10
Joined: Sun Apr 08, 2012 3:24 am

Postby benmerrick3d » Sun Apr 08, 2012 4:44 am

Thank you for that description, it was really interesting.
I am an environment artist making games for the Xbox and I love reading this sort of information, especially about amazing games such as Journey. 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.

Keep up the great work :)
benmerrick3d
 
Posts: 4
Joined: Sun Apr 08, 2012 4:39 am
Location: Cambridge, UK

Postby nipsen » Sun Apr 08, 2012 5:22 am

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..?
nipsen
 
Posts: 8
Joined: Wed Mar 14, 2012 10:04 am

Postby eBunny » Sun Apr 08, 2012 5:48 am

Thanks a lot John for explaining and kind of simplifying the information. It sounds pretty complicated, but at least I understand it a little bit better now.

I'd definitely like to know more about how the game is made and about the PhyreEngine and stuff though. That would be interesting (:

I actually finished my 6th playtrough last night and once again it was amazing, I think it was the second playtrough I did with someone troughout the entire game. And like the last time, I didn't ment to play it all the way trough at first, but I just couldn't suddenly leave him ;( I always feel so bad when I need to go and my creature dissapears like sand. I also played as a red cloak, just like I did on my 5th playtrough. And I played as if I was also new, while still helping and guiding my companion a bit, but not too much, that way there's stil a lot for him to explore. But he thanked me afterwards for showing him the orbs ^^

I'm sorry, I justed wanted to share, but it's probably the wrong topic :T

Anyways, I'm currently playing the game offline, so I can experience the entire game on my own for once. That way I can play it at my own pace and just enjoy the beauty of the game, and maybe discover some new secrets (: I would actually love to find some new secrets that aren't bound to trophies. Just like in Braid.

But thanks again John for taking your time.
-------------------------------------------------
Edit: *spoilers* Okay so I just found out about "Behind the Scenes" ... I would have loved to find this out myself, but oh well...I can say that I'm really excited again :D *spoilers*
On a Journey.

PSN ID: eBunny7
eBunny
 
Posts: 14
Joined: Sun Apr 08, 2012 5:19 am
Location: Dordrecht - The Netherlands

Postby John » Sun Apr 08, 2012 3:57 pm

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..?

We used the fluid simulation for a couple of things, but one of the biggest was the sand waves. Early on, Jenova and Nick (designers) kept talking about wanting "rivers of sand" in the game. We had some fluid sim code left over from flOw, so I threw it into Journey, just to see what it would look like. Unfortunately, not all fluid sims are created equal, and what Jenova and Nick really wanted was more of an ocean wave-type sim, and the flOw one was much more geared toward generating the patterns you get from pouring milk into tea. This was all happening right before I left for a 3-week vacation to Germany and Sweden, so I didn't really get a chance to explain to Jenova and Nick why the fluid simulation wasn't really appropriate for Journey. When I got back, though, they'd already planned out a bunch of uses for it, and mainly just wondered why I was so bad at writing fluid sims. At any rate, the fluid sim stayed in the game. It never really worked too well for much of anything, so most of the uses for it got cut, but it did look alright as a way of animating the turbulent falling sand of the sunken city descent level, so we left it in for that.

Oh yeah, for people who played the public beta, back then we used it quite a bit to liven up the trail left by the player. If you want to see what it looked like, you can probably find youtubes of the public beta.

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.

We don't have anything extensive planned. If there are more specific questions in the forums, we'll try to answer them. We've also been batting around the idea of doing some kind of developer's commentary playthrough, though we'll see if we ever get around to that ... Might be kind of cool if we did, though I'm scared we'll just end up sounding like jerks :p
oh nose!
PSN Name: BaffleCakes
John
TGC Core Member
 
Posts: 173
Joined: Tue Oct 24, 2006 4:40 pm
Location: Santa Monica, CA

Postby sakredchao » Sun Apr 08, 2012 4:08 pm

John wrote:though I'm scared we'll just end up sounding like jerks :p


are you are feeling influenced by the whole of human history or the reactions humans have had to it?

i would watch it, even if you did sound like jerks.
:awkward:
sakredchao
Hardcore Fan
 
Posts: 580
Joined: Sun Mar 18, 2012 1:51 pm
Location: in the desert, under 3 rocks

Postby benmerrick3d » Sun Apr 08, 2012 4:10 pm

Please do the commentary, I'm sure many people would love to watch that, me included.

Though like you said, it would probably be weird for you to do. I would hate doing a commentary for one of my Xbox games! Lol
benmerrick3d
 
Posts: 4
Joined: Sun Apr 08, 2012 4:39 am
Location: Cambridge, UK

Next

Return to Journey

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 3 guests