Don't click here unless you want to be banned.

LSL Wiki : Land

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

Land


In Second Life, land (also referred to as ground or terrain) is stored as a 2D grid of height values (a "heightmap"). This means the ground can never overlap, nor can holes be made through it. The grid has a resolution of 1m in each direction, resulting in 256x256 grid points (0-256) per simulator.

Even though 0-256 implies 257 grid points, sims share their edges with adjacent sims, so the height values at x = 256 or y = 256 will be identical to the height values in an adjacent sim to the east or north at x = 0 or y = 0, respectively.

Or, to put it another way, the grid coordinate 256 of one sim can be seen as the grid coordinate 0 of the adjacent sim.

Ground can be modified with the built-in terraforming tools (Ctrl-5) or the llModifyLand function, and can be read using llGround. Land height between grid points is interpolated, giving it a smooth look. The surface is textured, using multiple textures based on the land height and slope. Island owners can set their own ground textures (though not with LSL) and upload RAW heightmaps in a special format (see below).

Land is either public (a rare sight now) or owned by agents or groups. Such land parcels consist of blocks with 4x4m size. Land owners can disallow the rezzing of objects or running scripts (effective up to 40m above ground). Sound can optionally be restricted to a parcel, with no sound leaving or entering it. Land parcels can also have an audio or video stream associated with them.

Functions

llAddToLandBanList (1.8)
llAddToLandPassList
llEjectFromLand
llGetLandOwnerAt
llGetParcelDetails (1.13)
llGetParcelFlags
llGetParcelMaxPrims (1.13)
llGetParcelPrimOwners (1.13)
llGetParcelPrimCount (1.13)
llGetRegionFlags
llGround
llGroundNormal
llGroundContour
llGroundRepel
llGroundSlope
llModifyLand
llOverMyLand
llParcelMediaCommandList
llParcelMediaQuery
llRemoveFromLandBanList (1.8)
llRemoveFromLandPassList (1.8)
llScriptDanger
llSetParcelMusicURL
llTeleportAgentHome
llUnSit
llWater
        Events

land_collision
land_collision_end
land_collision_start


Q: Is there a way to determine how many objects are on a given parcel of land, or better yet, who owns them?
A: llGetParcelPrimOwners attempts to do this, returning a list showing which avatars own objects and how many prims each avatar owns on the parcel. It is limited to at most 100 object owners, and only works if the script owner has appropriate permissions. There's currently no way to get a list of all the objects themselves - Sensors are only able to detect up to 16 objects per scan.

Q: Is there a way to determine the name or description of a parcel of land?
A: Yes. Use llGetParcelDetails.

Q: Is there a way to determine how much land a user owns within a sim?
A: Not directly. However, you could construct a land scanner that would use llGetLandOwnerAt to scan every 4x4m plot and compare all the owners' keys detected against yours. You wouldn't be able to find out the size or shape of individual parcels, however. Only the overall shape of each owner's land could be detected. It might be all one parcel, or divided up into individual 16 square metre blocks.

You could then use llParcelMediaQuery on your own land to allow your script to check if the parcels are different, though this would only work if the parcels had been set to different video streams. Remember, the media URL doesn't actually have to go anywhere.

Of course, you can specify different media URLs on each parcel. If you're not using the video feature, and don't plan to, you can use it to store unique identifiers this way. If you do need to use the media feature, and you need them to all point to the same URL, try using an URL redirect on a website to produce unique URLs pointing to the same file.

Q: Is there a way to determine whether a parcel is owned by a group or an individual?
A: Yes. llGetParcelDetails returns a list which can contain the key of the land owner and the key of the group. If these keys match, then the land is group owned. However, there is no way for a script to determine the actual details of the group -- such as its name -- regardless.'

Q: Is there a way to get or set the for sale price on land, or set other land flags such as Damage, No Outside Scripts, etc.?
A: No, the most you can do is use llScriptDanger to find out whether or not a given position is above land that is considered "safe" for your scripted object to pass into. You can't set any land flags beyond music or media streams.

Q: Is there a way to automatically buy or sell land?
A: No.


See the RAW heightmap page for information about creating one.

Andrew Linden, 10/11/05: Small movements in land near parcel borders is related to some lossy compression in how we stream the terrain data. There is evidence from our research into the new rendering engine that it is probably easier to just stream the terrain data in its full precision, since it represents less data than a typical 512x512 texture on a simple object.

Lossy compression effects will be most noticable near sharp features (sudden cliff or very tall spike or very deep hole).



Functions | Simulator
Comments [Hide comments/form]
Although the sim coordinates go from 0 to 256, there are actually only 256 x 256 1m^2 'grid points' per sim.
-- XylorBaysklef (2004-01-22 05:40:56)
did I got it right? did Andrew say the artifacts aren't necessary adn that without them the system wodul run even better?!
-- TigroSpottystripesKatsu (2007-04-26 23:39:05)
Is there a way to GET the music url ?
-- 53571649.cable.casema.nl (2007-05-10 11:56:29)
Wow!!!! What a source, it's rare heppens at our time to find so cool design!
-- ip72-207-250-185.br.br.cox.net (2007-06-18 16:32:21)
Attach a comment to this page: