Grass, butterflies and trees with instancing

Hello everyone!

After watching the last video of Simon Dev on grass, I was inspired to recreate and expand it using BabylonJS. So I had a lot of fun with instances and stuff and it came up nicely I think:

You can try it out at Hello BabylonJS ! (WASD or ZQSD to move around the character)

The framerate holds at 60fps most of the time (not on the screenshot lol) on my Iris Xe integrated GPU. I think the trees my be to blame on that one I am not sure.

All the source code is available on github and I made a PG for a minimal patch of grass here that should be easy to reuse if anyone needs.

I went a bit further by implementing some LoD for the thin instances, and also making the player repell the grass and butterflies.

While making the forest, I also made a higher res version of the texture for the babylon tree. You can find it here

12 Likes

Thanks for your work, this is definitely very helpful !

1 Like

It looks super good!!!

1 Like

Nice. Let me add this to the ‘Field of grass thread’ A post discussing about roads and buildings…oops, no, my bad…it’s about fields of grass…makes more sense, doesn’t it? :joy:

1 Like

Thank you very much :joy: