## Sunday, February 19, 2012

### New Math

With meshes, we now have 2 ways to calculate prim count, old math (one prim = one prim), and new math (one prim = however many land impact prims depending on a number of variables). Any linkset linked to a mesh always uses new math (just one mesh in a linkset will force new math for the entire linkset, always). But you can choose to use new math on a linkset of traditional and sculpt prims as well.

But do that with care! There are reasons to do it, and reasons not to. Biggest reason to? In new math, a single prim can count as HALF a prim in a linkset, so one linkset of prims can be half the number of actual prims. Link six boxes and use new math? 3 land impact prims. (Note: this always rounds up. 5 prims will also be three prims, 7 prims will be 4). THIS ONLY APPLIES TO STATIC PRIMS. THEY CANNOT BE SCRIPTED OR PHYSICAL. It's a bonus modifier we get applied to "simple" prims, those that impact the server less.

However, new math is not straightforward like old math. There are 3 variables, and you have to figure out how to juggle them. Some people are just telling people to set entire linkset to Convex Hull and watch the savings: but if you don't have the right things in your linkset, your prims will count as MORE, and you may not be able to walk into your buildings anymore!

There is an easy way to find out what things will cost, and if it's worth trying (AND how to fix the not being able to walk into places problem). Click on the "More info" link to find out what your object will cost (it can take a bit to calculate though!):
That will bring up this second menu with all your infomation. The thing I currently have selected is 3 prims. The three things that make a difference to us for prim count are Download, Physics, and Server. This Features tab, with the Physics Shape thing? That's where you need to set Physics shape to use new math. If all prims in a linkset are traditional prims, and use Prim physics, that linkset will use old math. If ANY prims in the linkset are set to either of the other two options (Convex Hull or None), the entire linkset will use new math- this is how you set non mesh prims to mesh math.

Download is how complicated the object is. It calculates by number of faces and size, complicated prims have more faces. Aside from replacing prims with less complicated ones, or shrinking prims, or removing complicated prims from the linkset entirely, we can't get this number any lower. Sculpts are a MINIMUM of 1.3 Download, even tiny, even with faces thrown away in the sculpt map (that, in fact, doesn't seem to have any impact to sculpt calculation ever- sculpts seem to have a flat calculation, regardless of the sculpt). And they go up from there. Linking 2 sculpts together will become 2.6- which will count as THREE prims. So only use sculpts with new math if you can balance the cost with other prims! Sculpts and toruses and spheres and tubes- anything other than boxes and prisms (and how often do you use a prism?)- can cost you, depending on size and complexity, they can cost too much. Boxes are cool. Boxes are 0.1, even at 64mx64mx64m, hollowed (even circle hollowed) and cut! (NOT twisted. Twisted ads a very substantial amount more to it, because it requires many more faces for the twist.) So, say you have a linkset with a bunch of boxes and a sculpt? You may find you can link that together and use new math and prim count goes down. But you may not.