Okay, so I tried this in grit game engine and it was very, very, very slow:
(it really did look cool in motion, sitting still, not so much, also, we don't own that car, it's from some free model site our coder used it to draft some baby car classes, oh, and the corner of the pavement is rockstar's :x, no, we don't snatch, i just had it sitting around and didn't have any ref for sidewalks at the time, think: placeholder, also, batches are high because our text is 3d)
![fuckyea_grass3.png](http://dl.dropbox.com/u/1483473/fuckyea_grass3.png)
![fuckyea_grass2.png](http://dl.dropbox.com/u/1483473/fuckyea_grass2.png)
It is the old school shell/fur technique as seen in shadow of the colossus etc. Apparently, this is left behind since dx8 and it kills the fill rate very fast. Translation: cannot use. I want to have realistic, coverage style grass in our game engine, beyond flat-planes for ground with only the little tuft here and there. I want realistic grass so bad, it really holds me back to know that whatever I make has the potential to be really ugly flat planes, and if they did it on PS2 with animate colosi, how come I can't do it on my GTS 250? No matter, it looks like ass on hills etc and totally breaks smooth shading anyway. Anyone have experience working with realistic grass coverage??
Replies
Use some code that'll only draw it out a certain distance from the camera (no point in having it render all those planes all the way to the horizon when you won't be able to tell it's there after a few metres).
Some generated distance-from-camera limited scrubs using alpha planes would help the look, too.
Changing the UVs of each successive plane veeery slightly will also help the look, as it'll give the grass blades some direction, rather than all sticking uniformly upwards.
They also had tire tracks IIRC
As for trackmania, a close look at what? :P Is that all crosses? The grass looks cool, but it is entirely too long, will the method there break on short *realistic length* grass?
To illustrate, here is a hotlinked image xD
http://www.gardenvisit.com/assets/madge/long_short_grass/600x/long_short_grass_600x.jpg
the one on the left reminds me of the trackmania grass, I desperately want grass like that on the right.
I was looking through the what are you working on topic, I mailed the guy (or girl) about the grass, but then a friend told me he thinks it's 2D, sigh :P
Do something like this.
It is indeed an 8bit alpha like mentioned earlier though. I was having problems with dxt1 (actually, it turned out the viewer I was using was broken) so I never even got to try with 1 bit.
Is the shell method worth looking more into for sure? Will 1 bit be that much faster that the method is no longer considered "expensive" (at least sided to the 8 bit in comparison?) If you could only see it a short distance anyway, do you guys think I could do like 10 layers in 2010? :P
Thanks so much for your help so far everyone, really want to make some stunning visuals and get our old stuff down and replaced with new soon at the site :P
Also @Keen, I was at your site recently! I thought you were a unity team dev, sorry for my comment asking things that had nothing to do with protools :P
http://www2.disney.co.uk/cms_res/blackrockstudio/pdf/Foliage_Rendering_in_Pure.pdf
actually stuff like grass rendering should not be artists job, other than making the textures
the shell-fur stuff can be done in code efficiently as well, (especially the shells) and the coders can experiment with the number of shells with a single number variable...
http://www.mazapan.se/games/grass.php
Its the same technique that has been discussed here but more optimized. He doesnt say anything about how he is doing it besides that its the "shell" technique though.
Web Player
It requires SM3 and will probably run very slow unless your GPU was made within the last year. There are 40 shells with a rather expensive shader. I get 400 fps on a 8 month old card.
EDIT: Web player is now half quality with 20 shells.
EDIT2: Optimized it even more. Should be about 2.5 times faster than the last one.
I only have the indie unity, waiting to see if they actually limit it on shadows with deferred shading in 3, if so, i wont continue with it. Want that in grit big time! Any tips I can pass to our programmer? is this universal type stuff?
-Tiling "grass blade" texture used for alpha. tiling it more makes more grass blades.
-Grass color texture that gives it color variation. its uv scaling is not the same as the grass blade texture.
-Each shell has a lower vertex color value than the last, this is used for slightly tapering the grass blades at the top, faked shadow at the base of the grass blades, and how much the grass bends with the wind.
-A scrolling "wind texture" is used to distort the uvs of the grass blades and the grass color textures.
-It uses the lightmap from the underlying terrain mesh.
The shader was created with my shader editor so the the entire scene did not require any programming at all, although the shader is not as optimized as it should be.
jocose: the webdemo is linked in keens post.
@Keen; stop being lazy and post this shit on your blog! I'm sure I'm not the only one waiting for updates,
Coupled with some regular billboards and such, this can be a pretty convincing effect, while being cheaper than the fur:
[ame]
the source documentation (and link to shader): http://www.cg.tuwien.ac.at/research/publications/2007/Habel_2007_IAG/#Additional Files and Images
Just bear in mind this won't work at perpendicular angles to the ground plane. Once you go to about 40º or so, the billboards become very apparent. But it still looks convincing overall.