A question about how Flower grass was achieved.

Discussion regarding our second commercial release, Flower on the PS3, PS4, and PS Vita.

A question about how Flower grass was achieved.

Postby jharlow » Sun May 13, 2012 12:19 pm

Hey gents,

So first of all, I should start with the obligatory congratulations on being awesome.

But seriously, Flow's awesome, Flower's awesome, Journey's awesome, you're awesome.

Anyway, having come upon the forum, I wanted to ask how the grass is achieved in Flower? The effect is fantastic, and I'd love to know how you guys managed to render so many objects at the same time, with that FOV, with that framerate.

I'm guessing the density of grass changes the further from the camera you are, but I'd love to know how it actually works :D

Thanks,

John
User avatar
jharlow
 
Posts: 183
Joined: Sat May 12, 2012 2:38 am
Location: Hampshire, UK

Postby John » Wed May 16, 2012 5:21 pm

Hi Other John,

Thanks for the kind words.

About the grass, well, we worked on that a long time ago. It's all a bit hazy, now, but I did a quick search in my email and found this thing I sent to a mystery programmer friend right after the game came out. Sorry if the language is too technical (or too 2009).

-------

About the grass, I'm sorry to say I probably don't have a very satisfying answer. Simply put, the trick to our grass rendering is a whole bunch of SPUs. Very early on we did some prototypes and determined we could more-or-less brute force the grass rendering on the PS3 and that's basically what we did. Without too much in the way of optimization beyond making sure we took full advantage of the SIMD nature of the SPUs we were able to get 300k grass elements simulating and rendering. As far as I know, you're developing for Mac and PC, so the SPUs are probably out of the question. It seems like you're targeting fairly advanced video cards, however, and I'm pretty sure even an 8800 could run circles around the CELL for grass generation (though it would probably be a bit harder to program for).

If you're still interested, I can go into a few of the details, such as they are.

First, we divide the world into 256x512 cells. Each cell has 16 bytes of grass data for things like color, height, etc. Our artists specify most of the data, but we procedurally generate some stuff, too, like an ambient wind force based on Perlin noise. We don't store any data per grass blade, instead generating all the blade-specific attributes, such as position and orientation, based on seeded random numbers.

Shading is done per-vertex on the SPUs, so the vertex and fragment programs are just pass-throughs, lightening the load on the PS3's notoriously underachieving graphics card.

We frustum cull grass on a cell basis and calculate density per cell according to a highly voodooed version of 1 / (dist to camera). One trick is to draw the grass that is farther away, and therefore less dense, thicker. Grass in the distance is still screen space thinner than grass up close, but just not as much as it should be given realistic perspective. In practice, people don't notice that the thickness isn't exactly right, so we get away with less grass to cover the same amount of terrain.

For high detail wind effects (such as the wake left by the petal swarm, or the little disturbances caused by flowers growing), again, we pretty much just rely on the power of the SPUs. We have a "RippleBarn" containing 128 ripples. A ripple is a ring which has a thickness and a strength. Ripples push the grass they touch. We cull ripples on a grass cell basis, so not every single grass element is testing against all 128 ripples, but there are still a ridiculous number of tests going on, and the SPUs just eat right through them.

The only other semi-interesting thing I can think of is that we use the information from the grass cells to generate some very low res world-sized terrain textures, which, when combined with some tiling detail maps, yield fairly convincing grass in the distance. At least in low resolution Internet videos. I'm still a little disappointed with how this effect holds up on big 1080p TV screens.
oh nose!
PSN Name: BaffleCakes
John
TGC Core Member
 
Posts: 173
Joined: Tue Oct 24, 2006 4:40 pm
Location: Santa Monica, CA

Postby jharlow » Thu May 17, 2012 9:05 am

Thanks John!

Wow that's an extremely comprehensive answer. I'll do a bit of homework on what SPU's are exactly to give it justice!

Once again though, it's a fantastic effect! I was in awe when I first saw it, and wanted a little information as to how it works, so yeah, I appreciate it.

John #2
User avatar
jharlow
 
Posts: 183
Joined: Sat May 12, 2012 2:38 am
Location: Hampshire, UK

Re: A question about how Flower grass was achieved.

Postby Manish » Tue Jan 13, 2015 10:45 am

Hello John,
First thanks a ton for making a game like flower and journey,really big fan of everything in the both of the games.Completed them tons of times.

Also thanks for describing the working , can you please elaborate some more about the shading process , and about the grass sprites ,I would be very grateful. Second thing ,both the games are ported to ps4 , so the hardware is now much closer to that of a pc .Can you please reflect all the changes that were made taking into account your previous answer.Please be as elaborate as you previously were.. :D

Anyways fantastic work guys !! really cant stop appreciating...wonder how both are gonna look on a 4k screen.

Big fan,
Manish
Manish
 
Posts: 2
Joined: Sun Jan 04, 2015 5:53 pm

Flower game making PS4

Postby Manish » Sun Jan 18, 2015 9:27 am

Hello ,
I guess my post went unread at : viewtopic.php?f=10&t=2296&p=67560#p67560

So I thought I would post again a new topic since that post was tooo old .

First thanks a ton for making a game like flower and journey,really big fan of everything in the both of the games.Completed them tons of times.

Also thanks for describing the working , can you please elaborate some more about the shading process , and about the grass sprites ,I would be very grateful. Second thing ,both the games are ported to ps4 , so the hardware is now much closer to that of a pc .Can you please reflect all the changes that were made taking into account your previous answer in the mentioned link above .Please be as elaborate as you previously were.. :D

Anyways fantastic work guys !! really cant stop appreciating...wonder how both are gonna look on a 4k screen.

Big fan,
Manish
Manish
 
Posts: 2
Joined: Sun Jan 04, 2015 5:53 pm

Re: Flower game making PS4

Postby Klowny » Sun Jan 18, 2015 2:47 pm

Manish wrote:Hello ,
I guess my post went unread at : http://www.thatgamecompany.com/forum/vi ... 560#p67560

So I thought I would post again a new topic since that post was tooo old .

First thanks a ton for making a game like flower and journey,really big fan of everything in the both of the games.Completed them tons of times.

Also thanks for describing the working , can you please elaborate some more about the shading process , and about the grass sprites ,I would be very grateful. Second thing ,both the games are ported to ps4 , so the hardware is now much closer to that of a pc .Can you please reflect all the changes that were made taking into account your previous answer in the mentioned link above .Please be as elaborate as you previously were.. :D

Anyways fantastic work guys !! really cant stop appreciating...wonder how both are gonna look on a 4k screen.

Big fan,
Manish

I had no knowledgeable reply for it, but I read and enjoyed your post, as I'm sure others did too. :D
Image
PS3 Journeys: 1536
| River_in_Time 1988-2015 | PS4 Journeys: W-13 R-40
User avatar
Klowny
Legend
 
Posts: 5051
Joined: Mon Mar 12, 2012 12:42 am
Location: To go fast, go alone. To go far, go together.

Re: A question about how Flower grass was achieved.

Postby Amish_Gramish » Mon Feb 02, 2015 10:24 am

Manish wrote:Hello John,
First thanks a ton for making a game like flower and journey,really big fan of everything in the both of the games.Completed them tons of times.

Also thanks for describing the working , can you please elaborate some more about the shading process , and about the grass sprites ,I would be very grateful. Second thing ,both the games are ported to ps4 , so the hardware is now much closer to that of a pc .Can you please reflect all the changes that were made taking into account your previous answer.Please be as elaborate as you previously were.. :D

Anyways fantastic work guys !! really cant stop appreciating...wonder how both are gonna look on a 4k screen.

Big fan,
Manish


We weren't involved in the PS4 port of Flower. This was helmed by the great folks at Bluepoint Games. The last time I checked, their site didn't have forums, but you can send them an e-mail asking for this info.

I'll send John back to this thread to see if he has any more info on shading and sprites.
User avatar
Amish_Gramish
Community Manager
 
Posts: 3266
Joined: Wed Oct 25, 2006 2:34 pm
Location: Moorhead, MN


Return to Flower

Who is online

Users browsing this forum: No registered users and 1 guest