Terrain Macro Material Component

The Terrain Terrain Macro Material component provides a method of defining a macro-level appearance of a region of terrain.

Usage

You assign a color and a normal texture by dragging texture assets to the Color Texture or Normal Texture fields, or by clicking . Once the textures are assigned, you can adjust the appearance by using the Normal Flip X and Normal Flip Y toggles, and adjust the strength of the normals by using the Normal Factor slider. You can configure the dimensions of the region by adjusting the Axis Aligned Box Shape component.

Provider

Terrain Gem

Dependencies

Axis Aligned Box Shape

Properties

Terrain Surface Materials List component properties

PropertyDescriptionValuesDefault
Color TextureThe image that will be rendered on the terrain.TextureNone
Normal TextureThe texture that will be used as the normal map.TextureNone
Normal Flip XSet to true to flip the normals about X.BooleanFalse
Normal Flip YSet to true to flip the normals about Y.BooleanFalse
Normal FactorAdjusts the strength of the normal values.Float1.0

MacroMaterialData

This structure is used when sending out information about the macro material settings.

FieldDescriptionType
m_entityIdThe EntityId of the owning entity.AZ::EntityId
m_boundsThe bounds of the region that this macro-material component affects.AZ::Aabb
m_colorImageThe image that should be applied to the terrain.AZ::Data::Instance<AZ::RPI::Image>
m_normalImageThe normal map to be used in this region.AZ::Data::Instance<AZ::RPI::Image>
m_normalFlipXWhether or not the normal map should be flipped about the X axis.bool
m_normalFlipYWhether or not the normal map should be flipped about the Y axis.bool
m_normalFactorThe strength of the normal map.float

TerrainMacroMaterialRequestBus

Use the following request functions with the TerrainMacroMaterialRequestBus EBus interface to communicate with Terrain Macro Material components of your game.

Request NameDescriptionParameterReturnScriptable
GetTerrainMacroMaterialDataReturns the MacroMaterialData structure assigned to the Terrain Macro Material component.NoneMacroMaterialDataYes

TerrainMacroMaterialNotificationBus

Notification NameDescriptionParameterReturnScriptable
OnTerrainMacroMaterialCreatedNotifies listeners when a new macro material has been created.NoneEntityId; MacroMaterialDataYes
OnTerrainMacroMaterialChangedNotifies listeners when a macro material has been changed.NoneEntityId; MacroMaterialDataYes
OnTerrainMacroMaterialDestroyedNotifies listeners when a Macro Material is removed.NoneEntityIdYes
OnTerrainMacroMaterialRegionChangedNotifies listeners when the bounding area of the macro material changes.NoneEntityId; Old Region: Aabb; New Region: AabbYes

Copyright © 2022 Open 3D Engine Contributors

Documentation Distributed under CC BY 4.0.
For our trademark, privacy and antitrust policies, code of conduct, and terms of use, please click the applicable link below or see https://www.lfprojects.org.


The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.