Meishin Tale

Vegetation Studio Pro Sub-Menu

You'll find in the left sub-menu :

- Tutorials : Tutorials to guide you through VSPro understanding

- Convert Game Objects : A small editor tool to convert standard gameObjects to Vegetation Item Instance in the Persistent Storage.

- Meshes Processor : A small editor tool to generate Terrain Meshes data in batches.

- MaskAreaExtended : A new Mask component that allows to filter in/out terrains IDs in Masks, usefull when using several Vegetation terrains.

- RaycastTerrainExtended : A new component that adds pre-sampling in VSPro Raycast Terrain to allow faster vegetation re-spawn when using VSPro Raycast Terrains.

Vegetation Studio Pro

Vegetation Studio Pro (VSPro) is a vegetation placement and rendering system designed to replace the standard tree and detail system in the Unity terrain component.

 

Vegetation Studio Pro uses burst to generate vegetation at runtime using pre-defined rules and masks to determine spatial allocations of each vegetation item instance, alongside colliders and effects.

Understanding how VSPro works allow not only to speed up the vegetation placement but also to change the vegetation during runtime, and thus the environment.

VSPro in Meishin Tale

I'm using VSPro to dynamically adjust Elements (Fire, Nature, Water, Air) associated biomes and handle Gameplay Elements (like Firewalls, Nature sources, etc..) spawning when equilibrium leans toward an Element .

 

Elements Equilibriums are stored per Zone in a Zone Manager.

Everytime player casts a spell or trigger a specific event, the associated element Equilibrium is increased or decreased for the zone the player is in.

The zone Manager then updates environment modules ;

- The Terrain painter changes Terrain Splatmaps

- The CTS Global Manager changes Terrain Shader values (Moss coverage, wet, etc..)

- The Weather Manager changes ... the weather (from nice and sunny to heavy rain, heavy wind or even heavy fire ashes falling from the sky).

- VSPro spawns/updates Biomes and Masks.

 

For example when Fire reaches a certain Equilibrium threshold, the zone Manager will query the Terrain Painter to start painting over time some burned soil randomly on the zone terrains. The random data points are then fed to VSPro to generate at the same places either burned masks to get rid of some vegetation, either some Fire Biome Masks to completely change the environment.

When increasing Fire Equilibrium further, earlier random data points are re-used this time to expand existing terrain burned splat and VSPro burned Masks / Biomes.

 

Equilibrium Biomes also have Runtime Spawns used to spawn Equilibrium related effects such as fire walls which can be used by the player as a fire source.

This last part was quite difficult since every time a mask is expanded inside a Vegetation Cell, the whole Cell is respawned, including Runtime Spawns. Therefore everytime fire Element was increasing, the firewall were re-spawned which makes it hard to track their current power (which is diminishing when used by the player as a fire source).

To solve that issue i customized Runtime Spawner to update Runtime Spawn in delta ; If Spawn  exists both prior to the change and after the change, it will just leave it be.

All the spawns are linked to a manager which will save their data for zone changes or when player goes away (Runtime Spawns are created only around the player camera), or even when player saves the game. Spawns query that manager in their initialization to get their initial values.