Skip to content
lsl.devlsl.devLSL Dev

LlCloud

Function notes

Returned values are in the range [0.0, 2.0]. Values above 1.0 indicate rain.

Return value notes

Returns a float that is the cloud density at the prim position + offset

Specification

SL features a cellular automata-based weather system. There are 16x16 square cloud "cells" per region.

Caveats

  • There are currently no SecondLife clients that render rain.
  • The client attempts to render clouds from the cloud algorithm results sent from the server, which is why different clients can see different cloud formations and de-synchronizes cloud view from the server over time. The cloud density data is sent from the server to the client when the region is loaded by the client. This can happen when the region comes into view, during teleport or during login.

Examples

default
{
    touch_start(integer num)
    {
        llSay(0,"Cloud density:" + (string)llCloud(ZERO_VECTOR));
    }
}

Notes

Clouds and wind are interrelated.

Client

Clouds are always rendered between about 180-200m absolute height.

Algorithm

The cloud seed/growth/dissipation algorithm uses a solenoidal vector field, which is a vector field with zero-divergence: ∇ · v = 0
This condition is satisfied whenever v has a vector potential A, because if v = ∇ ⨯ A then ∇ · v = ∇ · (∇ ⨯ A) = 0

See also: functions

History

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:LSL Function/offset

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}<noinclude></noinclude>{{#if:

{{#vardefine:p_{{{1|}}}_desc|offset relative to the {{#switch:{{{local|}}}|*|=prim's|#default={{{local|}}}|object=object's}} position and expressed in [[Viewer coordinate frames#Local|local coordinates]]{{#if:{{{dead|}}}|&#32;and is completely ignored.}}{{{desc|}}}}}

{{#vardefine:p_{{{1|}}}_hover|offset relative to the {{#switch:{{{local|}}}|*|=prim's|#default={{{local|}}}|object=object's}} position and expressed in local coordinates{{#if:{{{dead|}}}|&#32;and is completely ignored.}}{{#if:{{{hover|}}}|{{{hover|}}}|{{{desc|}}}}}}}

{{#if:{{{dead|}}}|{{#vardefine:caveats|{{#var:caveats}}
*{{LSLP|{{{1|}}}}} functionality {{#switch:{{{dead|}}}|never=has not been implemented|*|#default=has been removed}}, any value provided is completely ignored. For future proofing purposes, you should use a [[ZERO_VECTOR]] for it's value.}}
}}

{{#if:{{{sim|}}}{{{region|}}}|
{{#vardefine:header_footnote|{{#var:header_footnote}}{{PBR}}
The requested position needs to be in the same region.}}
}}

{{#if:{{{noZ|}}}|
{{#vardefine:header_footnote|{{#var:header_footnote}}{{PBR}}
Only the {{LSLP|x}} and {{LSLP|y}} coordinates in {{LSLP|offset}} are important, the {{lSLP|z}} component is ignored.}}
}}

}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|}}}_desc}}
|-
|hover
|{{#var:p_{{{1|}}}_hover}}
|}
</noinclude>
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlCloud, by Linden Research, Inc. and contributing residents.View contributors and history.

Built from these wiki pages, as imported:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.