opensim OC's guide to reducing graphical weight in Opensim (avatar version)

Original Character

New member
Joined
May 16, 2019
Messages
8
I hope this essay will be helpful to others, and I will also appreciate having feedback.

I would like to know;
Does this guide make sense to a reader?
Have I provided any misinsformation?
Are there any disagreements?
The sub-topics are provided in no particular order, is there a preffered order?
Is the formatting ok?
Should I assume that people already know how to edit objects for this guide? - I am concerned that instructing people on object editing is something that is difficult to cover when I am trying to instruct people about lag and not editing.

To-do list: Add "reduce draw calls"


This is the avatar version of this guide; I am hoping to make a guide for static objects.
----

~~Starry's guide to reducing graphical lag : Avatar parts and clothes~~

Keep your avatar's render-cost down by being careful with the objects and textures that you wear. Graphical weight adds up, and seemingly small things can cause graphical lag -it makes a big difference when it's cumulative. I believe that my instructions will have very noticeable results if everybody follows them.

Graphical lag and long download times are not the same thing, but long downoad times are often caused by graphically complex objects, so the issues are treated as the same for the purpose of this essay.

When objects are rezzed, you can right click and select "edit" and then "more info" in order to see this display cost.
I'm not sure I can really explain an "ideal" render cost, rather, I would suggest the kind of graphical fidelity that you would expect of of a PS2 or Wii game.
How much is ideal depends on how high resolution you want your object to be, and how much graphical weight (potential for lag) and file size (potential for long download times) you're willing to subject on yourself and others.

Beware that other people may have lower spec computers or lower download speeds than you do.
This may take some practice; removing parts from avatars could cause them to malfunction, but is worthwhile when it works.

  • Get rid of unnecessary hidden prims
There are often hidden prims inside of things, these have a few uses, such as containing a script or making the object easier to position. Sometimes they only exist as a place to put the creator's logo.

Hidden objects like these are drawn by your graphics card and yet are not seen by anyone.
It's good idea to keep the original unaltered object just in case you break something, but wearing the object with this hidden prim or keeping it in your region is usually unnecessary.

Scripts can sometimes be removed from the hidden object, placed inside the visible one and used that way.
Scripts are sometimes unnecessary once they have been applied and can be removed before wearing your object or before leaving the object in your sim.

If the hidden prim was used to facilitate easier placement or rotation of an object, it may be worthwhile to remove the hidden prim and then position it anyway. (this won't be realistic for some things.)

Take Note! If you remove the root object from an object, this will change it's name to whatever it's new root object is. This will also unassociate your object with whatever inventory folder it came from.

To remedy this, I name the modified object the name of the folder.
Once I have "taken" my object, this lets me isolate the both of them by name when making an inventory search - this makes it easy to drop the modified object back into the folder.

  • Mesh objects- when made correctly, are less graphically heavy than their sculpted equivalent.
Sculpted objects are unoptimised- they usually have more polygons than is neccisary to create their shape
  • Use smaller textures
Creators often use textures that are too large for the object; try replacing large textures with smaller ones (make a copy of your object first.)
1014px is (in my opinion) too large for mesh shoes or gloves or hats or anything smaller.

  • Consider repeating or tiling textures.
Some items can be made to have repeating patterns that are represented by using the same texture over and over again, allowing you to cover large objects with smaller textures.
This is one method that may require you to make your object from scratch.

  • You don't always have to wear your entire mesh body
If you're wearing full-length mesh trousers, is it really worth wearing your mesh legs underneath?
If nobody's going to see your legs, it's worth considering taking them off!
Make a copy of your mesh body and rez it in a sandbox, and then unlink the parts that will be covered by your clothes.
"Take" the rest of the mesh body and apply it to your avatar with your clothes.
It's a good idea to make your original mesh body into one "outfit" in your outfit gallery, and make the new body with missing parts (and clothes covering it up) into a different outfit.
Nobody will ever know you have no legs, and you'll decrease your render cost considerably!
Take note: it's simply a good idea to not wear objects that you are not currently using, such as genitals when you are clothed, or HUDs that you don't need.

  • If your avatar has mesh tattoo layers or clothing layers, remove them.
Some avatars have a second or third "skin" which was used to apply tattoos or clothes over the top of the bare body; with the implementation of Bake-on-mesh, I believe this to be an outdated feature.
Clothing can now be applied to mesh bodies in similar fashion to how they're applied to system avatars and don't need extra clothing layers.

  • Skintight clothing? Paint it on.
A good pair of knickers or tights (pantyhose) is skintight, and I personally think that using models for them is overkill- adding too many polygons and texture information to a scene for the amount of detail that is needed.
Seek out your underwear and tights in the form of system clothing or BOM clothing, rather than models. It's probably a good idea to include swimsuits and leggings in this category.

  • Minimise graphical weight caused by alphas
Materials that use the alpha channel are considerably more laggy than materials without them, and the issues is even worse when you use blended alphas instead of clipped alphas.
You can reduce the cost of your avatar and other items considerably by changing the alpha mode of it's materials from blended alphas to clipped alphas.
Some textures are opaque and were uploaded with an alpha channel by accident- these should be displayed on the "none" alpha mode.
This will also prevent the object from being subjected to alpha sorting problems.

You will find this setting by right-clicking the object in question and selecting "edit", and then selecting the "texture" page - the alpha setting is next to the box with the texture shown in it.
You may want to navigate to the checkboxes and enable "select face" or "edit linked" to select specific parts of the item for editing.
Some textures will be unnattractive on a clipped alpha mode.
If you take an interest in designing textures yourself, then it may be a good idea to design textures to use with clipped alphas rather than blended ones.

  • Optimise your models.
If you are a 3D modeller, I request that you be careful to optimise your models and their texture usage properly.
It's discouraged that you make models and textures at the level of resolution expected of a modern Triple A game.
Opensim requires users to download model and texture files on the fly, which means you can slow people down if you'r avatar is too complex

In my opinion, the kind of graphical fidelity expected in a Wii game is the maximum limit of what is realistic for people in Opensim to download and display.
It is also my belief that most people here have older or lower spec machines- I simply do not think Opensim attracts the triple-A gamer type.

Well-made Level-Of-Detail models are important for your object to display properly at a distance without adding unneccisary weight to a scene.
I may link a tutorial that I find appropriate in the future. I have to find one first.

For people who don't make their own models, be careful when selecting models to wear- many mesh avatars and clothes are higher poly than they should be.

It is true that we have to compromise with the content that already exists on Opensim. I believe that my own mesh avatar- which I am unwilling to part with, is higher poly than it should be, I compromise by wearing no mesh clothing.
 

Original Character

New member
Joined
May 16, 2019
Messages
8
I have a question of my own about draw calls; does anyone know under what circumstances draw calls are subjected to "drawcall batching"?

Specifically: Can two faces or two objects with the same material get one combined draw call?
 

Jupiter Rowland

The one with the Roth2 v2
Joined
May 31, 2023
Messages
34
Location
Grid time + 9 hours
SL Rez
2020
First of all, in addition to what was already written, I suggest to switch on the complexity display in your viewer, not only for everyone else's avatars, but especially for yours.

Mainly, however, I'd like to take a look at this and comment it from the point of view of someone who has been using Roth2 v2 and Ruth2 v4 as daily drivers for years now.

Scripts can sometimes be removed from the hidden object, placed inside the visible one and used that way.
Sometimes. I wouldn't try this with something scripted as sophistically as a BoM mesh body, though.

Scripts are sometimes unnecessary once they have been applied and can be removed before wearing your object or before leaving the object in your sim.
Two notable cases when it comes to avatars:

One, resizer scripts. You don't need to resize your unrigged clothes or accessories while at a party, now, do you? So resize them so that they fit you, make a copy, then remove the script.

Two, texture changer scripts that make multiple variants out of the same piece of clothing. Delete them, extract the textures, make as many copies of that piece of clothing as you've got texture variations, and them texture them statically. This also comes with the advantage of being stable across the Hypergrid and easier to apply to outfits.

As for Ruth2 v4 and Roth2 v2, if you're going to go someplace that you know for certain has stable and reliable BoM support, that won't reset your alpha mode to none, etc., if you don't need to change Bento hand positions, and if you don't need the nipple-less Ruth2 v4 Business body, you can try to wear the 0.8.2.1 variants that are almost entirely de-scripted.

  • Mesh objects- when made correctly, are less graphically heavy than their sculpted equivalent.
Sculpted objects are unoptimised- they usually have more polygons than is neccisary to create their shape
Downside for Roth2 v2 users: You often only have the choice between fugly standard prim shoes from the 2000s, heavy-weight sculpty shoes and mesh shoes stolen from Second Life.

  • You don't always have to wear your entire mesh body
If you're wearing full-length mesh trousers, is it really worth wearing your mesh legs underneath?
If nobody's going to see your legs, it's worth considering taking them off!
Make a copy of your mesh body and rez it in a sandbox, and then unlink the parts that will be covered by your clothes.
"Take" the rest of the mesh body and apply it to your avatar with your clothes.
It's a good idea to make your original mesh body into one "outfit" in your outfit gallery, and make the new body with missing parts (and clothes covering it up) into a different outfit.
Nobody will ever know you have no legs, and you'll decrease your render cost considerably!
Take note: it's simply a good idea to not wear objects that you are not currently using, such as genitals when you are clothed, or HUDs that you don't need.
You can't pull this off with Ruth2 v4 or Roth2 v2. Both bodies are linksets of only two objects, and these even already include the heads.

However, the effect of the number of submeshes is not to be underestimated. Both bodies have done away with fine-grained alpha HUDs, much to the chagrin of people switching over from stolen SL bodies or upgrading from Ruth 2.0 or Roth 2.0. They mostly rely on alpha masks now, and they're the only mesh bodies in OpenSim that do so.

Ruth2 v4 has an alpha HUD for 12 separate body areas, including both the feet which have always been separate since the days of the Ruth 2.0 test release as well as the head. Athena 6 which also has BoM support has 208 separate body areas, excluding the head which is always separate and the feet which have their own controls. 208 submeshes where Ruth2 v4 has only got 9.

If you enter a crowded party with 30+ or 40+ avatars, you're very likely to see lots of Athena-based avatars that are completely warped. Hundreds of little body chunks, clothes, accessories, everything that's rigged mesh (and on Athena-based avatars, usually, everything is "rigged for Athena") is distorted and practically unrigged and waits for your viewer to rig it into place. At the same party, you might spot Juno and me wearing Ruth2 v4 and Roth2 v2 respectively, and we're likely to look exactly like we're supposed to look, everything rigged as it should.

In other words: Ruth2 v4 is much more lightweight out-of-the-box than Athena 6 is even after unlinking and deleting everything that's covered by clothing.

Speaking of feet: On almost the entire Ruth2 family, these are separate rigged mesh objects, as are the toenails. You attach whichever feed you need. And on Ruth2 v4, only the flat feet are scripted for variable foot positions which, by the way, are not the same as the foot position HUD on stolen SL bodies. So you only ever wear two feet and ten toenails. If your toes are invisible, you can leave the toenails away entirely, and I recommend to do so even under nylon. If you're wearing boots, you often don't even have to wear feet at all.

Athena, in contrast, always has six feet and 30 toenails. The HUD only controls their transparency, i.e. it sets the transparency for whichever foot position you pick to 0% and for everything else to 100%.

A "disadvantage" of Ruth2 v4 may be that fingernails and toenails are BoM-enabled and scripted so that BoM can be controlled from the HUD. In general, Ruth2 v4 and Roth2 v2 have more advanced, more versatile BoM scripting. But it can work in your favour; see below.
 

Jupiter Rowland

The one with the Roth2 v2
Joined
May 31, 2023
Messages
34
Location
Grid time + 9 hours
SL Rez
2020
  • If your avatar has mesh tattoo layers or clothing layers, remove them.
Some avatars have a second or third "skin" which was used to apply tattoos or clothes over the top of the bare body; with the implementation of Bake-on-mesh, I believe this to be an outdated feature.
Clothing can now be applied to mesh bodies in similar fashion to how they're applied to system avatars and don't need extra clothing layers.
This applies to pre-BoM mesh bodies. More recent ones have invisible onion layers for make-up or tattoos. The old ones (Athena <4 etc.) have almost full layer clothing support so that you're technically wearing about half a dozen mesh bodies instead of only one.

So if you still have an Athena 3.x or older, and you absolutely refuse to upgrade to BoM, at least get yourself an Athena 5. Generally, however, BoM is better because it does away with onion layers.

  • Skintight clothing? Paint it on.
A good pair of knickers or tights (pantyhose) is skintight, and I personally think that using models for them is overkill- adding too many polygons and texture information to a scene for the amount of detail that is needed.
Seek out your underwear and tights in the form of system clothing or BOM clothing, rather than models. It's probably a good idea to include swimsuits and leggings in this category.
You don't have any other choice on Ruth2 v4 and Roth2 v2 anyway. There literally isn't any mesh underwear, mesh lingerie, mesh hosiery, mesh swimwear etc. that fits them. Even Taarna Welles' mesh leggings and jeggings made for Ruth 2.0 will require custom alpha masks to wear them on Ruth2 v4.

That said, wearing skin-tight clothes as layer clothes comes with an additional advantage: You can wear them underneath mesh clothes, and they won't clip (unless your body does) because they don't require any space between the body and the outer clothing.

This is the main reason why most female avatars always wear skirts and dresses of any length with naked legs: They can't wear tights because all they know are mesh tights, if any. And these mesh tights will clip through almost all skirts and dresses because these skirts and dresses are built against the mesh body's skin, maybe leaving a little room for a pair of knickers or a thong, maybe not even that.

Layer tights can be worn under anything. And actually also over anything. If you're wearing mesh tights, you can either wear black mesh tights with black knickers and hope that nobody will see how they clip through each other or leave the underwear away and expose your nether regions through the sheer tights. Layer tights can be worn under mesh underwear. Or under layer underwear (if they're defined as underpants or tattoos). Or over layer underwear (if they're defined as underpants or pants). And under layer leggings as well as mesh leggings. And in all kinds of shoes and boots. And so forth.

Juno has worn layer underwear under layer tights under layer capri leggings under a mesh skirt. No clipping. Do that with 100% mesh.

Oh, another advantage of layer hosiery: It's independent from foot positions. Most mesh tights and stockings and even some mesh socks force you to put wour feet into high position because no variants for medium or flat feet were made or stolen. Layer tights and stockings and socks are painted on whatever feet you have on. You can wear nylons in flat sneakers or ballet flats.

However, there are two major reasons why nobody wears layer clothes even on BoM bodies, other than many not even knowing that this is possible because hardly anyone in OpenSim has ever really learned what BoM is.

One, it's regarded as out-dated and rendered obsolete by mesh clothes, and they refuse to wear "that old crap". But people in OpenSim also believe that the alpha HUD has rendered alpha masks obsolete just because it's newer. Both isn't really true. Mesh underwear, mesh lingerie, especially mesh hosiery was created because mesh bodies lost the ability to wear layer clothes, and they still needed to wear a pair of knickers or a bikini or something like this. And the alpha HUD was an ugly hack that remedied pre-BoM mesh bodies' inability to be made partly invisible with alpha masks.

Two, skin-tight layer clothes are hard to find. Most of them were made in and for OpenSim in times before there was mesh. The big and popular freebie sims, however, try to only offer the new hot mesh shit from Second Life because that's what people want. Skin-tight layer clothes not made by Linda Kellie are even harder to find, any not exactly few OpenSim users have been indoctrinated by the copybotting mafia into boycotting everything that was or might have been made by Linda Kellie. In fact, much of the good stuff can only be found on one sim, maybe two, not only because freebie store owners refuse to offer such content, but also because they're no-transfer. This is why, for example, the best set of sheer nylon tights I've come across so far is only available on one sim that isn't even listed on OpenSimWorld and thus entirely unknown to almost the entire OpenSim community.

  • Minimise graphical weight caused by alphas
Materials that use the alpha channel are considerably more laggy than materials without them, and the issues is even worse when you use blended alphas instead of clipped alphas.
You can reduce the cost of your avatar and other items considerably by changing the alpha mode of it's materials from blended alphas to clipped alphas.
Some textures are opaque and were uploaded with an alpha channel by accident- these should be displayed on the "none" alpha mode.
This will also prevent the object from being subjected to alpha sorting problems.

You will find this setting by right-clicking the object in question and selecting "edit", and then selecting the "texture" page - the alpha setting is next to the box with the texture shown in it.
You may want to navigate to the checkboxes and enable "select face" or "edit linked" to select specific parts of the item for editing.
Some textures will be unnattractive on a clipped alpha mode.
If you take an interest in designing textures yourself, then it may be a good idea to design textures to use with clipped alphas rather than blended ones.
As I've said, Ruth2 v4 and Roth2 v2 rely on alpha masks, and both really need them.

But they come with a feature that's unique to these two bodies: You can adjust the alpha mode on the HUD. You can switch it between alpha blending and alpha masking. Of course, you can only do so when BoM is on (Ruth2 v4 and Roth2 v2 are also the only mesh bodies which really let you switch BoM off entirely, separately for the body, the eyes, the fingernails and the toenails), but you can. And these two buttons also switch the alpha mode back on after some sim you've teleported to has decided to switch the alpha mode on all your attachments to none upon your arrival, thereby disabling the alpha masks you're wearing.

  • Optimise your models.
For people who don't make their own models, be careful when selecting models to wear- many mesh avatars and clothes are higher poly than they should be.
That's why I suggest to switch on the ARC display. I've found out that some mesh clothes are ridiculously complex. The male Antony Pants, for example, clock in at 180,000. And the Clutterfly ruffled bottom dress adds just a little over 500,000 to your avatar; you may want to wear it only for exploration. I've actually seen avatars well beyond a million or even two million who neither knew nor cared.
 

Original Character

New member
Joined
May 16, 2019
Messages
8
Note that I have some qualms about using ARC. uruth be told this probably also applies to the generic "object complexity" meter that is in the build menu.
I preffer to check the amount of polygons and the amount/size of textures that an object has myself.- I should probably include this.