public readonly record struct TerrainLayerDescriptionOne reusable ground material: what a .vxlayer asset holds.
Remarks
Unity's reusable layer asset, and it is reusable for the reason theirs is — the same gravel is the third layer of one terrain and the first layer of another, and an author who has to re-enter its tiling twice will enter it differently twice.
⚠ Textures are named, not handled. This assembly has no device and no asset database — [§ D1] — and a handle names a slot in a world that issued it, while a .vxlayer is read by a world that has not run yet. It is the same choice TerrainComponent.Terrain makes, for the same reason.
⚠ The tiling is in metres of world, not in repeats per terrain. Repeats-per-terrain is the spelling that makes a layer stop being reusable — the same number means a different texel density on a terrain of another size — and getting it wrong is the mistake in Unreal's own quick-start guide's troubleshooting section.
Fields and properties (12)
public string NameWhat the layer is called, which is what the paint panel lists.
public string AlbedoThe base colour texture, by asset name.
public string NormalIts normal map, or empty for a flat one.
public string SurfaceIts packed occlusion / roughness / metalness texture, or empty for the defaults.
public float TilingMetresHow many metres of world one repeat of the textures covers.
public Vector2 OffsetWhere the tiling starts, in metres.
public TerrainLayerBlend BlendHow its texels combine with the layers under it.
public float HeightContrastHow sharply a height blend transitions, in the height map's own units.
public string PhysicsMaterialWhat the ground it represents is made of, so a footstep knows it is on gravel.
public const float MinimumTilingThe smallest tiling that is a tiling rather than a divide by zero.
public float TilingHow many metres one repeat covers, guarded against zero.
public bool NeedsHeightWhether the material has to sample a height map for this layer.
Methods (3)
public TerrainLayerDescription(string Name, string Albedo = "", string Normal = "", string Surface = "", float TilingMetres = 4, Vector2 Offset = default(Vector2), TerrainLayerBlend Blend = Weight, float HeightContrast = 0.5, string PhysicsMaterial = "")One reusable ground material: what a .vxlayer asset holds.
public static TerrainLayerDescription Of(string name)A layer with nothing but a name, which is what "create layer" makes.
public string? Validate()Why this layer cannot be used, or if it can.
Used by (16)
- TerrainRendererVixen.Rendering.Terrain
- TerrainRendererTestsVixen.Rendering.Terrain.Tests
- TerrainSplatVixen.Rendering.Terrain
- TerrainSplatTestsVixen.Rendering.Terrain.Tests
- TerrainStoreVixen.Terrain
- TerrainStoreTestsVixen.Terrain.Tests
- TerrainWeightmapTestsVixen.Terrain.Tests
- TerrainWeightsVixen.Terrain
- AssignTargetCommandVixen.Editor.Terrain
- SculptSessionTestsVixen.Editor.Terrain.Tests
- TargetLayerCommandVixen.Editor.Terrain
- TerrainAssetImporterVixen.Editor.Assets
- TerrainLayerCommandsVixen.Editor.Terrain
- TerrainLayerSettingsVixen.Editor.Terrain
- TerrainPaintModeTestsVixen.Editor.Terrain.Tests
- TerrainTargetRowVixen.Editor.Terrain