Mesh Costs Explained

In the SL Wiki we have been given the equation that represents how mesh complexity is converted to Prim Equivalency. The page has changed from time to time and the values used in constants have changed too. Often changing without the wiki page updating.  Frequently a release of a Mesh Project viewer changes all the equivalency values we have been seeing in the viewer. Changes to the simulator software have also changed the values shown in the viewer. Several have been guessing at what the Lindens are actually trying to achieve with these changes. Speculation on what the Lindens will do and why is ranging from hopeful to ridiculous. Now Runitai Linden has explained the Linden goals.

Mesh110612_001

Mesh Equivalents

The Fallacy

When the Linden’s used the worlds ‘Prim Equivalency’ the stage was set for residents to start comparing prims and sculpties to mesh. The Lindens may have even been thinking of mesh as a prim type. We know that the first mesh we saw in open beta was very sculpty like. The Build Floater even had a mesh asset in the same place as a sculpty has a place for (sculpty map window) the sculpty map.

We have sence seen the Lindens change the mesh format away from being a sculpty like prim to its own object. The new Mesh Project Viewers are referred to as MAD Project Viewers, MAD being foe Mesh Asset Depreciation.

Runitai explains that comparisons between prims, sculpties, and mesh with their triangle counts are not valid. It is rational to do so, but it is not the pertinent part of the discussion for mesh costs. Mesh is a very different 3D object than all the objects we have now.

So What Does Prim Equivalency Mean?

Runitai has a simple explanation and I think a mind twist for looking at prim equivalency. The limit on prims in a region is 15,000. Equivalency then means 1 prim represents 1/15,000 of the regions resources. Keywords being region resources.

From the Linden side it appears they are looking at how to budget objects into what the region can support or provide. The region resource is equated to 15,000 units. Prims and sculpties are designed to use 1/15,000 of those budget units.

Budget Factors

In life we figure our costs for various things and activities on several factors. We often use money and time to determine the cost of things. Cost may be adjusted by value to us. Guys may be willing to pay more for a babe magnet car as other factor are considered in the value and cost equation. We also have multiple factors contributing to how the region budget of resources is used.

Runitai explains Streaming Cost as representing the bytes the server sends to the client and is directly related to the number of triangles visible. The Linden Goal is to limit the number of triangles that have to be sent at default settings to some reasonable number. The budget they have set is surprisingly small compared to the scene budget.

Runitai gives some examples of visible verses total scene triangle  counts.

Abbott’s Aerodome:
– 3.7 million triangles from prims
– 500 thousand triangles visible from any given location
Lusk:
– 2.8 million triangles from prims
– 218 thousand triangles visible from any given location
Gibson:
– 900 thousand triangles from prims
– 150 thousand triangles visible from any given location

You can visit various regions in SL and use the Scene Statistics to see the numbers. In Debug Settings the setting is DebugShowRenderInfo. In the menu use Devlop (Ctrl-Alt-D to open Advanced then Ctrl-Alt-Q to open Develop) -> Show Info -> Show Render Info.  The value is in KTris (Kilo-tri’s).

Examining lots of regions starts to reveal a pattern. The visible triangles in regions average between 200,000 and 400,000 triangles. It is the visible triangles that affect performance and the amount of data needing to be sent to render a scene. They are the basis for some measure of equivalency between prims, sculpties, and mesh.

To create a mesh build that performs well the mesh triangle limit should be between 200k and 250k visible triangles. Once that limit is exceeded performance degrades.

Quoting Runitai:

There are so many variables that go into that number it gets confusing, so just focus on the result — a target triangle budget of 250 thousand triangles visible from the center of the region if the region was full to capacity with copies of that mesh distributed evenly at ground level.  Here, “visible” means visible from the center, not all in frame from the center.  Fill a sandbox up with your mesh and stand in the center, do a full rotation to get all the lods to resolve, and look at the scene stastics console (Develop->Consoles->Scene Statistics).

So, how will the Lindens create a system where it is to the users cost advantage to control triangle limits? The Linden goal is to have a mesh cost so that a mesh object will use 1/15,000 of the region resources WHEN 15,000 instances of the object are spread evenly across a region (all at ground level).

Quoting Drongle McMahon: (Reference)

[…] The numbers here may change, but for now a 40x40x40 (r=34.66) mesh is going to appear only as the highest LOD wherever you are in the sim. The lower LODs are irrelevant to resource consumption and so the lower LODs will not save you anything in prim cost.

It should be obvious in such a scenario that visible triangles are a factor of the object’s size as well as triangle count and observer distance. If all the mesh objects are 1 meter high, we’ll see lots of objects. If those nearest to us are scaled up, they will hide many of the other objects. But… from anywhere else in the region more of the scaled up meshes will be visible. Hopefully you see how this complicates figuring out what is a fair cost for a mesh.

Another complication is the farther away one is the more Level of Detail (LoD) kicks in to reduce the triangles presented. This leads to the idea that high LoD triangles are cheap because they are only seen when you are close and when close they hide other objects. Low LoD triangles are expensive based on the visible triangles contributed to a scene because we seem them more often from a distance. Complicating things more is the problem of large meshes where high LoD triangles are expensive because they are hidden by few objects and seen from father away at higher LoD. LoD has size and distance equations so one looking at large objects sees the high LoD version from farther away and LoD used at more ‘distances’ is the higher levels.

Call for Help

How all these factors come together is complicated. The goal is to make mesh prim equivalency honestly reflect its part of the 250k triangle budget. All these factors coming together can be mathematically analyzed and some budget values decided on. However there are a number of factors not yet considered. What will users actually build and how will those things fit into the SL regions? How much of mesh will be hidden, seen from a distance, and on and on?

The only way to get representative numbers for equivalency is to look at lots of data and meshes built by users. So, during the next two weeks the Lindens will be analyzing meshes upload in ADITI that use the new mesh format. If you want good values for your mesh, get it uploaded so it contributes to the data being considered. Data from all the uploaded meshes will be used for figuring mesh cost and making adjustments to the equations.

Summary

I suspect Runitai’s article was put out to head off a complaint riot at Monday’s meeting. The recent viewers are reporting much higher mesh costs. That is freaking out some residents involved in mesh. No matter how often residents are told the numbers are not final, some still react and start ranting and predicting disaster.

From Runitai’s article I gather we should be looking at Prim Equivalency in a different way. It should now be obvious prims and sculpties with simple triangle counting are not going to give us a good basis for deciding a mesh equivalency or what cost numbers the Lindens are trying for.

If all goes well, in a couple more weeks the Lindens should have a good idea what the values will be. A week or two after that, those changes will be in the servers and viewers. Only then will we be able to have an idea of what mesh cost is likely to be.

Runitai Linden: Prim Equivalence Explained

2 thoughts on “Mesh Costs Explained

  1. I understand the complexity, and applaud the Lindens for doing their best to work this out to something reasonable before mesh hits the main grid.

    As unreasonable as it may be to compare prims, sculpties and mesh, people will do that. What contents creators build boils down to what users want and will buy. The end user does not care about all of the above. What matters to him or her is the prim count, especially if the user owns a small parcel of land with few prims to furnish and decorate with. If the Lindens want mesh to be used more often than sculpties, which are costly to render but the prim equivalency is stable and low, then they have to keep this in mind as they try to achieve a balance.

    This is not necessarily a bad thing. It means that sculpties and regular prims will sometimes be the best choice and they will not become irrelevant. Non-mesh makers will not be going out of business!

    It ups the challenge for mesh makers to learn to optimize their mesh, where to place loops and vertices to get the detail they need, and to keep them minimized in areas where detail is not needed. It also reduces the usability of much 3D content on the web out there not made and optimized for real life, at least without a lot of tweaking.

  2. Pingback: #SL Scripting Update Week 24

Leave a Reply to Vivienne Daguerre Cancel reply

Your email address will not be published. Required fields are marked *