Terrain3DTextureAsset
Inherits: Terrain3DAssetResource < Resource
Description
A set of texture files and settings that gets added to a Terrain3DAssets resource. Textures must be prepared according to the documentation.
Properties
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
Methods
void |
clear() |
|
get_highlight_color() const |
|
get_thumbnail() const |
|
is_highlighted() const |
void |
set_highlighted(enabled: |
Signals
file_changed() 🔗
Emitted when albedo_texture or normal_texture are changed.
id_changed(type: int, old_id: int, new_id: int) 🔗
Emitted when id is changed with the AssetType (TYPE_TEXTURE or TYPE_MESH), and old and new IDs.
setting_changed() 🔗
Emitted when any setting is changed, other than id, albedo_texture, or normal_texture.
Property Descriptions
Color albedo_color = Color(1, 1, 1, 1) 🔗
void set_albedo_color(value:
Color)Colorget_albedo_color()
This color is multiplied by the albedo texture in the shader.
Texture2D albedo_texture 🔗
void set_albedo_texture(value:
Texture2D)Texture2Dget_albedo_texture()
The texture file with albedo on RGB and height on A.
float ao_light_affect = 0.0 🔗
void set_ao_light_affect(value:
float)floatget_ao_light_affect()
This value is applied directly to the AO_LIGHT_AFFECT in the shader, which dictates how much ambient occlusion affects light from Light3Ds. 0 means AO only affects ambient light. 1 means it also affects lights.
float ao_strength = 0.5 🔗
void set_ao_strength(value:
float)floatget_ao_strength()
The strength of ambient occlusion, which darkens areas of this texture dictated by the ambient occlusion map. If you have not provided an AO texture, an AO value is approximated by the normal map automatically.
float detiling_rotation = 0.0 🔗
void set_detiling_rotation(value:
float)floatget_detiling_rotation()
The shader rotates UV lookups in a detiling pattern based on this value.
float detiling_shift = 0.0 🔗
void set_detiling_shift(value:
float)floatget_detiling_shift()
The shader laterally shifts UV lookups in a detiling pattern based on this value.
float displacement_offset = 0.0 🔗
void set_displacement_offset(value:
float)floatget_displacement_offset()
Offset that can be used to raise or lower the displaced surface height for this material.
Example: slightly lowering a cobblestone texture so the tops of the cobbles match collision.
float displacement_scale = 0.0 🔗
void set_displacement_scale(value:
float)floatget_displacement_scale()
The scale of the displaced surface height for this material.
int id = 0 🔗
void set_id(value:
int)intget_id()
The user settable ID of the texture, between 0 and 31. You can change this to reorder textures in the list, however it won’t change the ID painted on the terrain.
String name = "New Texture" 🔗
void set_asset_name(value:
String)Stringget_asset_name()
A user specified name for this texture set.
float normal_depth = 1.0 🔗
void set_normal_depth(value:
float)floatget_normal_depth()
Increases or decreases the strength of the normal texture.
Texture2D normal_texture 🔗
void set_normal_texture(value:
Texture2D)Texture2Dget_normal_texture()
The texture file with normal on RGB and roughness on A.
float roughness = 0.0 🔗
void set_roughness(value:
float)floatget_roughness()
Increases or decreases the roughness texture values.
float uv_scale = 0.1 🔗
void set_uv_scale(value:
float)floatget_uv_scale()
The scale of the textures.
Method Descriptions
void clear() 🔗
Clears the texture files and settings.
Color get_highlight_color() const 🔗
Returns the color of the current highlight, if any.
Texture2D get_thumbnail() const 🔗
Returns the generated thumbnail.
bool is_highlighted() const 🔗
Returns true if this texture is currently highlighted on the ground. For editor use.
void set_highlighted(enabled: bool) 🔗
Enables or disables adding a random highlight color to this texture wherever placed on the ground.