Orbdale Terrain · OrbdaleTerrainEditor module · class
UOrbdaleTerrainMaterialLibrary
Editor onlyEditor-time creation of terrain material wrappers (Tier 3, editor only).
Declaration
UCLASS()
class UOrbdaleTerrainMaterialLibrary : public UBlueprintFunctionLibrary- Header
#include "OrbdaleTerrainMaterialLibrary.h"- Module
PublicDependencyModuleNames.Add("OrbdaleTerrainEditor");in an editor module’s Build.cs: an editor module, not in packaged games.- Stability
- Stable: changes within a major version only add.
- Thread
- Editor, game thread.
- Derives from
UBlueprintFunctionLibrary- Blueprint
- “Orbdale Terrain Material Library”, a Blueprint type
Description
A wrapper (UOrbdaleTerrainMaterialInstance, renderer module) is made at editor time and cooked; a cooked game cannot make one. This library makes them:
automatically, when a material is assigned to a terrain actor in the editor (the module binds FCoreUObjectDelegates::OnObjectPropertyChanged for
AOrbdaleTerrainActor::Material);in bulk, from Blueprint or a Python script (WrapMaterials);
by the plugin's own content tooling for its default material.
Wrappers live in a generated folder, by default <the terrain asset's folder>/TerrainWrappers/, named <parent>_W, and are reused while their parent is the same. Being instances, they follow every edit of the parent.
Returns UMaterialInstanceConstant: the editor module reaches the wrapper class through the renderer module, a dependency the fill adds (OrbdaleTerrainEditor.Build.cs).
Editor, game thread. Needs the shader compiler.
Functions
- WrapMaterialBlueprintstatic
The wrapper of Parent in Folder, made and saved if missing.
- WrapMaterialAsBlueprintstatic
The wrapper of Parent at an exact package name, made and saved if missing, re-parented if it wraps another material.
- WrapMaterialsBlueprintstatic
WrapMaterial for each entry, in order; null entries give null.
- ConnectCustomizedUVBlueprintstatic
Connect an expression's output to a material's customized UV, which Python cannot name (EMaterialProperty hides them).
- FindWrapperBlueprintstatic
The existing wrapper of Parent in Folder, or null.
- WrapActorMaterialBlueprintstatic
The wrapper of a terrain actor's Material, in the actor's wrapper folder, made if missing.
- WrapperFolderForstatic
The wrapper folder of a terrain actor:
<its Source asset's folder>/TerrainWrappers, else the project settingUOrbdaleTerrainSettings::WrapperFolder. - MakeTextureArrayBlueprintstatic
Create or refill a Texture2DArray from same-sized source textures (a python script cannot reach the array's source-building path).
- MakeLayerTableBlueprintstatic
Create or refill the layer table: a 256 x 1 RGBA32F texture, one texel per paint layer id, that the terrain material reads with Load (layer ids are 8-bit, so a table replaces four-layers-per-vector parameters).
- CheckRvtReadinessBlueprintstatic
Check that Parent can write the terrain RVT, and log one warning per problem.
- SetWrapperRvtBlueprintstatic
Point a wrapper's RVT sample parameter ("TerrainRvt", in MF_TerrainRvt) at an RVT other than the material's default.
- RvtParameterNamestatic
The name of the RVT sample parameter that MF_TerrainRvt exposes.
- WrapperPackageNamestatic
The long package name a wrapper of Parent gets in Folder:
<Folder>/<Parent name>_W.
Blueprint
- Check Rvt ReadinessOrbdale › Terrain › Materials
- Connect Customized UVOrbdale › Terrain › Materials
- Find WrapperOrbdale › Terrain › Materials
- Make Layer TableOrbdale › Terrain › Materials
- Make Texture ArrayOrbdale › Terrain › Materials
- Set Wrapper RvtOrbdale › Terrain › Materials
- Wrap Actor MaterialOrbdale › Terrain › Materials
- Wrap MaterialOrbdale › Terrain › Materials
- Wrap Material AsOrbdale › Terrain › Materials
- Wrap MaterialsOrbdale › Terrain › Materials