Slightly better grass

Planning and Development

After admitting I was stalling by working on putting some grass into the game, I’ve now stalled some more to improve that process.  Now instead of “solid” grass I can make double sided flat grass and it shows up correctly.  As a result, a chunk of grass that looks virtually identical to the solid grass but is actually made of double sided triangles has just 15 faces.  I can pare that down some if I make the grass model a little simpler, so I’ll make some other grass models at some point that are just dead simple.  I used the tags feature in BabylonJS to accomplish this.  Flat geometry can now be tagged as “doublesided” and when the model is loaded its material type will be converted to double sided by turning off backface culling.  Backface culling should remain on for most objects for performance reasons, but the ability to selectively turn it off on objects modeled in Blender is very useful.

One thought on “Slightly better grass

  1. Hello! I’m at work browsing your blog from my new iphone 4!
    Just wanted to say I love reading through your blog and
    look forward to all your posts! Carry on the fantastic work!

Leave a Reply

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