Friday, February 6, 2015

Draw Weight

Draw Weight
A Tale of Two Avatars

 Remember Avatar Draw Weight? That feature LL added many years ago (I think it was around 2008-2009 or so) which put a number on how much work it was for your computer to render each avatar onscreen. With green numbers being in the "acceptable" range, and red numbers being, well, pretty much everyone if you ever turned it on.

 It seems as if no one can get their avatars "into the green". As recently as the last year or so I've read people complaining over on the SL forums that the colour range denoting avatar resource use was unrealistic, that we'd all have to wander around naked to get ourselves down into the green, or even the orange.

 I can understand the frustration. Here, LL provided a tool that was supposed to help people manage their avatar's resource use, but the goals it sets seem far out of reach without drastically reducing the quality of our avatars, and to most people it seemed unreasonable.

 They blamed the tool, but the truth is, the rendering levels displayed by Draw Weight are not unreasonable at all, it's just that content creators are making no effort to produce reasonably optimized content for avatars.

A picture is worth a thousand words.

Here is my avatar. On the left is my avatar how it appeared about two weeks ago. The right is my avatar at the time of this writing. The numbers are, of course, the draw weight of my avatar. And no, that is not a typo. Although my more current avatar appears to have even more detail, it is actually about 1/4th the draw weight it was a week earlier.

 How did I achieve this drastic reduction in rendering weight?

 Pretty easily, actually.
  •  Many attachments, including new mesh attachments, tend to have a prim hidden inside of them which serves no purpose other than to clog VRAM up with a huge texture nobody sees. I ripped out every single one of those "root prims".
  •   My mesh body has several clothing/tattoo layers. I don't use those, or any of the scripted functions of the body. So I ripped out every unused layer, plus the scripts.
  • I replaced every sculpted prim I could with a mesh attachment.
  • I removed every single attachment which was covered up by other attachments. My eyes, for example, have sphere prims over them with a texture adding a glistening effect. It looks great, but with my mask no one can see them. So off they went!
  • I discovered my mask had an ungodly amount of polygons, many of which aren't even visible because they're buried inside other pieces of the mask. So I replaced it with a low-poly alternative. The new mask looks every bit as detailed, just different.
  • Textures count towards your draw weight, too. I reduced every texture I could down to a quarter or less of its original size. Can you tell which textures I did that to? I doubt it. Unless you zoom in far closer than anyone ever would, you cannot see the difference between a 1024x1024 texture and a 512x512 texture on an avatar attachment. In many cases, you can even go down to 256 or 128 without a noticeable loss in quality.
Here's the SL Wiki page which explains everything SL factors into calculating Draw Weight.

 Now, I did this all over a couple of weeks, but I didn't actually spend all that much time on it. A few minutes here. A few minutes there. I don't get on SL nearly as much as I used to, which is why it was spread out over all that time.

Still not "In the Green".

 Now, if you've been paying attention, you might say "this is a big drop in draw weight, yes, but you're still not in the green!" And you'd be right!

 The problem is, no matter how much I optimize through modding, unless I create all my own content from scratch, I'm at the mercy of content creators.  I want my avatar to look a certain way and I'm only willing to make so many compromises for efficiency.

 Here's my avatar in wireframe.
 Notice how even in wireframe, large chunks of my avatar appear to be solid, or nearly solid? Yeah. That's obscenely wasteful. You could cut the polygon count of this avatar down to a quarter of what you see here and not be able to tell the difference when viewing it normally. Hell, adding simple material maps can make the attachments look even more detailed than they appear out of the box, even with the reduction in polygons.

 But without changing the style I want for my avatar, I',m at the mercy of content creators. Take the hair for example. It's got way more polygons and textures than it needs, but I have yet to find a hair style that matches the idea in my head as close as this does. I have a couple alternate hair styles which drop me down to around 38,000-39,000, but they're completely different than the look I'm going for.

 Ever notice how it's easy to find mesh furniture that is only 1-5 Land Impact points these days? Even when mesh first came out you were usually looking at 10-20LI This is because we are all beholden to Land Impact. If you want to get the most out of your land, you avoid high LI content and buy the content that looks the best while managing to keep a low LI cost. Content creators realize this, and to get you to spend your hard earned L$ in their shops, they try to make their content cost as few Land Impact points as possible.

 Avatars have no such limits. You can wear 38 attachments, each of which can be up to the equivalent of 256 LI. That means you can wear the equivalent of 9,728 LI on your avatar. That is far more than half a sim. TWO avatars can put more strain on your computer than a fully detailed sim can with your draw distance cranked to the maximum.

 If avatars had a similarly limited pool of points, you can bet your low-poly behind that every single content creator would be tripping over themselves to try and outdo everyone else in delivering high detail at a low rendering cost and it would be EASY for anyone to look as good, or better, than they do now, while keeping their avatar firmly "in the green" with regards to draw weight.

For an example of how much a single attachment can add to your draw weight, I swapped my hair. I went from 50,328 down to 40,625. Despite the fact that this new hair is arguably more detailed. That's before optimizing the hair's textures, too. I was even able to add that crown/tiara and still come in at only 41,160.

 I also replaced my shield, got rid of a couple of the smaller details people might not notice if removed and replaced a couple more sculpts with mesh alternatives, bringing my total draw weight from 207,884 down to 35,827.

 That's right! Keeping the same amount of detail and (aside from the hair) the same basic look, I was able to educe my draw weight to less than a quarter of what it was when I started.

 I'm still leaning towards the dreadlocks, but this illustrates that I can still lose a lot of draw weight if necessary while still being happy with my avatar's appearance. Reasonable limits are not a bad thing. Done well, limits can bolster creativity and imagination, rather than stifle it as some people fear.

 So what good does it do?

 What good is it, optimizing my avatar like this, when I'm just going to be surrounded by avatars so bloated and overtextured that my videocard is going to be overwhelmed anyways?

 That's a fair point. When I'm out and about in the world, it doesn't make a huge difference. Maybe a few FPS here and there. Afterall, my avatar is usually the largest object on my screen and always displayed at the highest LOD level unless I go camming around the sim, so there's at least a little gain. The biggest benefit is that my avatar always loads lightning fast now.

 The real difference is when I go to my own builds. Hanging out in one of my skyboxes or sims with a few friends, I have seen a framerate improvement of up to 10FPS between now and a week ago. That's not too shabby. For maybe an hour of work spread out over a week or two, I have gained the equivalent of what I might see spending $250 on a slightly better videocard.

 Food for thought.