Template:LSL Constants/GroundTexture: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Rider Linden (talk | contribs)
Created page with "<div style="padding: 0.5em;"> {{{!}} class="sortable" {{Prettytable}} {{!}}- {{Hl2}} ! {{!}} Constant ! title="Value" {{!}} ! class="unsortable" {{!}} Format ! class="unsortab..."
 
Clarify that TERRAIN_PBR_ROTATION_ uses radians as a unit
 
(2 intermediate revisions by one other user not shown)
Line 11: Line 11:
{{!}} rowspan="4" {{!}} [ TERRAIN_DETAIL_#, texture_id ]  
{{!}} rowspan="4" {{!}} [ TERRAIN_DETAIL_#, texture_id ]  
{{!}} rowspan="4" {{!}}  
{{!}} rowspan="4" {{!}}  
Sets the texture to use for the current terrain detail layer. texture_id must be the UUID of a texture or the name of a texture in the object's inventory.
Sets the texture to use for the current terrain detail layer. texture_id must be the UUID of a texture or material, or the name of a texture or material in the object's inventory.


Passing NULL_KEY or an empty string will set the terrain texture to the default.
Passing NULL_KEY or an empty string will set the terrain texture to the default.
Line 30: Line 30:
Sets the height range for terrain for texture blending in the region. low is the maximum height for texture 1 and high is the minimum height for texture 4, textures 2 and 3 will mix in between these values.
Sets the height range for terrain for texture blending in the region. low is the maximum height for texture 1 and high is the minimum height for texture 4, textures 2 and 3 will mix in between these values.
{{!}}-
{{!}}-
{{!}}{{LSL Const|TERRAIN_HEIGHT_RANGE_SW|integer|5|c=Changes the south east blend range.}}
{{!}}{{LSL Const|TERRAIN_HEIGHT_RANGE_SE|integer|5|c=Changes the south east blend range.}}
{{!}}{{#var:value}}
{{!}}{{#var:value}}
{{!}}-
{{!}}-
Line 61: Line 61:
{{!}} rowspan="4" {{!}} [ TERRAIN_PBR_ROTATION_#, float rotation ]
{{!}} rowspan="4" {{!}} [ TERRAIN_PBR_ROTATION_#, float rotation ]
{{!}} rowspan="4" {{!}}  
{{!}} rowspan="4" {{!}}  
Rotates the PBR texture for each layer.
Sets the rotation of the PBR texture for each layer, in radians.


* Only works for PBR textures.
* Only works for PBR textures.

Latest revision as of 15:57, 3 April 2025

Constant Format Description
TERRAIN_DETAIL_1 0 [ TERRAIN_DETAIL_#, texture_id ]

Sets the texture to use for the current terrain detail layer. texture_id must be the UUID of a texture or material, or the name of a texture or material in the object's inventory.

Passing NULL_KEY or an empty string will set the terrain texture to the default.

TERRAIN_DETAIL_2 1
TERRAIN_DETAIL_3 2
TERRAIN_DETAIL_4 3
TERRAIN_HEIGHT_RANGE_SW 4 [ TERRAIN_HEIGHT_RANGE_XX, float low, float high ]

Sets the height range for terrain for texture blending in the region. low is the maximum height for texture 1 and high is the minimum height for texture 4, textures 2 and 3 will mix in between these values.

TERRAIN_HEIGHT_RANGE_SE 5
TERRAIN_HEIGHT_RANGE_NW 6
TERRAIN_HEIGHT_RANGE_NE 7
TERRAIN_PBR_SCALE_1 8 [ TERRAIN_PBR_SCALE_#, vector uv_scale ]

Sets the UV scale used for each layer's terrain texture in repeats per meter.

  • The Z value of the vector is ignored.
  • Only works for PBR textures.
TERRAIN_PBR_SCALE_2 9
TERRAIN_PBR_SCALE_3 10
TERRAIN_PBR_SCALE_4 11
TERRAIN_PBR_ROTATION_1 12 [ TERRAIN_PBR_ROTATION_#, float rotation ]

Sets the rotation of the PBR texture for each layer, in radians.

  • Only works for PBR textures.
TERRAIN_PBR_ROTATION_2 13
TERRAIN_PBR_ROTATION_3 14
TERRAIN_PBR_ROTATION_4 15
TERRAIN_PBR_OFFSET_1 16 [ TERRAIN_PBR_OFFSET_#, vector uv_offset ]

Sets the UV offset for drawing each terrain layer.

  • The Z value of the vector is ignored.
  • Only works for PBR textures.
TERRAIN_PBR_OFFSET_2 17
TERRAIN_PBR_OFFSET_3 18
TERRAIN_PBR_OFFSET_4 19