Vegetation Studio Pro is a complete vegetation placement and rendering system designed to exchange the standard tree and detail system within the Unity parcel element. It may also spawn and render vegetation on commonplace unity meshes. User Manual: Open the PDF directly: View PDF. Page Count: 176.
4.Placing grass#
There are several methods to populate a world with grass in Unity, this section outlines them and their (dis)advantages. The package does not contain any tools to achieve this, as it focused on providing a grass shader. Such tools and systems should be considered entirely separate, since they’re often quite extensive in their own right (and should be).
While the shader has been written to be as efficient as possible, the method used for rendering grass meshes will greatly determine how and where performance will be affected.
In the Assets/Stylized Grass Shader/Prefabs folder you’ll find several pre-made prefabs, ready to use with any of the techniques described below.
Unity terrain vegetation system
This is arguably the most accessible method, and does not require any third-party tools. However, it is important to understand that the grass/detail object system does not support meshes with custom shaders. To get around this, add a grass prefab as a “tree” instead. This way you can paint grass using the terrain tools.
If you’re using navmeshes then this method is not advised, since trees placed through the terrain system are automatically marked as navmesh obstacles. Meaning that navmesh agents won’t able to navigate through grass (placed as trees). Though, using Unity’s “Navmesh Components” system gets around this issue entirely.
The Unity vegetation system hasn’t been updated in a nearly a decade, and is no longer up to modern standards. It won’t deliver high performance when grass is placed in large amounts. For example, 20.000 grass instances on a 1x1km terrain in a test project took up ~25ms of CPU/GPU time, meaning a steady 60 fps framerate was no longer possible. Using this system, grass has to be placed sparingly.
Pros:
- No need for 3rd party tools
- Used by tools like MapMagic and Gaia.
Cons:
- Not optimized for dense grass or large amounts
- Grass can’t align to terrain surface and will stick out on hills/slopes.
- No options for random scale, rotation or density
- Changes to materials won’t apply unless the “tree” prefab is refreshed
Placing grass as GameObjects
By dragging a grass prefab into the scene you’ll have full control over it, just like any other object. It goes without saying that placing a piece grass one by one is not going to be fun. For this reason you can use any prefab painting tool, such as PolyBrush.
Note that populating a scene with a large amount of individual GameObjects will increase CPU load, scene file size and loading times. So the amount of grass you can place is limited by how much performance legroom your project already has in this area. The shader uses GPU Instancing, so drawcalls in any case will fortunately be limited.
Pros:
- Prefab painters usually apply random scale/rotations.
- Easy to manage to like any other GameObject
- Material changes are directly visible
- Meshes can be used with Occlusion Culling
Cons:
- Requires a third-party painting tool (free or paid)
- Has to be manually placed or painted
- Requires CPU resources for maintaining the individual GameObjects
Nature Renderer
Nature Renderer uses the terrain’s tree and details data, but renders everything using its own system. It allows you to use the terrain vegetation system as you would normally, but get all the modern rendering methods required for high amounts of vegetation (GPU instancing, cell-based and frustrum culling). As a result, this would work with other systems that spawn grass on terrain such as Gaia or Map Magic.
Pros:
- No change in workflow (grass prefabs can be used with the terrain detail system)
- Renders large amounts of grass at relatively fast speed
- Material changes are directly visible
- Aligns grass to terrain surface
- Stylized Grass supports its wind controller and “Procedural Instancing” system.
Cons:
Vegetation Studio Professional
- Requires an additional purchase
Vegetation Studio + Pro
This would be the silver bullet. Vegetation Studio is a system that utilizes GPU Instancing to draw identical meshes in only a few draw calls. It also performs frustum culling, to only render what’s visible in the camera field. It does not use any GameObjects, the grass is purely stored in memory. Additionally, it provides a powerful rule-based system for spawning grass.
The grass shader is compatible with its Instanced Indirect rendering, which enables more than 1023 items to render 1 draw call, next to GPU-powered culling.
Pros:
- Renders large amounts of grass at relatively fast speed
- Procedural rule-based placement of grass (in addition granular manual control)
- Fast control over density and scale/rotation/alignment
- Support for placement on meshes
- Integrated material controller when selecting a grass item
Cons:
- Requires an additional purchase
Tips and tricks
- Individual grass objects should be rotated randomly on the Y axis between 0-180º. This greatly reduces visual repetition.
- Scaling the objects randomly between 80-120% is also advised for the same reason.
- Align the grass to the surface it is placed on. This will help with translating lighting, especially on hills.
- Disabling shadow casting for the grass will greatly improve performance, consider going in that direction as a style choice.
If you’re the developer of a grass rendering/placement system and would like to validate compatibility, please get in touch!
Was this helpful? Yes No Suggest editVegetation Studio Pro Unity
Vegetation Studio Pro is a vegetation placement and rendering system designed to replace the standard tree and detail system in the Unity terrain component. It can also spawn and render vegetation on standard unity meshes.
New in version 1.3.4.
Support for Universal and HD SRP on Unity 2019.4 LTS and Unity 2020.2.
You need the latest Unity 2019.4 LTS or later to download and use this update suppoting both standard, Universal and HD.
Vegetation is spawned on the terrain based on a flexible set of rules, and controlled with both texture and polygon masks. There is also an extensive Biome system that allows you to define areas with custom biomes and splatmap rules.
Vegetation Studio Pro is based on Unity’s new Job system and Burst compiler. This allows all available cores to be used for procedural generation, culling, LOD selection and render list preparation. The Burst compiler and a data oriented structure gives a huge speed increase and a major reduction in main thread CPU use.
Vegetation Studio Pro has its own culling system and a custom render system for Vegetation.
Important - read thisIn order to use the capabilities of the job system and Burst compiler Vegetation Studio Pro has these minimum requirements:
-Unity 2018.2.11+
-Scripting Runtime Version to .Net 4.x Equivalent
-Api Compatibility level to .net 4.x
In addition to this you need these 5 packages installed from the Package Manager:-Mathematics
-Jobs
-Collections
-Burst
-Post-Processing(Optional from Unity 2018.3+)
See this Setup guide for more info.
In Unity 2020.1+ make sure you have preview packages enabled to see all packages. Collectons is installed automatic by the jobs package.
For full functionality Vegetation Studio requires graphics hardware with Shader Model 5.0 and Compute shader support.
Existing Vegetation Studio users have an upgrade path to Pro. Upgrade price is the difference between the 2 assets.
Use your existing trees (SpeedTree, Nature Manufacture, Tree Creator and others), rocks and grass textures. Rendering is done using Unity’s new Instancing and Instancing Indirect system. This means no overhead on culling or handling GameObjects. Vegetation Studio should work with most vegetation shaders that support instancing. There is an online guide on how to update custom shaders to instanced indirect rendering.
You create a Vegetation Package that references your selected trees and plants. Configure the spawn rules and apply it to a terrain. The same package can be re-used on terrains in multiple scenes. Any changes done to the rule set will update the terrain directly.
-Extensive Biome system
-Supports both Unity terrains and mesh terrains
-Rule based vegetation
-Manual paining system
-API for 3rd party tools and shaders
-Run-time masking system
-Instanced rendering
-Rule based splat map generation
-Touch bend grass and plants
-Universal billboard system
-Collider system
-Real-time editor updates
-Multiple terrains/cameras on a single Vegetation System
-VR-Support
and much more.
For for more features look at the website
All documentation is available online.
There is an extended demo scene available for download, see the demo readme file in the asset for how to install.
This demo also includes some free vegetation samples from Rustic grass and Ferns world
Join us on Discord text chat if you have any questions. We have a big and helpful Discord community!