Persistent Vegetation Storage Pro

Persistent Vegetation Storage Pro

Settings
Stored Vegetation
Bake Vegetation
Edit Vegetation
Paint Vegetation
Precision Painting

 

Settings

In order to work the Persistent Vegetation Storage component needs a PersistentVegetationStoragePackage.  Create a new package and drag and drop it to the Storage slot in the inspector. The first time a package is added or if the package is initialized for another terrain it will ask you to initialize it. You can also press the create storage button to have one created and saved in the project folder for you.

When initialized it will work for only this terrain with the current vegetation cell size. If you change the cell size you need to initialize the storage again. This will clear all data in the storage.

Vegetation Storage

Create a Persistent Vegetation Storage Package by right clicking in a project folder and select Create/Awesome Technologies/Persistent Vegetation/persistentVegetationStorage Package and give it a name. Then drag/drop the package to the slot.

You can also have Vegetation Studio create it for you. It will be stored in the PersistentVegetationStorageData folder under Assets.

Setup

If you change the cell size or world area of the VegetationSystemPro component you need to initialize the storage again. This will clear any vegetation instances in the storage

Status

This shows the total cell count in the storage. 

 

Stored Vegetation

This tab shows you info about all the vegetation stored in the storage.

Storage size

This is the total storage size saved on disk. The disk size only updates when you save the scene.

Total item count is the number of instances in the storage.

Status

You can enable/disable the persistent storage by checking this.

Select biome/vegetation package

In order to see the vegetation stored select the VegetationPackage/biome you want to see vegetation instances for.

Select vegetation item

Select each item to see the number of stored instances.

If you have vegetation from multiple sources. baked, manually painted, imported, added with API etc you will see a count per source with an option to clear instances per source.

Clear instances

There are several options to clear baked or all instances from one or more vegetation packages.
Select enable runtime spawn if you want to edit the spawning rules again.

Bake Vegetation

In order to bake the results of the run-time spawning rules to the storage package select the vegetation item you want to bake and press the “Bake vegetation from ruleset button”. This will create all instances for the terrain and store it in the package.

Use the “Bake ALL” button to bake all vegetation items to the package. This will also disable the “run-time spawn” on each vegetation item. After bake it is loaded form the storage.

Select biome/vegetation package

Select the biome you want to bake vegetation from

 

Edit Vegetation

This allows you to manually add, remove and edit any tree, object or large object in the persistent storage.
If you edit an items position, scale or rotation the VegetationSourceID will be set to manual edit.

Add new items with Ctrl-click in the terrain. Remove with Ctrl-Shift-Click

All items within range will get normal unity move, rotate and scale handles. Mode is selected with the normal unity buttons.

 

Paint Vegetation

The persistent storage has a painting tool for painting grass and plants. It works in a similar way unity terrain painting tool does but with some additional functionality.

Painting

You paint with left click in the map, remove instanced with ctrl-click.

Settings

  • Randomize position
    will add randomness to the sample positions on top of the point grid you see in the terrain
  • Paint on colliders
    With this enabled you will be able to paint vegetation on any collider in the scene as well as the terrain
  • Use steepness/angle rules
    With this enabled each vegetation items steepness rules (set in VegetationSystem component) will be applied before painting
  • Sample distance
    This is the density of the painting
  • Brush size
    The size of the brush

 

Precision Painting

The precision painting tool is similar to the normal painting tools but works a bit differently. While the normal painting tools project a brush from above and down on the terrain and colliders the precision painting tool will use a ray from the camera perspective. The normal of the hit point will be used as up direction for the placed vegetation.  This allows for fine tuning the positioning.

The precision tool will allow you to paint on any mesh, even without a collider.

 

Internally the painting tool is building up an octree of all gameobjects with meshes in the scene and manually raycasting these to find the mesh intersection.