Simple Grass Textured
by IcterusGames
SimpleGrassTextured
This plugin for Godot 4 allows you to add grass and plants to your scene in a simple way
https://icterusgames.itch.io/simple-grass-textured
How to install
Using the AssetLib on Godot
- Open the AssetLib tab on Godot and search "Simple Grass Textured"
- Install the Simple Grass Textured plugin
- Enable SimpleGrassTextured in
Project -> Project Settings -> Plugins
Manual installation
- Clone or download this repository
- Copy the folder 'addons/simplegrasstextured' in your 'res://addons/' folder
- Enable SimpleGrassTextured in
Project -> Project Settings -> Plugins
Upgrade from previous version
- Close all your scenes
Especially those in which there is some SimpleGrassTextured
- Disable SimpleGrassTextured in
Project -> Project Settings -> Plugins
- Delete the folder 'addons/simplegrasstextured' on your project
- Install the new SimpleGrassTextured version
- Enable SimpleGrassTextured in
Project -> Project Settings -> Plugins
- Reload Godot
How to use
Add a SimpleGrassTextured node to your terrain scene
Your terrain scene must have a StaticBody3D in order to draw grass on top of the terrain
Select the SimpleGrassTextured node on your scene and draw on the terrain
How to enable interactive mode
- In the _ready function of your game scene you must enable the interactive mode by calling the function SimpleGrass.set_interactive(true)
- Next you must enable the character to be detected by the SimpleGrassTexture collision system, for this it is recommended to add a MeshInstance3D to the character (for example a sphere) at the height of the ground
you can adjust the size of the sphere so that the collision be detected more accurately
- In the render layers of the MeshInstance 3D, only layer 17 should be enabled
Note: this same procedure can be done for each character or object that must interact with SimpleGrassTextured
- In the active camera disable display layer 17 so that objects that are only interactable with SimpleGrassTexture are not visible
- In your character's _process or _physics_process function update SimpleGrassTextured by calling SimpleGrass.set_player_position(global_position)
How to use a custom mesh
-
Select the SimpleGrassTextured
-
Using the inspector load your custom mesh on the mesh propierty
-
On the Texture Albedo load your custom texture for the mesh
Optionally in the "Material parameters" section adjust the appearance of the material
Optimization
Disable shadows
- For short grasses in which it is not necessary to have shadows, they can be turned off via the SimpleGrassTextured menu in the top bar
Bake height map
- If you have enabled the interactive mode, can speed up the loading time by baking the heightmap (mainly if there are a large number of grasses), you can do it in the SimpleGrassTextured menu on the top bar
Be sure to do this if you make any changes to the grasses.
LOD optimization
-
Use the "auto center position" tool in the SimpleGrassTextured menu to adjust the node position, this way you make sure Godot's LOD system works correctly
-
If your custom mesh does not display correctly try adjusting LOD Bias
Licence
MIT
Assets Copyright/Attribution Notice:
Texture grassbushcc008.png, Licence CC0, by FabinhoSC https://opengameart.org/content/stylized-grass-and-bush-textures-0
Download
Support
If you need help or have questions about this plugin, please contact the author.
Contact Author