Category:LSL Weather

From Second Life Wiki
Jump to: navigation, search

Andrew Linden: 11/22/05 excerpt[1]

The current weather system is a simple random cloud seed/growth/disipation algorithm (basically a small grid of cellular autonoma) that is influcenced by a fast, low-resolution (16x16) 2D fluid simulation driven by an inherent pseudo instability of the zero-divergence step (that is fancy language for a "flawed implementation of a Jos Stam fluid simulation").

As to future plans for weather... a long time ago (alpha? beta?) we had a rain effect, however it was too expensive at the time to do collision checking for the raindrops so the rain would move right through a house's roof. Most people found it annoyingly unrealistic so we got rid of it. In order to do more correct rain and fog effects we would have to embed some physics collision algorithms on the client. The good news is that such effects are definitely something that we want to do. The bad news is that the timeline for such a project is at least one year away.

Andrew Linden: 2/10/06 excerpt[1]

On the server side clouds are generated by a cellular-automata algorithm on a grid that uses the values at nearest neighbors to generate the probability of transitions from between some small number of states like: (clear, cloudy, very_cloudy, raining). Each simulator has an 18x18 grid of cloud cells. The boundary values of the cloud grid is transmitted to neighbor sims, which make up the 1st and 18th rows/columns of the grid. Although it doesn't rain in SL, the 'raining' state is used to indicate that the cell is about to transition to 'clear'. The distribution of moisture is then transmitted to the client which is used to distribute the cloud particles within that region. On the client side, clouds are rendered as particles.

Andrew Linden: 11/22/06 excerpt[2]

The wind is based on the 2D stable fluid method described in Jos Stam's article in the Siggraph 1999 proceedings. Each region is its own incompressible simulation but it trades boundary conditions with its neighbors so it is possible for one region to affect another. The consequence of this is that the largest coherent vortex that the wind can form is on the scale of a single region, however wind flowing out of one region will push that in the other so some wind structures are larger than a single sim.

It has some pseudo stable chaos magic injected that keeps it boiling, and the chaos is scaled by the sun position so that the ambient activity varies on a daily schedule. I think there is a small offset that causes the global wind average to point away from the sun around sunrise and sunset, however it has been a long time since I've looked at that code.

There used to be a way to interact with the wind (push it around) but one of the other developers quietly disabled that feature sometime after launch in June 2003, and I've never got around to putting it back in.

Originally we were very concerned about how many CPU cycles the wind would use so it is dialed down to a fairly low resolution (16x16) simulation with only a few steps a second. Someday it would be nice to revisit the wind simulation code and enhance it, however looking at my busy schedule it would be a year or two away at least.

  1. ^ This quotes a thread that is no longer available. The quote is assumed to be an excerpt and not the entire post.
  2. ^ While only an excerpt is shown, the full text can be found in this documents source.

Pages in category "LSL Weather"

The following 4 pages are in this category, out of 4 total.