Scripts & Tools

Scripts & Tools Overview
Documentation about DE tools & integration with 3rd party systems.
Table of Content
Open – DE Environment Global Controller

Vertex colors control a single type of wind movement per vertex channels RGB

windZone.windMain != WindStrength​
(R) Red: = main wind​
0 value = no bending​
1 value = full bending​

windZone.windPulseFrequency != WindPulse
(G) Green: = randomness / variation​

windZone.windTurbulence != windTurbulence​
(B) Blue: = turbulence

Global Controller can either be attached by script, add component on a game object, or by opening the Unity dropdown menu: Window/ DE Environment / Tools / Add Global Controller

Important: when using cut-out and surface shader together on the same model the wind influence values should be matched up to same values in order to have correct wind applied thru the entire model 

DE Environment Global Controller

Wind Controller __
Snow Controller __
Rain Controller __
Water Controller __

Synch with Wind Zone: ​
enables or disables in scene wind gizmo​

Wind Settings:
Wind Zone: unity wind zone component​
Strength: main global wind strength​
Turbulence: shivering of the leaves​
Pulse Frequency: wave speed​
Randomness: randomness in wind settings

Billboard Wind Settings:​
Enable Billboard Wind: impact on billboards​
Strength: main global wind strength on billboard

Global Properties – Wind​

NAME

PROPERTY NAME

VALUE

NOTE

Main Wind Intensity 

_Global_Wind_Main_Intensity

Float

Range NA (default = 0.01)

Main Wind Direction

_Global_Wind_Main_Direction

Float

Range NA (default = 0)

Main Wind Random Offset

_Global_Wind_Main_RandomOffset

Float

Range NA (default = 0)

Main Wind Pulse Magnitude

_Global_Wind_Main_Pulse

Float

Range NA (default = 10)

Main Wind Turbulence

_Global_Wind_Main_Turbulence

Float

Range NA (default = 0.01)

  

Enabled Billboard Wind

_Global_Wind_Billboard_Enabled

Int

0=Off 1=Active (default = 0)

Billboard Wind

_Global_Wind_Billboard_Intensity

Float

Range 0~1 (default = 0)

 

Enabled Cloth Wind

_Global_Wind_Cloth_Enabled

Int

0=Off 1=Active (default = 0)

Cloth Wind Intensity

_Global_Wind_Cloth_Intensity

Float

Range 0~2 (default = 1)

Enabled Water Wind

_Global_Wind_Water_Enabled

Int

0=Off 1=Active (default = 0)

Enabled Fade Wind Distance

_Global_Wind_Main_DistanceFade_Enabled

Int

0=Off 1= ActiveFadeOut 2= ActiveFadeIn (Default =0)

Fade Wind Distance

_Global_Wind_Main_DistanceFade_Bias

Float

Default = 0

Global Properties – Snow

NAME

PROPERTY NAME

VALUE

NOTE

Enabled Global Snow

_Global_Snow_Enabled

Int

0=Off 1=Active (default = 0)

Snow Intensity Top Down

_Global_Snow_Intensity_TopDown

Float

Range 0~10 (default = 1)

Snow Intensity Bottom Up

_Global_Snow_Intensity_BottomUp

Float

Range 0~10 (default = 1)

Global Properties – Rain​

NAME

PROPERTY NAME

VALUE

NOTE

Enabled Global Rain

_Global_Rain_Enabled

Int

0=Off 1=Active (default = 0)

Rain Intensity 

_Global_Rain_Intensity

Float

Range 0~10 (default = 1)

Rain Wetness

_Global_Rain_Wetness

Float

Range 0~1 (default = 0)

Open – DE Environment Mesh Tools​

MESH OPTIMIZATION​

  • Repair poor or damaged vertex tangents​
  • Repair poor or damaged vertex normals​

WIND VERTEX COLOR​

  • Bake vertex wind animation into models thru vertex color

AMBIENT OCCLUSION​

  • Bake ambient occlusion AO into mesh thru vertex color​

Opening the Unity dropdown menu: ​
Window/ DE Environment / Tools / Open Mesh Tool​

Mesh Optimization
Mesh optimization tool is useful for repairing poor or damaged vertex tangents and or vertex normal that are required for proper lighting and rendering in Unity

BEFORE

UNITY NATURE SHADER

VERTEX NORMALS

VERTEX TANGENTS

AFTER

UNITY NATURE SHADER

VERTEX NORMALS

VERTEX TANGENTS

Visually Correct Environment Lighting

BEFORE

AFTER WITH DE SHADERS

Processing Object Selection:
Active Game Object:
Active Selection:

Preview Game Objects:​
Preview Type: select preview in scene for selected game objects seeing changes in Realtime for Vertex Color, Vertex Normal, Vertex Tangent and or Ambient Occlusion. selection of default will return game object to its original shaders

Load Default Shaders: returns preview type to its original shader ​

Operations:
Normal Smoothing Angle: 60° tolerance is good for most applications​

Recalculation:
Tangents: repairs vertex tangents​
Normal: repairs vertex normal​
Normal & Tangents: recalculates tangents and normal steps together​

Wind Vertex Color
Wind vertex color tool is useful for repairing or adding wind in 3rd party vegetation

BEFORE

AFTER

Processing Object Selection:
Active Game Object:

Preview Game Objects:​
Preview Type: select preview in scene for selected game objects seeing changes in Realtime for Vertex Color, Vertex Normal, Vertex Tangent and or Ambient Occlusion. selection of default will return game object to its original shaders

Load Default Shaders: returns preview type to its original shader ​

Sub Mesh Options:

Settings:
Main Bending Strength = Vertex Color Red (R)
Random Strength = Vertex Color Green (G)
Tumbling Strength = Vertex Color Blue (B)

On each sub mesh users may additionally re bake or reset selected sub mesh individually if needed with B (Bake) or R (Reset) selections

Operations:
Recalculate Vertex Color: bakes vertex color into model ​
Reset Vertex Color: resets vertex RGB color to white ​

Ambient Occlusion
Mesh ambient occlusion tool is useful for baking AO into mesh and FBX models

BEFORE

AFTER

Processing Object Selection:
Active Game Object:
Active Selection:

Preview Game Objects:​
Preview Type: select preview in scene for selected game objects seeing changes in Realtime for Vertex Color, Vertex Normal, Vertex Tangent and or Ambient Occlusion. selection of default will return game object to its original shaders

Load Default Shaders: returns preview type to its original shader ​

Settings:
Samples:
Minimum Range:
Maximum Range:
Intensity:

Operations:
Recalculate Ambient Occlusion: bakes ambient occlusion into vertex color Alpha channels ​
Reset Ambient Occlusion: resets vertex Alpha color to white​

Open – DE Environment Texture Combiner

Opening the Unity dropdown menu: ​
Window/ DE Environment / Tools / Open Texture Combiner

Texture Combiner​
Texture combiner tool is a simple channel packer to support mask texture creation​

DE Environment Texture Combiner

Preview Texture: simple preview of the final texture ​
Texture Output Size: 128/256/512/1024/2048/4096​
Type: help guide to identify what type textures to add in RGBA slots​
Save: save final texture to file location​

Input Channel: mapping channel from source texture if needed​
Output Channel: mapping channel to final texture if needed​

Note: DE Environment shaders use sampler states target set as repeat trilinear filtering for performance reasons. ​

When importing (non-color textures) packed mask textures should be set in Unity to Linear/RGB instead of sRGB color space as sRGB on non-color textures could result in visually wrong looking materials.

DE Environment texture suffix key:​
_D = Albedo​
_N = Normal​
_S = Smoothness​
_AO = Ambient Occlusion​
_M = Metallic ​
_R = Roughness ​
_G = Gloss​
_H = Height​
_E = Emissive​
_T = Translucency​
_Mask DE = (R) Ambient Occlusion (B) Roughness /Smoothness (G) Metallic /Gloss​

Connecting DE Global Controller with SineSpace​

Important: This module is only available when Sinespace is installed in project

(1) Press – Add new scripting Runtime script
(2) Press – Add Attached Scripting Runtime script

When scripting runtime is attached no additional Sinespace setup is required​

Open – TVE Prefab Converter

Compatibility​
Requires installation 3rd party asset The Vegetation Engine version 3.0.1 or higher

TVE CONVERTER​
Applies DE Environment shaders directly on prefabs working seamlessly with TVE The Vegetation Engine​

DE Vegetation presets:​

  • DE Cutout Wind Translucency​
  • DE Surface Wind Simple​
  • DE Billboard Wind​

DE Static Prop presets:

  • DE Surface Simple

Step 01: Add TVE Manager in scene

Step 02: Select prefab and open TVE prefab converter ​

Step 03: Set conversion preset applicable to your asset and convert ​
(Example: for Mtree set as tools/Mtree/Vegetation) ​

Step 04: Set conversion override to DE Vegetation or DE Static Object ​

Billboard Generator

Note: This tool is under development and will be available soon!