MantisBT - opensim
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008205||opensim||[REGION] OpenSim Core||public||2017-07-01 13:12||2017-07-02 16:44|
|Platform||AMD multi core||OS||Linux||OS Version||Fedora 25|
|Product Version||master (dev code)|
|Target Version||Fixed in Version|
|Git Revision or version number||OSgrid 0.9.1.0 (Dev) 4df19ec: 2017-06-16|
|Run Mode||Grid (1 Region per Sim)|
|Environment||Mono / Linux64|
|Summary||0008205: llGetParcelPrimCount does not report Land Impact|
|Description||In 2011 SL changed what llGetParcelPrimCount reported from prim count to be land impact (li). opensim apparently has not made this change so it is out of sync with the wiki and does not adhere to the "gold-standard" of working exactly the same as in SL.|
The wiki states:
Function: integer llGetParcelPrimCount( vector pos, integer category, integer sim_wide );
325 Function ID
0.0 Forced Delay
Returns an integer that is the total land impact of objects on the parcel at pos of the given category
• vector pos – position in region coordinates (z component is ignored)
• integer category – a PARCEL_COUNT_* flag
• integer sim_wide – boolean, TRUE searches parcels in the region with the same owner as the targeted parcel, FALSE searches only the targeted parcel
How it works
For each object in the Second Life world, Second Life compares three important performance factors: download weight, physics weight, and server weight. It then chooses the highest of these weights and assigns it to the object as that object's land impact rating.
Here's a very quick overview of the different weights; for more information on each, follow the links below:
Download weight: Calculated by determining how much bandwidth is required to download and view the object. Larger and more visually complex objects have a higher download weight. You can reduce the download weight of complex objects by generating or uploading less complex meshes for differing levels of detail when you upload a model.
Physics weight: Calculated by determining the complexity of the object's physics model. You can reduce the complexity of a mesh's physics model by using the analysis and simplification tools in the Upload Model window, by uploading your own less-detailed physics model, or by choosing a different physics shape type, such as Convex Hull, on the Features tab of the Build Tools window. Vehicles must have a physics weight of 32 or lower, but may have higher download or server weights.
Server weight: Measures the impact an object has on Second Life's server resources. Objects that are composed of many prims and have physics enabled and/or contain scripts tend to have high server weights.
When is an object's land impact calculated using the new algorithm?
Legacy prim objects have a land impact rating equal to the number of prims they contain. However, any object's land impact is calculated using download, server, and physics weights if it meets any of the following conditions:
The object is an uploaded mesh.
The object is linked to an uploaded mesh.
The object, or any part of the object, has a physics shape type other than Prim. You can change this on the Features tab of the Build Tools window.
The object has a normal or specular map applied to it.
|Steps To Reproduce||simple to test. Use any viewer and get the prim count and the land impact values of any parcel or item. Then use Function llGetParcelPrimCount to get the same information. It will always match the prim count and not the land impact the viewer reports.|
My testing so far has resulted in this function reporting the number of prims and not the land impact.
Here is the script I am using to report parcel usage:
//==== G L O B A L V A R I A B L E D E C L A R A T I O N ====
gPrclID = ;
gTotPrims = 0;
// Begin scanning at the SW <0.0,0.0,0.0> corner of the sim
vector regionsize = osGetRegionSize(); // get the max size of the region dimentions
xlimit = (integer)regionsize.x; // set the region top limit
gX = 4;
gY = 4;
while (gY < xlimit)
//Grab the parcel's ID and name at position <gX, gY, 100.0>
list parcel = llGetParcelDetails(<gX,gY,100.0>,[PARCEL_DETAILS_ID,PARCEL_DETAILS_NAME]);
key temp = llList2Key(parcel,0);
string parcel_name = llList2String(parcel,1);
if (parcel_name == "") parcel_name = "(no name)";
if (!~llListFindList(gPrclID,[temp])) //Scan at this location if this parcel was not scanned earlier
integer Count = llGetParcelPrimCount(<gX,gY,100>,PARCEL_COUNT_TOTAL,FALSE); //Do not include other parcels owned by llGetOwner()
gTotPrims += Count;
results = results + parcel_name + " Land Impact = " + (string)Count +"\n";
gPrclID += [temp]; //Add this parcel to the "previously scanned" list
// Increment X and Y in successive scans to look at the entire sim in 8m square blocks
if (gX < xlimit) gX +=8; // increment the x value
if (gX > xlimit)
gY += 8; // if at top of column
gX = 4; // step to bottom of next column
llSetText("Touch to start scan",<1.0,1.0,0.0>,1.0);
llSetPos(llGetPos() + <0.0,0.0,0.5>);
gNUM = 0;
results = results + "Scan started on " + llGetRegionName()+"\n";
scan(); //scan entire region for land impact
// Reached NE corner
results = results + "Scan finished. Total region land impact = " + (string)gTotPrims + " in " + (string)llGetListLength(gPrclID) + " parcels (not counting temp rez prims).\n";
llSetText("Touch to start scan",<1.0,1.0,0.0>,1.0);
|Additional Information||Why is this important? With the advent of var regions and a somewhat increase of general users who want to use opensim in a social type of network, providers such as myself try to provide reliable home sites to them. Couple that with the proliferation of mesh items and a var region can easily become a useless lag haven for those who want to only stand around but never be able to move.|
Placing a prim limit on a user does not help if the tools used in world to report their server impact which relates directly to land impact do not work. SL made this change for this very reason. I have been told by several users that who cars if mesh items are poprly made or high in land impact. It does not cost anything to upload and everything is free here. No tiers.
That is all true, but only if you do not actually run a server that needs to be efficient and you can manage the load it is trying to provide service for.
It would be nice if the functions needed for a script to report actual usage worked right and like the wiki says they do. It would give some support to those of us who want to keep the grid running smoothly and make it a fun experience for all.
|Tags||No tags attached.|
|2017-07-01 13:12||slow putzo||New Issue|
|2017-07-01 16:08||UbitUmarov||Note Added: 0032111|
|2017-07-02 09:25||slow putzo||Note Added: 0032116|
|2017-07-02 15:48||UbitUmarov||Note Added: 0032118|
|2017-07-02 16:44||slow putzo||Note Added: 0032121|