Difference between revisions of "LlCloud"

From Second Life Wiki
Jump to navigation Jump to search
 
m (Added pointer to llGetEnvironment)
 
(34 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{LSLFunctionAll|func_id=43|func_sleep=0.0|func_energy=10.0|func=llCloud|return_type=float|p1_type=vector|p1_name=v|func_footnote=returns the cloud density at the object position + v|return_text|spec|caveats|examples|helpers|related|also|notes}}[[Category:LSL_Functions]][[Category:LSL_Stub]]
{{LSL_Function
|inject-1={{#vardefine:gd_text|Legacy clouds are no longer supported as of [[Release_Notes/Second_Life_Server/13#13.02.08.270166|13.02.08.270166]] - this function now only returns 0.0. See [[llGetEnvironment]] instead.}}
|inject-2={{LSL Function/offset|offset|noZ=*}}
|func_id=43|func_sleep=0.0|func_energy=10.0
|func=llCloud|sort=Cloud
|return_type=float|p1_type=vector|p1_name=offset
|func_footnote=Returned values are in the range {{Interval|gte=0.0|lte=2.0|center=density}}{{Interval/Footnote}}. Values above 1.0 indicate rain.
|return_text=that is the cloud density at the [[llGetPos|prim position]] + {{LSLPT|offset}}
|spec=
SL features a [http://web.archive.org/web/20040703050532/http://secondlife.com/about/technology.php#14 cellular automata-based] {{LSLGC|Weather|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=
<source lang="lsl2">default
{
    touch_start(integer num)
    {
        llSay(0,"Cloud density:" + (string)llCloud(ZERO_VECTOR));
    }
}</source>
|helpers
|also_functions=
{{LSL DefineRow||[[llWind]]}}
{{LSL DefineRow||[[llGetSunDirection]]}}
|notes=
Clouds and [[llWind|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: {{noWrap|∇ · v {{=}} 0}}
 
This condition is satisfied whenever v has a vector potential A, because if {{noWrap|v {{=}} ∇ ⨯ A}} then {{noWrap|∇ · v {{=}} ∇ · (∇ ⨯ A) {{=}} 0}}
|cat1=Region
|cat2=Weather
|cat3
|cat4
|history=
*Deprecated in [[Release_Notes/Second_Life_Server/13#13.02.08.270166|13.02.08.270166]].
|deprecated=none
}}

Latest revision as of 10:59, 24 June 2020

Emblem-important.png Deprecated
(This function has been deprecated.)

Legacy clouds are no longer supported as of 13.02.08.270166 - this function now only returns 0.0. See llGetEnvironment instead.

Summary

Function: float llCloud( vector offset );
0.0 Forced Delay
10.0 Energy

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

• vector offset offset relative to the prim's position and expressed in local coordinates

Only the x and y coordinates in offset are important, the z component is ignored. Returned values are in the range [0.0, 2.0][1]. Values above 1.0 indicate rain.

Specification

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

Caveats

  • This function has been deprecated.
  • 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

•  llWind
•  llGetSunDirection

Deep Notes

History

Footnotes

  1. ^ The ranges in this article are written in Interval Notation.

Signature

function float llCloud( vector offset );