Jump to content

Understanding Mesh Server Weight

Gaia Clary

You are about to reply to a thread that has been inactive for 4092 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I refer to this wiki page:


From that page i learned how the weight is actualy calculated:


dynamic_multiplier = 2.0
static_multiplier = 1.0
per_prim_cost = 0.5
base_cost = 1.0

if there are any scripts or the object is physical, active_cost = dynamic_multiplier. 
Otherwise active_cost = static_multiplier. Cost scaler is currently 1.0 Server weight(per prim) = cost_scaler * active_cost * (per_prim_cost + base_cost / num_prims)
Total Server weight = Server Weight * num_prims

Let me reduce the formula by taking the current numbers and calculate the Total Server Weight:

Total Server Weight = num_prims*cost_scaler*active_cost*(per_prim_cost + base_cost/num_prims)
Total Server Weight = num_prims * 1.0 * active_cost * ( 0.5 + 1.0/num_prims)
Total Server Weight = num_prims * active_cost * ( 0.5 + 1.0/num_prims)
Total Server Weight = num_prims * active_cost * 0.5 + active_cost

Total Server Weight (static objects) = num_prims/2 + 1.0
Total Server Weight (dynamic objects) = num_prims + 2

 This means basically 2 things to me:


  1. The server weight for one single Mesh makes its primcosts at least raising up to 2.0.
    But for 2 or more objects in a linkset the total server Weight is always less or equal
    to the number of prims.
  2. The server Weight for a link set with scripts is always: number of prims + 2

A practical example:

Assume i wanted to create a hair wig out of meshes. And assume i wanted to create this wig by using 50 "strains of hair" (taking the numbers from my current hair as an example).

According to the formula a hair made of 50 strains would give these costs:


  1. When i use no scripts: Total ServerWeight = num_prims/2 + 1 = 26
  2. When i use scripts: total ServerWeight = num_prims + 2 = 52

So my conclusion is:

Server Weight can be neglected when:


  1. The number of prims in a link set is > 1 (Server weight for 2 prims in a link set is 2)
  2. No scripts are added to the linkset.

On the other hand, when Scripts are added to the link set, then the total costs is always equal to the number of prims plus 2. Does that take out a bit of the pressure now ? Or is Server Weight still something to worry about ?

Link to comment
Share on other sites

"Or is Server Weight still something to worry about ?"

Only if you have devoted many hours to optimising 1-prim mesh objects, which are now all doubled in PE.

Of course the user can link them to his house, then they might cost him only 0.5. In fact, you might halve the cost of the house if all the prims are simple prim boxes. 

On the other hand, if you he has a nice plate of torus donuts linked to the kitchen, then he risk losing his house.

Oh, and unlink those scripted doors. If they stay linked, they will put the saved costs right back again.

Better warn your customer ... "if you have a mesh house, you will save by linking this to your house, but if you have a prim house link it at your own risk. You could increase he prim cost of your house 100 times. If you are lucky, you could reduce it by nearly half." .... "What do you mean you don't know whether your house is mesh or not?"


PS. Yes. Your calculations ans conclusions are correct as far as I  can see.



Link to comment
Share on other sites

Actually i have put almost a week into my kettle tutorial to show how to convert a 2 sculpty object into a one-mesh object with a disappointing PE=2 and a lot of extra work (to be fair, i got better LOD and i got 4 texture faces, so i got "more for my money" ... somehow)

But my point here is to understand the impact of the server weight (isolated from the other weights). As far as i understand the issues you mention, they are related to physics costs and streaming costs. But server weight at its own seems to be much less painfull as commonly believed. You only have to look at it from the right view point, then it becomes less freightening.

Well, i still do not understand why the smallest PE is 2 and not 1, but Runitai has mentioned a few arguments which may make this extra fee understandable. Although i honestly did not (yet) understand what makes a 2 prim object more efficient than 2 one Prim objects.

Link to comment
Share on other sites

heh, here is a strategy:

Assume you had n scripted objects and m non scripted objects.
neglect for a moment streaming costs and physics costs and focus only on server weight:

Total Server Weight = n/2 + 1 + m + 2
Total Server Weight = n/2 +m + 3

The break even (number of prims == total PE) is then where:   

n+m >= n/2 + m + 3
n >= n/2 + 3
n/2 >= 3

n >= 6

this means on the contrary: Wherever you can bundle 6 low resource meshes, you can get one set of scripted objects for "free". So all we have to do, is to bundle our objects in a clever way. Then we can get rid of server weight costs. Well ok, this is super simplistic and it works only when the scripted objects actually CAN be bundled into one linkset.

But will the server run better, faster, more stable if such a bundling is done ?


Link to comment
Share on other sites

My brain hurts.

People like things they can understand so they can build things having a good idea how things will turn out. This is far too complex.

Like it or not, mistake or not, the standard was set with ordinary prims and the introduction of sculpties. It is insane to tell us we cannot compare mesh to those and useless, for our customers will and so do we. It is insane to try to correct perceived problems of the past by burdening mesh with attempts at correction.

Linden Lab should "eat" the errors of the past and look at other means to handle resource costs through coding and staying on the cutting edge of server and internet technology. Technological progress is moving at an incredibly fast rate, and in a year or so this will be a non-issue.

Link to comment
Share on other sites

I experimented with Server Weight in order to understand the consequences of its introduction and in order to understand how to work with it. From the experiments i only can tell that i do not understand why it was invented.

From what i learned so far, you can compensate the server weight by simply reorganising your link sets. And this looks to me like that could be done under the covers, within the server, without us (the users of the system) having to deal with it.

If Server Weight would be removed, we instantly would get a much easier to understand system with resource costs and physics costs only (and even that is not simple, only simpler than with Server Weight on top of it). And it would again be possible to get mesh objects which cost just 1 Prim.


Link to comment
Share on other sites

It's not only hard to understand, it's dangerous to users if merely resizing or linking causes object return.  People do not expect that and will be very unhappy when it happens.  Although it may not be a perfect model of the cost of a mesh object, a formula like "300 triangles = 1 prim" is easy to understand, both for designers and users.  It will eliminate the danger of linking or resizing, and still penalize complex meshes so that we will try to make efficient ones.

Link to comment
Share on other sites

  • 4 weeks later...

Sorry to necropost, but this is the nearest thing I could find, searching this forum, after having completely ignored Mesh for a few months.

Now having run into this, I have to say: WTF?

It used to be possible to have Mesh objects with a PE of 1.  Do they really mean to make that impossible?  If so, it means there's a minimum geometric complexity needed for it to make any sense to use Mesh at all.

That's fine, if that's all they want Mesh for, but it precludes a whole class of geometric objects we were originally led to believe could use Mesh to reduce rendering complexity.  

Maybe the Mesh implementation optimized for something else, such that it really can't provide that rendering advantage at the bottom end.  I'd like to hear the Mesh folks admit that openly, though, if that's the case.

(Off topic for this very retro-thread, but still annoying: It's a Very Bad Move to be weighting scripts in the Mesh PE calculations because that needs to be controlled for all objects, not just Mesh.  Unlike rendering complexity, it can be.  Or, it could be, if it weren't confounded into the Mesh PE calculations.  Jeez.  I let them run open-loop for a few months, and look at the mess they make.)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4092 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...