There is no spoon
UE3:Terrain (UT3)
Contents
- 1 Properties
- 1.1 Property group 'Collision'
- 1.2 Property group 'Lighting'
- 1.3 Property group 'Terrain'
- 1.3.1 bMorphingEnabled
- 1.3.2 bMorphingGradientsEnabled
- 1.3.3 bShowWireframe
- 1.3.4 DecoLayers
- 1.3.5 EditorTessellationLevel
- 1.3.6 Layers
- 1.3.7 MaxComponentSize
- 1.3.8 MaxTesselationLevel
- 1.3.9 MinTessellationLevel
- 1.3.10 NormalMapLayer
- 1.3.11 NumPatchesX
- 1.3.12 NumPatchesY
- 1.3.13 TesselationDistanceScale
- 1.3.14 TessellationCheckDistance
- 1.3.15 WireframeColor
- 1.4 Internal variables
- 1.4.1 AlphaMaps
- 1.4.2 bHeightmapLocked
- 1.4.3 bLocked
- 1.4.4 bShowingCollision
- 1.4.5 CachedDisplacements
- 1.4.6 CachedTerrainMaterials
- 1.4.7 Heights
- 1.4.8 InfoData
- 1.4.9 MaxCollisionDisplacement
- 1.4.10 NumSectionsX
- 1.4.11 NumSectionsY
- 1.4.12 NumVerticesX
- 1.4.13 NumVerticesY
- 1.4.14 ReleaseResourcesFence
- 1.4.15 SectionSize
- 1.4.16 SelectedVertices
- 1.4.17 TerrainComponents
- 1.4.18 TessellationCheckBorder
- 1.4.19 TessellationCheckCount
- 1.4.20 WeightedMaterials
- 1.4.21 WeightedTextureMaps
- 1.5 Default values
- 1.6 Subobjects
- 2 Structs
- 3 Functions
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
Properties
Property group 'Collision'
bAllowRigidBodyUnderneath
Type: bool
Modifiers: const
If true, this allows rigid bodies to go underneath visible areas of the terrain. This adds some physics cost.
bBlockRigidBody
Type: bool
Modifiers: const
If false, primitive does not block rigid body physics.
Property is propagated to terrain components.
Default value: True
CollisionTesselationLevel
Type: int
The tessellation level to utilize when performing collision checks with non-zero extents.
Default value: 1
Property group 'Lighting'
bAcceptsDynamicLights
Type: bool
Modifiers: const
If false, primitive does not accept dynamic lights, aka lights with HasStaticShadowing() == FALSE
Property is propagated to terrain components.
Default value: True
bBilinearFilterLightmapGeneration
Type: bool
If true, the lightmap generation will be performed using the bilinear filtering that all other lightmap generation in the engine uses.
Default value: True
bCastDynamicShadow
Type: bool
Modifiers: const
If false, primitive does not cast dynamic shadows.
Property is propagated to terrain components .
Default value: True
bCastShadow
Type: bool
Whether terrain should cast shadows.
Property is propagated to terrain components
Default value: True
bForceDirectLightMap
Type: bool
Modifiers: const
If true, forces all static lights to use light-maps for direct lighting on the terrain, regardless of the light's UseDirectLightMap property.
Property is propagated to terrain components .
Default value: True
bIsOverridingLightResolution
Type: bool
If true, the light/shadow map size is no longer restricted... The size of the light map will be (per component): INT LightMapSizeX = Component->SectionSizeX * StaticLightingResolution + 1; INT LightMapSizeY = Component->SectionSizeY * StaticLightingResolution + 1;
So, the maximum size of a light/shadow map for a component will be: MaxMapSizeX = MaxComponentSize * StaticLightingResolution + 1 MaxMapSizeY = MaxComponentSize * StaticLightingResolution + 1
Be careful with the setting of StaticLightingResolution when this mode is enabled. It will be quite easy to run up a massive texture requirement on terrain!
LightingChannels
Type: LightComponent.LightingChannelContainer
Modifiers: const
Lighting channels controlling light/ primitive interaction. Only allows interaction if at least one channel is shared
Default value:
Member | Value |
---|---|
bInitialized | True |
Static | True |
StaticLightingResolution
Type: int
The resolution to cache lighting at, in texels/patch. A separate shadow-map is used for each terrain component, which is up to (MaxComponentSize * StaticLightingResolution + 1) pixels on a side. Must be a power of two, 1 <= StaticLightingResolution <= MaxTesselationLevel.
Default value: 4
Property group 'Terrain'
bMorphingEnabled
Type: bool
Whether to utilize morping terrain or not
bMorphingGradientsEnabled
Type: bool
Whether to utilize morping gradients or not (bMorphingEnabled must be true for this to matter)
bShowWireframe
Type: bool
Tells the terrain to render in wireframe.
DecoLayers
Type: array<TerrainDecoLayer>
Modifiers: const
Array of the decoration layers applied
EditorTessellationLevel
Type: int
Modifiers: transient
Editor-viewing tessellation level
Layers
Type: array<TerrainLayer>
Modifiers: const
Array of the terrain layers applied to the terrain
MaxComponentSize
Type: int
For rendering and collision, split the terrain into components with a maximum size of (MaxComponentSize,MaxComponentSize) patches. The terrain is split up into rectangular groups of patches called terrain components for rendering. MaxComponentSize is the maximum number of patches in a single row/column of a terrain component. Generally, all components will be MaxComponentSize patches square, but on terrains with a patch resolution which isn't a multiple of MaxComponentSize, there will be some components along the edges which are smaller.
This is limited by the MaxTesselationLevel, to prevent the vertex buffer for a fully tessellated component from being > 65536 vertices. For a MaxTesselationLevel of 16, MaxComponentSize is limited to <= 15. For a MaxTesselationLevel of 8, MaxComponentSize is limited to <= 31.
PostEditChange clamps this to be >= 1.
Default value: 16
MaxTesselationLevel
Type: int
The maximum number of quads in a single row/column of a tessellated patch.
Must be a power of two, 1 <= MaxTesselationLevel <= 16
Default value: 4
MinTessellationLevel
Type: int
The minimum number of quads in a tessellated patch. Must be a power of two, 1 <= MaxTesselationLevel
Default value: 1
NormalMapLayer
Type: int
The index of the layer that supplies the normal map for the whole terrain. If this is -1, the terrain will compile the normal property the old way (all normal maps blended together). If this is a valid index into the layer array, it will compile the normal property only for the material(s) contained in said layer.
Default value: -1
NumPatchesX
Type: int
The number of patches in a single row of the terrain's patch grid.
PostEditChange clamps this to be >= 1.
Note that if you make this and/or NumPatchesY smaller, it will destroy the height-map/alpha-map data which is no longer used by the patches.If you make the dimensions larger, it simply fills in the new height-map/alpha-map data with zero.
Default value: 1
NumPatchesY
Type: int
The number of patches in a single column of the terrain's patch grid.
PostEditChange clamps this to be >= 1.
Default value: 1
TesselationDistanceScale
Type: float
The scale factor to apply to the distance used in determining the tessellation level to utilize when rendering a patch. TessellationLevel = SomeFunction((Patch distance to camera) * TesselationDistanceScale)
Default value: 1.0
TessellationCheckDistance
Type: float
The radius from the view origin that terrain tessellation checks should be performed. If less than 0, the general setting from the engine configuration will be used. If 0.0, every component will be checked for tessellation changes each frame.
Default value: -1.0
WireframeColor
Type: Object.Color
The color to use when rendering the wireframe of the terrain.
Default value:
Member | Value |
---|---|
A | 0 |
B | 255 |
G | 255 |
R | 0 |
Internal variables
AlphaMaps
Modifiers: native, const
Array of the alpha maps between layers
bHeightmapLocked
Type: bool
The terrain heightmap is locked - no editing can take place on it
bLocked
Type: bool
The terrain is locked - no editing can take place on it
bShowingCollision
Type: bool
Viewing collision tessellation level
CachedDisplacements
Modifiers: native, const
INTERNAL - Displacement related values
CachedTerrainMaterials
Type: CachedTerrainMaterialArray
Array size: 2
Modifiers: native, const
array of cached terrain materials for SM2,SM3
Heights
Type: array<TerrainHeight>
Modifiers: private, const, native
Array of the terrain heights
InfoData
Type: array<TerrainInfoData>
Modifiers: private, const, native
Array of the terrain information data (visible, etc.)
MaxCollisionDisplacement
Type: float
Modifiers: native, const
NumSectionsX
Type: int
Modifiers: const
Internal values used to setup components
The number of sections is the number of terrain components along the X and Y of the 'grid'.
NumSectionsY
Type: int
Modifiers: const
NumVerticesX
Type: int
Modifiers: const
The number of vertices currently stored in a single row of height and alpha data. Updated from NumPatchesX when Allocate is called(usually from PostEditChange).
NumVerticesY
Type: int
Modifiers: const
The number of vertices currently stored in a single column of height and alpha data. Updated from NumPatchesY when Allocate is called(usually from PostEditChange).
ReleaseResourcesFence
Type: pointer{FRenderCommandFence}
Modifiers: native, const
Command fence used to shut down properly
SectionSize
Type: int
Modifiers: const
Legacy!
SelectedVertices
Type: array<SelectedTerrainVertex>
Modifiers: transient
TerrainComponents
Type: array<TerrainComponent>
Modifiers: const, nontransactional
The array of terrain components that are used by the terrain
TessellationCheckBorder
Type: float
Modifiers: deprecated
The number of components to border around the current view position when checking for tessellations update. If -1, then use the general setting from the engine configuration. If 0, every component will be checked for tessellation changes each frame.
TessellationCheckCount
Type: int
Modifiers: deprecated
WeightedMaterials
Type: array<TerrainWeightedMaterial>
Modifiers: private, native, const
INTERNAL - The weighted materials and blend maps
WeightedTextureMaps
Type: array<TerrainWeightMapTexture>
Modifiers: private, const, native
Default values
Property | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
bBlockActors | True | ||||||||
bCollideActors | True | ||||||||
bEdShouldSnap | True | ||||||||
bHidden | False | ||||||||
bNoDelete | True | ||||||||
bStatic | True | ||||||||
bWorldGeometry | True | ||||||||
CollisionType | COLLIDE_CustomDefault | ||||||||
DrawScale3D |
|
Subobjects
Sprite
Class: Engine.SpriteComponent
Inherits from: Info.Sprite
Property | Value |
---|---|
Sprite | Texture2D'EngineResources.S_Terrain' |
Structs
AlphaMap
A mapping used to apply a layer to the terrain. Full structure can be found in UnTerrain.h, FAlphaMap.
(No member variables.)
CachedTerrainMaterialArray
Modifiers: native
SelectedTerrainVertex
Selected vertex structure - used for vertex editing
- int X
- The position of the vertex.
- int Y
- The position of the vertex.
- int Weight
- The weight of the selection.
TerrainDecoLayer
A decoration layer - used to easily apply static meshes to the terrain
- string Name
- The name of the DecoLayer, for UI display purposes.
- array<TerrainDecoration> Decorations
- The decoration(s) to apply for this layer.
- int AlphaMapIndex
- INTERNAL: The index of the alpha map that represents the application of this layer.
Default values:
Property | Value |
---|---|
AlphaMapIndex | -1 |
TerrainDecoration
A decoration source for terrain DecoLayers.
- PrimitiveComponentFactory Factory
- The factory used to generate the decoration mesh.
- float MinScale
- The min scale to apply to the source mesh.
- float MaxScale
- The max scale to apply to the source mesh.
- float Density
- The density to use when applying the mesh to the terrain.
- float SlopeRotationBlend
- The amount to rotate the mesh to match the slope of the terrain
where it is being placed. If 1.0, the mesh will match the slope exactly.
- int RandSeed
- The value to use to seed the random number generator.
- array<TerrainDecorationInstance> Instances
- INTERNAL: An array of instances of the decoration applied to the
terrain.
Default values:
Property | Value |
---|---|
Density | 0.01 |
MaxScale | 1.0 |
MinScale | 1.0 |
TerrainDecorationInstance
A decoration instance applied to the terrain. Used internally to apply DecoLayers.
- PrimitiveComponent Component
- No UObject references.
- float X
- float Y
- float Scale
- int Yaw
TerrainHeight
A height data entry that is stored in an array for the terrain. Full structure can be found in UnTerrain.h, FTerrainHeight.
(No member variables.)
TerrainInfoData
InfoData entries for each patch in the terrain. This includes information such as whether the patch is visible or not (holes). Full structure can be found in UnTerrain.h, FTerrainInfoData.
(No member variables.)
TerrainLayer
A layer that can be painted onto the terrain.
- string Name
- The name of the layer, for UI display purposes.
- TerrainLayerSetup Setup
- The TerrainLayerSetup, which declares the material(s) used in the layer.
- int AlphaMapIndex
- INTERNAL: The index of the alpha map that represents the application of this layer.
- bool Highlighted
- Whether the layer should be highlighted when rendered.
- bool WireframeHighlighted
- Whether the layer should be wireframe highlighted when rendered.
CURRENTLY NOT IMPLEMENTED
- bool Hidden
- Whether the layer is hidden (not rendered).
- Object.Color HighlightColor
- The color to highlight the layer with.
- Object.Color WireframeColor
- The color to wireframe highlight the layer with.
- int MinX
- Rectangle encompassing all the vertices this layer affects.
TerrainLayerSetup::SetMaterial() uses this to avoid rebuilding terrain that has not changed
- int MinY
- Rectangle encompassing all the vertices this layer affects.
TerrainLayerSetup::SetMaterial() uses this to avoid rebuilding terrain that has not changed
- int MaxX
- Rectangle encompassing all the vertices this layer affects.
TerrainLayerSetup::SetMaterial() uses this to avoid rebuilding terrain that has not changed
- int MaxY
- Rectangle encompassing all the vertices this layer affects.
TerrainLayerSetup::SetMaterial() uses this to avoid rebuilding terrain that has not changed
Default values:
Property | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
AlphaMapIndex | -1 | ||||||||
HighlightColor |
|
TerrainMaterialResource
Terrain material resource - compiled terrain material used to render the terrain. Full structure can be found in UnTerrain.h, FTerrainMaterialResource.
(No member variables.)
TerrainWeightedMaterial
A weighted material used on the terrain. Full structure can be found in UnTerrain.h, FTerrainWeightedMaterial.
(No member variables.)
Functions
Native functions
CalcLayerBounds
for each layer, calculate the rectangle encompassing all the vertices affected by it and store the result in the layer's MinX, MinY, MaxX, and MaxY properties
Events
PostBeginPlay
Overrides: Actor.PostBeginPlay