# Prim Equivalence Explained

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

## Recommended Posts

Soooo making the object scripted/physical increasing cost will be done away with? I can understand some of the reasoning behind streaming cost and rendering cost but this part make no sense.

• Replies 60
• Created

#### Popular Posts

There's been a lot of discussion lately about prim equivalence, so I thought I'd post some of the principles that have been guiding the implementation of the streaming cost metric.  There's a lot of t

While experimenting a bit further i came across this issue:   Both kettles are mesh objects. Both kettles have exact the same appearance, the same LOD decimation, everything is equal, exept :

Here are soime actual figures. These are the prim equivalents for three object which all have the same hight LOD mesh with 6144 triangles. The reduction of triangles per LOD step is constant in each o

This has probably been asked and answered fifty times, but so have most of my questions— is streaming cost (or prim cost, whatever) something that is assigned at the time of upload, or does it change as the calculations change? If I upload something now that has a nominal cost of 50, and the cost is later recalculated, will my object's cost stay at 50 or will it adjust to the new cost?

Don't want to spend a lot of time uploading if I'll have to do it again and again and again.

##### Share on other sites

Here are soime actual figures. These are the prim equivalents for three object which all have the same hight LOD mesh with 6144 triangles. The reduction of triangles per LOD step is constant in each object at each step, and is 1/2 (obbject2), 1/4 (object4) or 1/8 (object8). The success of reducing cout by having higher triangle ratios is highly dependent on the size (in-world dimensions) of the object, as you can see.

 LOD radius step 0.1 1.0 2.0 4.0 8.0 16.0 32.0 object2 1/2 16.8 22.5 39.9 67.3 83.1 126.0 135.9 object4 1/4 2.2 5.3 14.4 53.8 55.9 120.9 135.9 object8 1/8 0.7 2.2 6.7 21.0 42.1 118.3 135.9

Notes:

All prim equivalent numbers (non-italic)  are "selection streaming cost" from Develop->Show Info->Show Render Info. They do vary with the object radius as expected from the implementation shown in the wiki. The objects have a cube bounding box whose dimensions were set using the edit floater to 1.155 ( 2/sqrt(3) ) to give the radius 1.0, and appropriate multiples for the others.﻿

ETA: These meshes have the same number of triangles as three sculpties. Sculpties use 1/4 triangle reduction ratio between LODs, like object4.

• 1
##### Share on other sites

meshes stream more like textures than prims. maybe we should start charging a prim per texture too

##### Share on other sites

Runitai Linden wrote:

THIS is exactly the kind of feedback I'm looking for.  Something isn't adding up here, so I took a look, and this is what I found out.

Not all triangles are equal -- the streaming cost assumes an average of 10 bytes per triangle, but on low poly or faceted objects, many vertices are used in only one triangle, so the average triangle size (in bytes) for those objects is often much more than 10 bytes, not to mention the overhead of the mesh header and LLSD tags, which can outweigh the size of a tiny mesh.  It's fair to charge more for these for a few reasons:

1. The extra data has to be streamed, creating overhead.

2. An extra HTTP request must be made for a tiny amount of data, creating overhead.

3. Actual render time performance of these objects is worse per triangle due to a high number of post TnL cache misses.

#3 will vary from machine to machine, and will be much more noticeable on low end machines.  As for 1 and 2, this could cut both ways -- using one small mesh multiple times will load better and require less bandwidth than baking multiple instances of that same mesh into one big mesh.  The streaming cost already ignores the header when determining cost, and the overhead of the LLSD tags is constant, so a deduction could be made there.  As for the extra HTTP request, that's a protocol issue builders have no control over, so it's really not fair to have that cost against you, and future protocol improvements could theoretically stream multiple meshes with one HTTP request.

Thanks for the example!  I'll need to see some large mesh builds to get a better idea of actual bandwidth usage and file sizes, but in the future we'll probably start talking about a visible mesh data size budget instead of a visible mesh triangle budget.

Im still trying to hammer some of your points in my head.

Especially the line:

"Not all triangles are equal -- the streaming cost assumes an average of 10 bytes per triangle, but on low poly or faceted objects, many vertices are used in only one triangle, so the average triangle size (in bytes) for those objects is often much more than 10 bytes, not to mention the overhead of the mesh header and LLSD tags, which can outweigh the size of a tiny mesh.  It's fair to charge more for these for a few reasons:﻿"

Im a bit baffled. How can a triangle have more then 3 vertices? By the definition of an triangle, thats simply not possible? Only explanation i could come up with is creating an irregular mesh, where one corner of a plygon sits somewhere on an edge of an adjacting triangle. But still then .. this Vertice has nothing to do with this triangle at all ?

Other thing would be an Subdivide of an edge. But even then the uploader would change that subdivide into another additional triangle. Maybe you can explain a bit further what is meant here ?

Dain

##### Share on other sites

I had to read that line a couple times to be sure.... Runitai said:
"but on low poly or faceted objects, many vertices are used in only one triangle﻿"

Triangles can't have more than 3 vertices, but a single vertex can be used to create several different triangles. I.E. they  share a common vertex. According to Runitai, if they don't share, things start to get more expensive.

##### Share on other sites

Ah

Yes that would be another explanation.

Thanks

##### Share on other sites

I think it's a result of the way the data is structured internally. There is a list of triangles in which each of three inices points to a different entry in a list of vertices. Each entry in the list of vertices specifies position (x,y,z), normal* (x,y,z) and UV map position (u,v). The gpu needs the vertex normals to do the shading and interpolates between them as it traverses the triangle.

In a faceted mesh that has sharp edges, where multiple triangles meet at a vertex, the normal is different for each of the triangles, as they are angled with respect to each other. So, although the vertex is at the same vposition, there have to be multiple entries in the vertex list, each with different normals. For smooth surfaces, the normals at the shared vertex position are all the same. So now all the triangles can use the same vertex list entry. Thus a faceted mesh, or any mrsh with sharp edges in it, will increase the size of the vertex list.

The other thing that has a similar effect is seams in the UV map. For example, in the usual unwrapping of a cube, there are only 8 vertex positions, but two of these have two different uv positions and three have three different uv positions. Thus this requires 14 vertex entries with this indexing scheme.

As far as effects on streaming cost are concerned, it is clear that the extra data required for faceting and uv fragmentation increase the download data size, and thus the cost. Whether it increases the gpu worload, I don't really know enough to speulate. As far as I know, you still have to feed all the same amount of data for each triangle into opengl, and if anything you might think that rendering flat faces would be faster because it doesn't need interpolation of the normals. Maybe someone who knows more about opengl and the internals of gpus could enlighten us here?

* normal = the direction in space that is at right angles to the surface.

##### Share on other sites

I did a quick peek into the OpenGL specification.

And it seems the normal dirction is based on a vertex calculation instead of the surface calculation.

That would explain some concerns about too many vertices.

There are 2 sources i peeked in

And for the lights

Seems we have to be very careful in regard of joining verts, to be sure we get the proper calculations. As far as i can see it is really important in regard to smooth shading.

##### Share on other sites

Gearsawe Stonecutter wrote:

Soooo making the object scripted/physical increasing cost will be done away with? I can understand some of the reasoning behind streaming cost and rendering cost but this part make no sense.

No, the "Prim Equivalence" will still be simulation cost or streaming cost, whichever is greater.  This conversation is just focusing on streaming cost.  I'll leave physics and script cost to some other discussion.

##### Share on other sites

Rusalka Writer wrote:

This has probably been asked and answered fifty times, but so have most of my questions— is streaming cost (or prim cost, whatever) something that is assigned at the time of upload, or does it change as the calculations change? If I upload something now that has a nominal cost of 50, and the cost is later recalculated, will my object's cost stay at 50 or will it adjust to the new cost?

Don't want to spend a lot of time uploading if I'll have to do it again and again and again.

The cost is calculated post upload and adjusted dynamically as the calculations change.  At this point, anything you upload WILL NOT need to be uploaded again.  The format is finalized and any future changes must be backwards compatible.

##### Share on other sites

Dain Shan wrote:

Im still trying to hammer some of your points in my head.

Especially the line:

"
Not all triangles are equal -- the streaming cost assumes an average of 10 bytes per triangle, but on low poly or faceted objects, many vertices are used in only one triangle, so the average triangle size (in bytes) for those objects is often much more than 10 bytes, not to mention the overhead of the mesh header and LLSD tags, which can outweigh the size of a tiny mesh.  It's fair to charge more for these for a few reasons:﻿
"

Im a bit baffled. How can a triangle have more then 3 vertices? By the definition of an triangle, thats simply not possible? Only explanation i could come up with is creating an irregular mesh, where one corner of a plygon sits somewhere on an edge of an adjacting triangle. But still then .. this Vertice has nothing to do with this triangle at all ?

Other thing would be an Subdivide of an edge. But even then the uploader would change that subdivide into another additional triangle. Maybe you can explain a bit further what is meant here ?

Dain

Meshes are stored as "indexed triangle lists."  If a vertex is shared between two triangles, the position, normal, and texture coordinate are stored once, and that data is referenced by an index array.  For smooth shaded meshes, any vertex that shares a position tends to share a normal as well, so the vertex data only needs to be stored once.  For a faceted cube, there are actually 3 vertices at each corner, each with a different normal, which increases the data size.  If the cube was smooth shaded, only 8 vertices would need to be stored total, but since it is flat shaded, 24 vertices must be stored.  3D Modelling programs tend to use separate arrays for position, normal, and texture coordinate data, but this results in bloated index arrays.  Since the vertex data in a Second Life mesh asset is compressed, it's better to save on indices than vertices.

##### Share on other sites

Drongle McMahon wrote:

As far as effects on streaming cost are concerned, it is clear that the extra data required for faceting and uv fragmentation increase the download data size, and thus the cost. Whether it increases the gpu worload, I don't really know enough to speulate. As far as I know, you still have to feed all the same amount of data for each triangle into opengl, and if anything you might think that rendering flat faces would be faster because it doesn't need interpolation of the normals. Maybe someone who knows more about opengl and the internals of gpus could enlighten us here?

* normal = the direction in space that is at right angles to the surface.

Faceted meshes are more expensive to render than smooth shaded due to  cache misses in the post-transform cache.  Basically, if a vertex is used more than once and we did a good job cache-optimizing the index buffer, it only needs to be run through the vertex pipeline once for every triangle it is part of, and the fragment (pixel) pipeline uses the cached transformed data.  If it's faceted, it's effectively not shared between triangles due to the normal, so color values are different for each triangle.

##### Share on other sites

Would be possible to include Occluders to the mesh release? Special feature prim that hidden inside meshes or prims can screen out all the non visible geomtry from rendering , this is used in most modern games saving ot of render times... it woudl be possible ot include that in meshes?

##### Share on other sites
• 2 months later...

Listen, it's OBVIOUS what Linden Labs is up to: money. It's not "profitable" to make sense, so they limit the amount of content a mesh creator can use for one simple reason: If less prims are used, then Linden Labs doesn't make as much money. So, they up the PE and screw over EVERYONE.

For the new user it doesn't mean anything, but for users who've been around a while and have waited for a very long time for something like this to happen, it's like giving a loaf of bread to a starving person and saying that they can only eat what they can fit into their mouth in one bite. Sometimes, someone can fit quite a lot into a mesh, but the PE limitations will still leave you starving. Meanwhile, Linden Labs only has to ignore the users and rake in the cash from people who don't care or don't KNOW what kind of screwed up deal this is.

Even so, I'm going to complain. A lot. I hope EVERYONE asks why a Sculpty, which is harder to render and has so many verts that it's not fit to be in a video game, is less expensive than a mesh that can render in mili-seconds and has ten times more detail than any sculpty, yet it's PE is ridiculously high.

~Scorium

##### Share on other sites
• 4 months later...

Hello

I am relativally new to sculpting and creating mesh objects so i cannot really argue with what you are saying nor do i fully understand all of what you are saying.

My arguement is this the majority of avatars in second life will not pay for prim expensive mesh.they already feel they pay more than enough for there land tiers, You can give explanations as much as you like it wont change the fact that if mesh is more expensive not by a bit in fact  a lot. Avatars and sl builders will not buy mesh items or use mesh . This in its self will kill or lets use a more apropriate word limit the mesh project only a few with lots of money to throw away will pay for mesh the most of us wont. as we have to think about being efective with the prims avalable to us and that in its self will hit linden hard as there has been a lot of investment in the technology. And what a great Tech it is:) but its gonna go with the dodos

Unless (as one person said ) you use mesh only for clothing or avatar models.

I am one of those people and i got to say that if i got to create a mesh i look at the cost of it and if it is more expensive well i will always use traditional means i thing at least 90% of avatars if not more feel the same. It is a hobby for me to be on secondlife. But it is not my bread and butter. So Mr Linden when the cost comes down then i will look to use mesh but untill then yes i might play with it and upload a few mesh objcts to view them but they wont be used on my parcel for the mear fact that its to darn expensive.

That is the one point that will stop all mesh builders from selling mesh in sl No one will buy prim expensive mesh.

Have a great sl day guys.

##### Share on other sites

It takes a proper builder, but in most cases that I've seen, it's possible to get a mesh object to look better at a lower landimpact  than any normal prim build or even sculpty equivalent. It's a myth mesh costs more and already a stubborn one it seems.

##### Share on other sites

like i said i am relativaly new to building but in most cases its what price that most will look at  will look at  and a good builder can make sculpties as good as any mesh.  Just mpre work in joiming them

##### Share on other sites

"a good builder can make sculpties as good as any mesh"

That depends what you mean by "as good as". If you need sharp edges that stay sharp even after just one LOD step, you can generally make the mesh object much cheaper than the sculptie, and you can make it stay good at all LODs. If you want people to be able to texture your object with standard textures, appropriately UV mapped meshes win every time. Most important of all, if you want the mimimum GPU resource consumption, then meshes win for everything except smooth rocks. Of course if you use enough sculpties, you can make anything, just as you can with limitless polys in a mesh, but either quickly becomes an unacceptable waste of GPU.

It would be interesting to know what sort of objects you are thinmking of. Can you give some examples of sculpties that cannot be made better in mesh? I would like to have a look at them and see if I can work out why that might be.

##### Share on other sites

Kwakkelde Kwak wrote:

It takes a proper builder, but in most cases that I've seen, it's possible to get a mesh object to look better at a lower landimpact  than any normal prim build or even sculpty equivalent. It's a myth mesh costs more and already a stubborn one it seems.

Its not a myth .... if you are a builder of Landscape sculpty terrains... Build a sim mountain or waterfall for 1 prim.

yes I will debate this "myth" since it is not a myth.  LL crippled Mesh's quick adoption by introducing LI costs on Mesh and not any other prim.  They should not have introduced it for Mesh until after it was adopted fully.  Then addressed Rezzed Resourced Based costing as a whole... not just to penalize the one latest technology that would reduce lag if the technology could reduce the number of Sculpties on the grid.

I will hold onto yhe MYTH.... because I know my customers of landscape sculpties will not buy a mesh pack of my landscapes if these mesh landscapes will cost many times more than a sculpty to rez on the sim.

Here is hoping LL will address the unfair LI situation they created that hampers Mesh adoption.

This is not a debate about Technical superiority - Mesh wins in most cases if cost was not a factor.

##### Share on other sites

Jolney Cheri wrote:

like i said i am relativaly new to building but in most cases its what price that most will look at  will look at  and a good builder can make sculpties as good as any mesh.  Just mpre work in joiming them

I already said the price is in most cases in favour of the mesh, not the sculpt. Even if a meshupload costs you let's say L\$30, chances are you need more than three sculpties to make the equivalent shape. And the shape won't be as good. Sculpties are very limited in shape, no matter how good the builder is. You have a 255x255x255 grid to work with, so subtle curves on a big object are impossible to make. With mesh you also work on a grid, but an exponential one and it's nearly impossible to notice, especially on a small scale like a 256x256 meter sim.

It's not my category of building, but if you want to see the limitations of sculpts in smoothness, look at any sculpt car then compare it to a mesh one.

##### Share on other sites

The myth is: mesh costs more than sculpts

That doesn't mean there can't be cases where the mesh DOES cost more than sculpts.

Toysoldier Thor wrote:

Its not a myth .... if you are a builder of Landscape sculpty terrains... Build a sim mountain or waterfall for 1 prim.

yes I will debate this "myth" since it is not a myth.

It is a myth, but as I said in most cases, not all. The objects you build combine two cases where the sculpt has the upperhand as far as costs go. First is the size, with very large items the higher LODs start weighing heavily on the impact of a mesh (This is assuming your items are large, if they are not I doubt you are better off with sculpts in the first place). Secondly sculpts that use their full map (and need their full map) and are more or less uniform in vertex distribution (let's call it blobs). This is normally not the case for smaller items.

These are exceptions though, even if some people will run into this issue on a daily basis.

They should not have introduced it for Mesh until after it was adopted fully.  Then addressed Rezzed Resourced Based costing as a whole... not just to penalize the one latest technology that would reduce lag if the technology could reduce the number of Sculpties on the grid.

Doesn't something have to be introduced before it can be adopted?

LL didn't penalise mesh, they just didn't implement the new, fair way of building costs on older items, that's not the same. You can't honestly tell me you would have been happy if all your landscaping items would have twice the impact they have now, or three times. LL always has backwards compatibility and preventing breaking content high on the agenda. It's a compromise and an understandable one. If you ask me, they should have capped the "old sculpts" though and implement the new rules to all newly uploaded sculpts. But even this would mean broken content, for example sculpty building kits.

Mesh wins in most cases if cost was not a factor.

I'd like to make that statement a bit stronger.

Mesh "wins" in practically all cases, with some exceptions where sculpties looking almost as good cost far less to build and where the size exceeds 64 meters.

##### Share on other sites

No its not a Myth just on rare occassions.  Granted most mesh and sculpty builds that are made and sold are for smaller items but the number of larger items are not RARE.  Not just landscapes of large terrains but larger complex prefabs of Mesh will be hurt by LL's LI Penalty.

Its sad that I have to polarize my position in order to get through the technical loveing biases around MESH.  Again, Mesh is an amazing technolgy and I am happy to see it STARTING to evolve and mature.  I has a long way to go in the world of SL both technical, political, and economically - I am certain in the end things will balance out and most things will get resolved - including the PENALTY on Mesh that LL created.

Drongle and other say "I wouldnt call it a penalty as much as Sculpties have a subsidy"....  LOL  sorry but in the real world as in SL... a subsidy offered to only one side of any competing environment is a PENALTY to the other.  You all can spin this any way you want in order to defend LL's reason to penalize mesh but its at the end of the day LL's actions penalized mesh by trying to start correcting a long standing wrong.

You all would be excellent world politicians.  Try telling a Canadian Farmer that in the world economics their products are not PENALIZED against farmers in France or the US who subsidize their farmers to grow inefficient crops.  To the politicians there - they say "its not a penalty - its only a subsidy to help our farmers from going bankrupt and supporting our industry".

When it comes to adopting a new technology - the harder hurdle by far to overcome is the New Technology COST Hurdle.  But ironically, in the case of LL and SL, this is not the case.  Instead, LL decided for Mesh that they would try to kill two birds with one stone.  So not only did they want to introduce a new technology that would be more efficient on the grid and more powerful, they also decided they wanted to address another completely different and larger topic of addressing unbalanced costing that didnt reflect load on the sim.  These were TWO DIFFERENT ISSUES.

What LL should have done was put out the new Mesh technology on a level playing field with older technology they want to see disappear (sculpties).  They should have done this by not introducing "FAIR" load based costing on Mesh.  They should have simply kept Mesh LI fixed like a sculpty.

Then..... once Mesh had matured enough and was fully ADOPTED (which it is by far not yet adopted for many reasons like viewer support on the grid, glitches on clothing, proper listing and categorization on MP, etc.) and growing in popularity LL could take on the tougher job of addressing and introducing a "fair" Load-Based costing of prims on the grid.

Anyway... we can debate this all we want about the definition of a "penalty" vs a "subsidy" .  Its pretty clear in the RL what the two mean unless you want to use the terms to spin a poor decision.  Regardless, nothing will change as we all know LL all too well.  Mesh is and will be FOREVER the only type of prim that will be penalized with a "fair" load-based costing model.

I know most of you are dreaming with hopes that LL will soon introduce the similar model on Sculpties and prims, and scripts, and textures, etc.    YOUR DREAMING !!!  LL will never go this far.  LL would have an absolute crushing revolt on their hands if their even dared hinting that they will be doing to sculpties and prims and scripts what they did to mesh.  With SL's growth staled out and its economy sinking... even LL is not that stupid to stick another huge sword into their customer base and the SL product by retroactively incuring massive prim costs on all the sim owners.

In 2011 LL saw 900 sims become abandoned because of many reasons including the growing popularity of Marketplace.  If LL leveled the playing field and did to all other prims what they have penalized Mesh with - I would comfortably predict that double the number of sims would be abandoned within 6 months.

Doesn't something have to be introduced before it can be adopted?

No... since ADOPTION is a critical part of INTRODUCTION.  Your question doesnt even make sense.  When you want to introduce a new technology, process, concept into any population or market - one of the primary objectives is to attain a healthy and even quick adoption.  You surely do not do this by imposing an artificial penalty on the technology unless its a mandatory penalty.  LL - in its lack of understanding on economics - did exactly this.  But LL has always been known for thinking Academically (purist theories) and not business or economically or politically.

Anyway... this debate will go round and round.

I said back in August (and Medhue knows this since it was directed at him in those postings) that Mesh will not attain critical mass adoption until about Q2 2012.  He was completely shocked at my statement because he so loves Mesh that he was and still is blinded by the bias.  But guess who was right?  Mesh is still far from critical mas Grid / SL population adoption.  In fact I think Q2 might be a bit hard to attain.  PS... the fact you all are pumping out counltes mesh does not mean its adopted

OK... moving on

##### Share on other sites

Mymy, for some people the glass is always half empty.

If LL had made mesh available the way sculpts and normal prims are treated, we wouldn't have been able to move, which in sculpt infested regions is already pretty much the case. Framerates of 4 per second are no exception to me in those visual lagpits.

Even with the "penalty" mesh is superior to the sculpt on so many levels including primcount. This is not the case for your sculpts. Your sculpts. I have made objects at their 64 meter limit that cost less than a similair sculpt build and at the fraction of the rendercost. Easier to texture. Faster to load. Easier to build. Taking less prims. Using smaller textures. Better performance. Better LoD behaviour. Did I forget something? probably.

So you continue making sculpts, LL isn't going to abandon them. You simply found a field of creation where the sculpt is preferred. Nothing more, nothing less.

Mesh is an addition, a very very good addition to the grid. It might take a little longer than Q2 before it's fully embraced as the building tool of the future. Maybe that will never happen, even then it's still a nice addition. I've seen and made things impossible to build with anything besides mesh. I've seen people making your claim that "mesh costs more" and I and lots of other people have proven them wrong in about all cases. You as a sculpt builder for some reason want mesh to replace everything, I wonder why.

##### Share on other sites

I look forward to the day with Mesh can replace sculpties completely... but I am a realist as well.  I can put Mesh in proper perspective and not be so in love with a technology that I would completely dismiss the economics that LL imposed.

I know that in the current environment that LL imposed with the variable upload an LI that will only be imposed on Mesh will mean that Sculpties will never go away because they will always have a cost advantage that suits specific needs.

I do agree with you that Mesh is an ADDITIONAL technology and will always be.  I could have been a sculpty replacement technology in the years to come but that wont be the case.

##### Share on other sites

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

## Create an account

Register a new account