[Released] Vegetation Studio Pro

Vegetation Studio Pro
Hi.

I would like to showcase new product we have been working on.

Vegetation Studio Pro is a version of Vegetation Studio using the new Job system and Burst compiler from the core. All editor and run-time generation of vegetation is multithreaded and optimized using the new burst compiler.

VS Pro will be released as a new asset, but there will be an upgrade path for current Vegetation Studio users and a time limited additional discount at release time.

Development of the current Vegetation Studio version will continue as planned and some of the new functionality like mesh terrain support, instanced indirect tree support and billboard upgrades will arrive shortly for the current version.

Current minimum Unity version is Unity 2018.2 but this will probably increase to 2018.3 during the beta.

What is new!

  • Core technology using the new Job system and Burst compiler for increased speed and multi-threading. Live update in Editor when changing rules.
  • Single Vegetation System component supporting multiple terrains
  • Single Vegetation System component supporting multiple cameras
  • Biomes. New biome system that allows you to define biome areas on your terrains, each with its own vegetation package and splatmap rules.
  • Support for Mesh Terrains and Raycast terrains in addition to normal Unity terrains
  • Shader Controller system. This allows 3rd party shaders to expose UI elements and control run-time material changes. Controllers with support for several of the most used vegetation shaders are already included
  • Wind controller system. Like the shader controller allows for 3rd party wind settings.
  • Instanced indirect tree support

We are getting ready for a beta and current Vegetation System users can sign up to join.
A signup form to be included in the beta and get download access is in development. I will post here in the forum when it’s ready.

More info on system requirements and a brief functionality overview can be found here

Update: Vegetation Studio users can now sign up to get beta access as soon as it is ready. You can find the signup form here.

Lennart

20 Likes

Biomes

The new biome system allows you to define areas on your terrains and assign a vegetation package with a ruleset for that area. This area can also have its own set of splatmap rules. It will work with any terrain shader, but needs all biomes to use a subset of the total textures added to the terrain.

The following videos shows a demo terrain using multiple biome areas. We made this together with Nature Manufacture to show at Unite Berlin 2018.

We are also working together with Nature Manufacture to create a series of pre-configured biome asset packages that will help developers quickly set up multi biome terrains. These can of course be customized for the individual developers need…

We will post more info on this soon.

Example of biome area editing

Biome rule configuration

I will keep posting updates here.

Lennart

18 Likes

Reserved

Reserved

So, this thing is what you’d expect, just way more powerful in every way.

1 Like

Amazing work Lennart.

1 Like

WOW looks great!

I was going to ask on PM to avoid looking dumb … :sweat_smile::frowning:

Basically asking if this is " dummy proof " meaning that you do not need to know how to code
to get the benefits of this package ?

I would like to ask to, if people do not upgrade for what ever reason, will it make sense for you to
keep developing two versions of VS ?

Thanks in advance for your time.

1 Like

Wow, even more amazing!

1 Like

That looks indeed great, from a technical point of view using Unity cutting edge tech as well as the art used in the demos is just gorgeous.

I would be interested to see a performance comparison between Vegetation Studio and Vegetation Studio Pro.

I’m not a fan of is the intense logo use at the top of each Component though. I believe, if you replace the logos with Component icons, it would fit much nicer in Unity’s UI and doesn’t steal precious Inspector space. These icons would not only be displayed in the Inspector, but also in the Scene View for that particular item, just like any other Unity Component. I find this normally really useful.

2 Likes

It’s much more artist friendly in that mostly everything is real time in editor in VS Pro (no more waiting a sec after adjusting something!), otherwise it’s the same (well, except for all the new stuff).

1 Like

Hi.

  1. All the core job system and burst compiler use is under the hood and you do not need to think about it.
    Like the current Vegetation System version most of what you need to set up can be done with UI only, but there is an API for users that want to extend the system or fit it better to their own needs.

  2. I will continue developing and supporting both versions. For a long time most users do not want to upgrade or can not upgrade to a system that will require 2018.3 when complete. Pro version will probably be more for new projects or people in a position to upgrade and want to benefit of some of the new technology that Unity is adding.

The reason for developing a new version is that the benefits of the new multithreading and compiler is to good to not use, it allows for more complex rulesets and faster generation.

Lennart

5 Likes
  1. I will try to get a feature comparison between the versions done when beta is started. Until then you can test for yourself as soon as the beta starts.

  2. The logos is all controlled by a single base editor class. I will add a setting for you to turn this off everywhere. 10 lines of code.

Lennart

4 Likes

Looks great but would love to see better blending between 2 biomes, looking at the video’s their seems be be hard edges visible especially on the terrain texturing.

That’s fully adjustable, and there are improvements in the ruleset for scaling vegetation at the edges that work very well. I think it’s an artistic choice and mostly a consequence of having an unreasonable amount of very different biomes in a small area for demo purposes.

There is curves and noise settings for blend in each direction. I think you can get it to blend they way you want. In the videos there is also a terrain shader height blend in the mix of this.

But any ideas for improvements and additional rules for the blending is welcome. Let me know when you have played a bit with it.

Lennart

Shader Controller classes

Hi. I will do a series of posts explaining some of the new features.

In order to get 3rd party shaders integrated better with I added a system to create shader controller classes. These are found by reflection and can be included in 3rd party assets but I will also create and include several.

These classes can expose settings to the Vegetation System UI that will serialize and save with the Vegetation Package.


Here is an example for the shader UI for the grass from Nature Manufacture.

The shader class will also get a callback for setting wind and when a material needs updating.
This way you can add custom logic to the material update.

The speedtree support is added this way. It contains a bit more custom logic. I will share it here.

The default behavior if the speedtree controller is to replace the speedtree shader with a custom version that supports instanced indirect rendering. This is done run-time and will not change the original prefab.

In addition to this it exposes different tint setting for bark and foliage.

#if VEGETATION_STUDIO_PRO
using AwesomeTechnologies.VegetationSystem;
using UnityEngine;

namespace AwesomeTechnologies.Shaders
{
    public class SpeedtreeShaderController : IShaderController
    {
        public bool MatchShader(string shaderName)
        {
            return (shaderName == "Nature/SpeedTree");
        }

        public bool MatchBillboardShader(Material[] materials)
        {
            return false;
        }

        public ShaderControllerSettings Settings { get; set; }


        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading = "SpeedTree settings",
                Description = "",
                LODFadePercentage = true,
                LODFadeCrossfade = true,
                SampleWind = true,
                DynamicHUE = true,
                BillboardHDWind = false                                               
            };

            Settings.AddBooleanProperty("ReplaceShader", "Replace shader", "This will replace the speedtree shader with a Vegetation Studio version that supports instancd indirect", true);

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("FoliageHue", "Foliage HUE variation", "",
                ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddColorProperty("FoliageTintColor", "Foliage tint color", "",
                ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));

            Settings.AddLabelProperty("Bark settings");
            Settings.AddColorProperty("BarkHue", "Bark HUE variation", "",
                ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddColorProperty("BarkTintColor", "Bark tint color", "",
                ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));
        }
       
        public void UpdateMaterial(Material material, EnvironmentSettings environmentSettings)
        {
            if (Settings == null) return;
            Color foliageHueVariation = Settings.GetColorPropertyValue("FoliageHue");
            Color barkHueVariation = Settings.GetColorPropertyValue("BarkHue");
            Color foliageTintColor = Settings.GetColorPropertyValue("FoliageTintColor");
            Color barkTintColor = Settings.GetColorPropertyValue("BarkTintColor");
            bool replaceShader = Settings.GetBooleanPropertyValue("ReplaceShader");

            material.SetFloat("_Cutoff", material.GetFloat("_Cutoff"));
         
            if (HasKeyword(material,"GEOM_TYPE_BRANCH"))
            {
                material.SetColor("_HueVariation", barkHueVariation);
                material.SetColor("_Color", barkTintColor);
            }
            else
            {
                material.SetColor("_HueVariation", foliageHueVariation);
                material.SetColor("_Color", foliageTintColor);
            }
           
            if (replaceShader)
            {
                if (material.shader.name != "AwesomeTechnologies/VS_SpeedTree")
                {
                    material.shader = Shader.Find("AwesomeTechnologies/VS_SpeedTree");

                }
            }
            else
            {
                if (material.shader.name != "Nature/SpeedTree")
                {
                    material.shader = Shader.Find("Nature/SpeedTree");
                }
            }
        }

        bool HasKeyword(Material material, string keyword)
        {
            for (int i = 0; i <= material.shaderKeywords.Length - 1; i++)
            {
                if (material.shaderKeywords[i].Contains(keyword))
                {
                    return true;
                }
            }
            return false;
        }

        public void UpdateWind(Material material, WindSettings windSettings)
        {
           
        }
    }
}
#endif

The class needs to implement the functions on the IShaderController interface to be detected by Vegetation Studio Pro.

The match shader function is used to detect what shaders the controller supports. this could be multiple shaders.

Match billboard shader is used to detect custom billboard shaders in prefabs with LODGroups and exclude those from rendering. The billboard system in vegetation studio will take over this.

  public bool MatchShader(string shaderName)
        {
            return (shaderName == "Nature/SpeedTree");
        }

        public bool MatchBillboardShader(Material[] materials)
        {
            return false;
        }

CreateDefaultSettings is called the first time the controller is initialized. It allows you to set capabilities of the shader like instanced indirect support. With this set to true this will be the default render setting for the shader. Also fading, billboard wind etc.

it then allows you to add properties for the UI and saving. Floats, labels, colors, booleans etc.
These are saved in the vegetation package and you can read them back to use in the UpdateMaterial call.

  public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading = "SpeedTree settings",
                Description = "",
                LODFadePercentage = true,
                LODFadeCrossfade = true,
                SampleWind = true,
                DynamicHUE = true,
                BillboardHDWind = false                                               
            };

            Settings.AddBooleanProperty("ReplaceShader", "Replace shader", "This will replace the speedtree shader with a Vegetation Studio version that supports instancd indirect", true);

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("FoliageHue", "Foliage HUE variation", "",

When a material needs to refresh the UpdateMaterial function is called. Here you can read back properties and set material properties as needed. It also gets access to EnvironmentSettings that holds info like snow cover, wetness etc from a global setting for all vegetation. Shaders that support this can then update.

  public void UpdateMaterial(Material material, EnvironmentSettings environmentSettings)
        {
            if (Settings == null) return;
            Color foliageHueVariation = Settings.GetColorPropertyValue("FoliageHue");
            Color barkHueVariation = Settings.GetColorPropertyValue("BarkHue");
            Color foliageTintColor = Settings.GetColorPropertyValue("FoliageTintColor");
            Color barkTintColor = Settings.GetColorPropertyValue("BarkTintColor");
            bool replaceShader = Settings.GetBooleanPropertyValue("ReplaceShader");

            material.SetFloat("_Cutoff", material.GetFloat("_Cutoff"));

Lennart

1 Like

I’m not sure if this is an example or actual code from VS.

You know this, which is why I’m not certain about that piece of code, because Unity Technologies recommends in various performance related talks to use cached property identifiers rather than strings to get/set shader values.

This usually happens only one time at init or in editor when the user changes the inspector values.
if this was happening in a render loop or often I agree with you.

properties set on the compute shaders etc all use idenifiers.

Lennart

1 Like

Please, please add me to your beta… :slight_smile:

Just wondering … by adding the whole biome configuration with textures and everything you pretty much remove the need for products like the upcoming Earthshaping TerraPainter and all but the core heightmap generation of procedural products like MapMagic…?

Hi. There will be a signup form for the beta soon. I will post it here. Form makes it easier to make sure I do not forget anyone.

Everyone has a different workflow for generating their terrains. You can use the biomes with VS splatmap generation or you can use any other tools, like Gaia, MapMagic, TerraPainter etc to generate the splats.

you can then use the biome masks just to define areas and blend vegetation between them.

Goal is to make it flexible and let people work with the tools they know and like.

Lennart

1 Like