Witness Friday post on Casey’s blog

Casey Muratori is back, with more details about planting grass when you really care about how good the results are.   grass_03_22     Update: And here's another post, complete with a video showing in detail how the grass planting works in the actual game.

18 Comments:

  1. Whoah, maybe put that image behind a spoilers tag!

  2. Is there any point, this late in the project, trying to implement his findings?

    • Stuart,

      I was doing this additional research for my own edification, but the results have been promising enough that I think I probably will go back and add this option into the grass planter, just so we can see if it makes a big difference in-game. Even if it ends up being too late to leverage significantly on this project, it will be valuable to know for future projects.

      – Casey

  3. I find it interesting that he never looked at how grass actually grows. Perhaps it’s not important, but I imagine it would be quite interesting. There might even be some simple rules it tends to follow which could be used to produce a ‘game of life’ type system.

    Maybe that’s something I’ll look into sometime

  4. @Joe

    Exactly! I also thought it could be useful to question how grass actually grows. And if you think about it, the fact that nature spreads the grass seeds in a certain way automatically implies that it can’t be a completely random process. But implementing this is probably easier said then done.

    Other than that i thought it was a very interesting and well written article.

    • Joe and Sven,

      The problem here is that I am not trying to simulate the placement of actual grass. Actual grass is about growing individual blades. That is something that I have simulated for off-line rendering off images, but it is unfortunately not yet fully practical for games like The Witness. In off-line rendering, the individual blades are rendered and they are often “combed” as well, to produce things like trodden paths and simulated cutting or consumption by animals.

      So what these patterns are meant to do is place textures that themselves contain many blades of grass, and you are trying to distribute these for visual coverage. The behavior of actual grass is completely unrelated to how you want to place these textures. Actual grass forms clumps and gaps naturally, and also grows with interlocking curvature, things which you don’t want to do when you’re trying to minimize overdraw and maximize the utlity you get from a series of textured cards.

      Hopefully that gives some insight into why studying grass isn’t particularly relevant to this problem, although I would encourage doing so for anyone dealing with placement on the actual blade level, as I have found studying real grass to be very helpful when working on that sort of project.

      – Casey

  5. I can’t believe how much work goes into these smaller details. Amazing!

  6. Is obsessing over grass geometry that important? I get hiring an architect to inject building realism into a game, to provide for a more immersive experience, but grass in the real world just grows randomly, doesn’t it? Does nature know about blue noise or concentric intersections?

    Or are you creating some sort of manicured Disneyland type experience? If that’s so, I’m going to expect jumping fountains and an EPCOT center too with Mickey letting me take pictures with him. And a monorail. Gotta ride teh monorail.

  7. Thanks for the reply. I realised this wasn’t really for grass as such, but it is good to hear that is something you’ve thought about. I suspect by the time I graduate and actually make it into the industry, we’ll be up to real time rendering of grass at the blade level ;)

  8. I must say, great work! I also think about that “line gap” problem while reading your article as well, even though it’s just for thinking sake, plus I don’t really know any computer stuff. Your solution was quite an eye-opening for me. I like it a lot.

    But in the last few pictures, I can notice some regular patterns in the grass right in front, where the spacing are obvious, because of the deterministic process you took. Maybe a little bit of randomness is not that bad, since we human brains are very good at detecting patterns, as long as it’s there, it will be noticed. And I think a grass field with regular patterns is not very pleasing to the eyes as well. Hope you can find some way to overcome it.

  9. Your final result reminds me of the the patterns you see in newsprint from the half toning patterns in the printing process, as described in http://en.wikipedia.org/wiki/Screen_angle or http://printwiki.org/Screen_Angles — perhaps you want to explore the literature on the older generation of technology for putting dots on paper while trying to avoid obvious patterns. I’m only learning this as I google right now, but some of the references I see to stochastic/FM approaches might even be a method to incorporate the random noise.

    Thanks for the random avenue of geekdom for my evening.

    • Actually, if you keep digging in the halftoning literature you will find that blue noise is one of the standard halftoning techniques :) It is not my area of expertise, but I believe that in general the patterns used for haltoning were driven by other factors besides just theoretical quality, and so semi-nonsensical things like green noise were actually used as well (see http://scholar.google.com/scholar?hl=en&q=green+noise+halftoning&btnG=&as_sdt=1%2C48&as_sdtp=) because there were physical constraints on the way printers worked that meant that “ideal” reconstruction patterns were sometimes infeasible in practice.

      But, like I said, not my area of expertise, so I’m not actually sure how much actual use some of these research results got in practice (ie., in actual printers).

      – Casey

  10. Reminds me of the texture of a basketball.

  11. This is what you see :)

Leave a Reply

Your email address will not be published. Required fields are marked *