Panda3D Code Collection

You’re welcome. I’m not sure when I’ll get to it, usually I’ll add snippets as soon as I used them in my personal projects and as adding gras and other plants is part of something I want to add to my level, it may not be to far in the distant future.

As for the difficulty, there are also plenty of ways to add foliage to levels and even more possible dependencies for its implementation, so it depends. Like, should it be physical move with things like wind, water and other environmental things or move when the player runs through it as well as things like how should it be placed, should there be a texture map defining the amount and possition or should it be randomly scattered throughout the world and so on.

In general, nowdays you usually create a shader that implements a particle system to populate the floor with your defined foliage geometries. This isn’t all that hard if you know how to write glsl shaders in general. If this is out of your scope for now, you can also add static geometry to your level using your modelling application, blender for example has a few ways and good tutorials to spread objects randomly on the ground, which then could easily be exported to Panda3Ds model format, which in the end would probably be the most simple, but also performance wise worst way. But I don’t expect heavy frame drops if you don’t have particularely large levels.

Hope that information helps you for now. If you need anything in specific, you should open a new topic specific to adding foliage to your game or ask in the irc or discord channel or PM me.