Difference between revisions of "LlCloud"
Jump to navigation
Jump to search
(added Weather cat) |
m |
||
Line 17: | Line 17: | ||
</lsl> | </lsl> | ||
|helpers | |helpers | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llWind]]}} | |||
{{LSL DefineRow||[[llGetSunDirection]]}} | |||
|notes= How clouds work: | |||
* SL features a cellular automata-based weather system. | * SL features a cellular automata-based weather system. |
Revision as of 21:28, 23 November 2008
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llCloud( vector offset );43 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a float that is the cloud density at the object position + offset
• vector | offset |
Caveats
Examples
<lsl> default {
touch_start(integer num) { llSay(0,"Cloud density:" + (string)llCloud(ZERO_VECTOR)); }
}
</lsl>Notes
How clouds work:
- SL features a cellular automata-based weather system.
- There are 16x16 square cloud "cells" per sim (which means each is 16x16m in size).
- The cloud density data is sent from the server to the client once every time the agent connects to a simulator via logging in or teleporting into a simulator.
- 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 Z value in the vector is irrelevant (clouds are always between about 180-200m absolute height).
- It returns a value between 0.0 and 1.0, with 0.0 being no clouds, and 1.0 very dense clouds.
- Values returned above 1.0 - 2.0 indicate rainfall, but the option for rain is not currently implemented so values are capped at 1.0.
- Clouds and wind are related.
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 |