Showing posts with label mesh. Show all posts
Showing posts with label mesh. Show all posts

Friday, January 19, 2018

Better SL Living Through Modding - CRAnQ Scrapper's Retreat

I do a LOT of modding. It's safe to say I have modded every modifiable item I've ever purchased in SL, and so I'm going to be posting a series of articles where I showcase some of the items I've modded, how I did it, and what the benefits were!



This first article features a wasteland shack in a sim I was commissioned to build. It's the Scrapper's Retreat from CRAnQ. A gorgeous looking piece, but out of the box it has a few problems. Namely, it's 241 LI cost and the fact that it uses about 360MB of VRAM in textures alone.

 Up front I want to say that none of this should be taken as a negative view of the creator's work. It's a gorgeous looking building and, sadly, these issues are not widely discussed in SL's content creator community so a lot of people simply don't realize they're issues at all. What you should instead take away from this the awesome thing CRAnQ did, selling the building with modify perms! That is what allowed me to take this great wasteland piece they put together and make it even better, and I thank them for giving me that option.

 In addition, I hope that if they see this article they are able to see what I've done, see how it improves the SL experience, and are able to work these improvements into their future creations!

Reducing Land Impact

 Now, Land Impact cost is easy to understand for anyone who owns or rents land in SL. You only have so much so you want to reduce LI wherever you can so you can fit more content and more detail in your sim. Luckily, this shack is copy/mod so I was able to do exactly that, and easily!

 First, the shack comes with an array of light sources. They're scripted and add a really great effect but a nearly identical lighting effect can be achieved by replacing the 40 light projectors with 4, and giving the side projectors a light map that mimics multiple sources. (Maybe I'll show how to di this in the future!) I went the simpler route for now and just got rid of the light projectors and did some simple local lighting, but recreating the original light effect is on my to-do list.

 Second, the lightbulbs strung along the side were each individual objects. Even worse, they're sculpted prims! If you're not aware, each sculpted prim costs 2 land impact points when linked to mesh! I replaced those with a string light mesh I bought off the marketplace. Took seconds to swap them out. Saved a bunch of LI. In addition, the wall mounted lamps on each side of the roof used a prim sphere overtop a mesh lightbulb, possibly because they didn't know how to script fullbright/glow changes to only the lightbulb part of the lamp mesh. I got rid of the prims and just set the mesh bulbs to glow manually.

 All of this means I lose the scripted lights on/off feature but I don't really need it.

 Next, I realized that by setting the entire building to "no physics" and replacing the physics with an invisible shell of box prims set to "convex hull" I was able to save yet more land impact.  This doesn't always work, but it works often enough to give it a try and here it ended up saving me a tonne of Land Impact points.


 And finally, the building was way too large so I shrunk it down to proper scale for the sim, reducing the land impact even further. Larger mesh objects cost more LI because they retain their higher LOD levels over greater distances the larger they are. Most content is made around twice the size it should be if everything is to scale with inworld measurements. Shrinking your avatar to human sizes and adjusting your camera so it doesn't need so much more space for you to see properly really helps you save a lot of space and money. If you ever thought land in SL was too expensive, this is the easiest way to cut the cost of land drastically.

 Doing these simple things I reduced to LI cost of the structure from 241 to 123. About half. Still a lot for a single structure, but given the sheer amount of detail I'm a lot more comfortable with it.

Reducing VRAM/Texture Use

 VRAM/Texture Memory is less common knowledge in SL but I'll try and summarize. Your graphics card has a set amount of memory to use rendering what you see in SL. All the textures you see have to be in that memory to be displayed, but so much more relies on that memory so you cannot max your card's memory out on textures alone or you see massive framerate losses and "texture thrashing". Texture thrashing is when you see textures going blurry and re-rezzing. You also have to download all these textures, which contributes to lag and slow rez times.

 360MB might not sound like a lot of memory, but it's only one building in an entire sim and then you throw avatars and their memory use into the mix. My videocard only has 2GB of VRAM. It's a midrange card, a few years old. Newer, more expensive cards have up to around 8GB. Onboard graphics have very little, if any, dedicated memory.

 Following so far? Ok, good!

This scrap house is covered in various unique corrugated metal panels. They're not identical. Out of the box there's like 6-12 different panels each with it's own texture, spec map and normal map. All of which are 1024x1024.  Each texture uses 4MB of memory on its own and it's simple arithmetic to see how that adds up.

 What I did was remove every type of panel except 2. Then I copied the remaining 2 panels to replace each of the panels I removed. Not difficult, but a little tedious and time consuming. But worth it! I was able to reduce the memory load of the house from 360MB down to 207MB. Here's a screenshot from the marketplace listing showing the original texture variety so you can compare. Yes, it's a little more detailed, but that detail comes at a cost in framerates, lag, and texture thrashing. What's more, are people going to notice the difference? Those who saw this building in my sim before and after did not notice the change until I pointed it out to them myself.



 You might be able to do the same if you notice items in your sim are similar, yet use different textures! Many SL buildings, for example, will have nearly identical textures for walls, floors, etcetera, where the only differences are slight variations in shading or colour that most people will never even notice! You can compare textures in the preview window of the texture chooser tab of the SL editing panel and see if this is the case, then it's a simple matter of unlinking pieces, and copying the one instance to replace the pieces with the redundant textures! In some buildings this is easy, in some buildings all of the walls may be a single mesh object which means you'll have to look for an alternative solution, such as replacing the textures entirely with one of your own.

 I also noticed that this house used the same stair kit as another building I have in the sim, but different textures. I swapped out the stairs with the identical stairs from the other house to reduce the sim's VRAM load further! And other buildings in the sim also use corrugated metal panels, I replaced them all with one of the two metal panels from this house and probably cut another 100-200MB of memory out of the sim. All of this means visitors to the sim get to experience higher framerates, less lag, little if any texture thrashing and fast rez times!

 And I hope the rest of you are able to implement these ideas into your own homes, clubs, RP sims, and other environments and improve your own SL experience! I'll be posting more articles like this, showcasing modifiable content that I've purchased and found ways to improve. Until then, take care and keep fighting the good fight!

Friday, February 6, 2015

Draw Weight

Draw Weight
OR
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.

Sunday, June 2, 2013

Building a Better Second Life

Building a Better Second Life
Tips for squeezing both better performance and more detail
out of SL through efficiently made content.

 We all have our complaints about SL. The lag. The lack of visual fidelity. Poor framerates. The unreliable scripts. The lag. The expensive land. The lag!

 I'm sorry to say there is no "silver bullet" to solve these problems. There is no single problem LL can fix that will magic the lag away. That's reality, and it applies to the virtual world no matter how hard you click the heels of your no-mod ruby red slippers, with 600 resize/texture change/colour change scripts in each, together.

 However, there are little things you can do to alleviate these issues somewhat. They add up, so the more people who follow these tips, the better SL looks and runs for everyone.

Use fewer (and smaller) texture maps!

 This is a big one that few seem to consider.

 Textures eat up bandwidth to download, processing power for the sim to retrieve them from the asset server and deliver them to your viewer, and then your videocard needs to store them in memory and render them. Too many large textures are one of the biggest reasons SL gets such poor framerates and why everything takes so long to rez.

Here's some numbers for you, to help illustrate why slapping 1024x1024 textures on everything is bad;

64x64 : 16kb
128x128: 65kb
256x256: 262kb
512x512: 1MB!
1204x1024: 4MB!

 Most people only have 512MB of VRAM and Second Life refuses to use more than that for textures regardless.

 There is a really bad trend with mesh content. People using 1024x1024 textures on every surface, large and small. Often only utilizing small sections of these textures, the rest being unused data that you never see when looking at the object in-world. This is usually the result of applying the same texture to every surface in the 3D modelling program, using offsets for smaller surfaces, then baking shadows and exporting the full 1024x1024 textures even though the model only uses a small visible area.

 What you wind up with is something like this;
 A tiny bit of texture detail, huge area of unused black space. Additional texture detail is then added via multiple similar textures, usually at 1024x1024 resolution

 I've seen this on everything from houses to drinking cups. I bought a bar counter, basically a wooden box, which turned out to have eight unique 1024x1024 textures. In the same bar set was a tip jar, a small drinking cup with a sign reading "Tips" leaning against it. It used three 1024x1024 textures, a 1024x512 texture and a 512x512 texture. Everything in the set was like that. When I rezzed the set in an otherwise empty sim, my framerate dropped from 75fps to 5fps and remained that way until I removed all of the textures. With the geometry alone, my framerate shot straight back up to 75+.

 From another store I purchased a simple, one room house. Not counting the two windows and the single door, the house uses eighteen 1024x1024 textures. Realistically, this house could have been textured with no more than three 512x512 textures and looked more or less identical.

 Outside of the "Daikatana arrow" you never see texturing that inefficient in a videogame, and that is a part of why much prettier videgames run much more smoothly than SL. The performance impact of so many huge textures cannot be understated. This is why so many people experience poor performance in mesh-heavy environments. Mesh is great, low-poly builds allow for better performance than we could get from sculpts and prims, but overloading builds with too many huge textures extinguishes any performance gain.

 So how should texturing be done? More like this;

 Notice how the artist has combined as many elements as possible into a single texture, leaving very little unused black space. This reduces the amount of texture memory your creation eats up while also allowing you to maintain higher resolutions for your textures. The texture detail in the upper right corner is no less a resolution, but now we're using a single texture map instead of, potentially, upwards of six.

 Combine textures, use ALL the space in a texture map and wrap it around the visible surfaces of your mesh. There is no reason not to do this!

 And don't think this only applies to mesh! Those of you who work in prims and sculpts should also consider using fewer, smaller textures and wrapping textures around surfaces using texture offsets.

 A good rule of thumb, if a surface is smaller than 10x10m, use a 512x512 texture or smaller!   I'll get more into avatar textures when I get to draw weight but avatar attachments almost never need textures larger than 512x512 and rarely need textures even that large unless you're using a single texture on a mesh that covers your entire torso or lower body.

I've cut all the 1024x1024 textures and all but one or two of the
512x512 textures from my own avatar's attachments.
 Do you lose detail? Sure, but it's barely noticeable. The increased performance you gain, on the other hand, is substantial.

I've moved things around a bit and changes the trees to mesh since this screenshot.

 At my own fantasy build in Aleph (warning, it is an adult sim so you may encounter NSFW content there) I have used a variety of tricks to remove over sixty 1024x1024's worth of textures and saw my framerates jump from single digits to over 30fps in the worst areas. With shadows on. I'm seeing around 50-60fps in the best areas of the island, up from about 20 before I went gung-ho on texture use.

Use fewer, more efficient scripts!

 Full disclosure, I am not a scripter. I go cross-eyed when trying to cobble scripts together from code on the LSL wiki. If I'm wrong about anything, it will be in this section, but this is my understanding from years of managing sims and working extensively with very skilled scripters in SL. I've run these same recommendations past some of SL's top scripters and they agree with my assessment.

 Every script is a virtual machine which uses memory and processor time.

 Every sim in SL has a set amount of memory set aside for scripts. Now, relatively recently, LL did some things which give sims more memory for scripts, but it is still not an infinite amount!

 While there is memory available, scripts compete with each other for resources so a lot of scripts will, at first, only result in scripts themselves running slower. When the scripts running in that sim exceeds the amount of memory the sim has available, the server has to start using the swap file and that slows the sim down drastically.

 There are tricks to manage the amount of memory each script uses, but generally speaking the more scripts you use, the more memory you're using. This is why single script resizers are encouraged over putting a resize script in every prim of an object.

 Memory isn't the only thing. There's also processor time to consider. This is how much of the CPU resources scripts are using. Believe it or not, sims in SL do not have infinite processing power. So the more of a server's CPU time scripts are eating up, the less CPU there is for other scripts in the sim. This can make scripts run slowly, or not at all.

 So, if you can combine scripts, that's generally a good idea. If you have the option of using multiple scripts or one single script to do the exact same thing, use one single script even if it's more work to write.
You'd be amazed at how many features you can cram into a single avatar without exceeding 500k of script memory.

 Granted, we don't all script. I know my own avatar uses WAY more script memory and time than it should, but just being conscious of your script use, whether for your avatar or for things you build in the environment, can help you see ways to reduce your scripting footprint.

  A good idea is to check new purchases for scripts you don't need. I'm primarily talking items that may have scripted features for resizing, retexturing, etcetera, not scripted features you would use in regular, every day use of the item.

 Make a copy to wear around SL, and a copy to keep in your inventory in case you need the scripts later. Delete all of the unneeded scripts inside the attachment. Some TPVs make this easier. I believe Firestorm has a "delete all scripts in selection" feature which makes this as easy as a single click. Now use the script-free version as the copy you wear and you'll be sparing yourself, and everyone around you, potential lag.

Build small!

 "Oh, Penny! You're such a broken record! Why do you always go on about this?"

Because it works!

 The call for "realistic scale" isn't some irrational desire for everything to be "realistic", this is about design and it is about resource management.

 Constantly people complain about the cost of land! "Land is too expensive! LL should reduce tier!" Maybe so, but STOP BUILDING SO HUGE AND YOU CAN DO MORE WITH THE LAND YOU HAVE NOW!

 You cannot resize land. You want more? You gotta pay!

 If you know that much then it is crazy to blow things up to the sizes most people build at in SL. Larger objects eat up more space! That's not rocket science, that's 7th grade geometry. You can fit four times as many 10x10m squares as you can 20x20m in a given area.

 Most people build to around double scale (give or take), far exceeding the scale of most avatars contrary to the belief that everything is consistently scaled to the "average" avatar size). This is partially due to the default SL camera, partially due to people just eyeballing things and not even thinking about scale. This means your average SL sim holds only 1/4th a sim's worth of content. Or, to put it another way, if you build to scale you can fit about four times more content into a given space.

 "That's not true, Penny! What about prims? When you shrink stuff it uses the same amount of prims! You'll just wind up with an empty looking sim!"

 If you ONLY use prim content made after the release of mesh, then you kinda, almost, have a point. However, that describes almost nobody.

 Before mesh arrived along with the prim size increase to 64, prims were restricted to 10m to a side. Because of that, legacy content made before mesh is often bloated with redundant prims, far more than this content would have needed were it made to scale. Sometimes as much as four times as many prims.

 Now that we have mesh this isn't an issue, provided you're building your own content or have the skills to cull redundant prims from old prefabs. However, mesh itself increases in land impact cost the larger it is.
When working with mesh, whether it's furniture or full buildings, you can substantially reduce the LI cost simply by shrinking it down closer to 1=1 scale. This makes it easy for anyone, regardless of skill level, to reduce their LI footprint simply by reducing the size of their mesh objects.

 "Enough to make up for the 3/4 land area you free up in the process?"

  You tell me.

 Again, here is an SLURL to my M&C fantasy themed build in Second Life.

 I'll post some screenshots below, but I encourage you to go visit the island in person. It's an adult sim, so there's likely to be NSFW content and avatars around, but still, it's probably the best example of building a large, detailed environment while increasing framerates and reducing Land Impact via scale that you're likely to see in Second Life.

 Wander around. Don't just look with your camera. Building interiors are all done as skyboxes, there's tonnes of secret areas. A lot you can't see just by using your camera to snoop from afar. You are able to walk from the arrival point all the way up to the mountain at the far end of the sim.

 Try to do that. Walk all the way up there from the starting point, see the sim firsthand, then open the Land Information window and see how many prims are still available.


 That's right. That entire build is (at the time of this writing) using less than 1/3 of the sim's "prims". I could copy the whole thing twice over and still have LI free to add a bit more. I didn't have to mod anything, aside from resizing, to reduce it's LI, either. Thanks to mesh, you can reap all the LI savings of scaling down just by reducing the size of mesh content.

 I freed up so much LI this way that if I increased everything in the sim to it's original size, I'd not only fill up the sim's LI pool, but I'd exceed it and be forced to remove some of the content I currently have out.

 On top of that, at it's current scale, the island only uses about 2/3 of the sim's area. The entire 1/3 of the sim on the north side is empty. Meaning I could put more islands there on the same level as the rest of the floating island structure.

  The issue a lot of people worry about in building to a more reasonable scale is that many of SL's avatars are huge and may not be able to squeeze into such small environments. This worry is exaggerated somewhat, again people tend to build to a much larger scale than even SL's avatars tend to be. I've not had one single person complain to me that the island has been too small for them.

   You can design buildings so that larger avatars can squeeze through smaller doors by making doorframes phantom, making doors into teleporters, etcetera.

  The only real issue is the SL camera. The default camera placement is just plain bad. It was set up in 2002 or earlier, and LL has never updated it despite the strides the videogame industry has made in third person camera placement.

  Thankfully, it's a problem that is easily solved. Here are simple instructions for getting a much improved camera placement, with explanations which make it easy for you to tweak the camera to your personal liking.

  Also, third party viewers have begun adopting better camera placement, starting with the popular Nirans Viewer, known for it's visual improvements to the SL experience.

 If you're concerned about having traffic rates affected, the example I give here has very respectable traffic, then there are also Doomed Ship and 1920's Berlin. Both popular RP sims which have featured being built to scale for years.

 Now, if you're selling stuff there is an understandable concern about people being able to use your content right out of the box. If you're worried, I'd recommend including large and small copies of your items and letting the customer decide which to use. Give them information to let them make an informed decision. Such as the LI savings.

  The up side is, since the LI of mesh is reduced at smaller scales you can use that as a selling point.

 Selling smaller attachments is less of a problem. You should always, always, design attachments around the smallest possible size simply to make it usable by the largest potential market. It is easy, especially with resize scripts, to make an attachment larger, but it can be incredibly difficult to squeeze an attachment smaller when it was built around a larger size initially. Rigged mesh is a different issue, but rigged mesh is less affected by scale and more affected by body proportions due to its less than perfect implementation.

Draw Weight.

 Now, I just want to wrap this up with a few words on Draw Weight.

 Draw weight is by no means a perfect metric for how much of a burden your avatar is on anyone's hardware, but generally speaking if you can get your draw weight down you increase the framerates for yourself and those around you.

  The average SL user is often at the mercy of content creators as far as their ability to do so, and a lot of content creators do not provide much in the way of options.

 I'm going to pick on a couple of examples here but these are items I use myself, I think the creators did great work, I'm just trying to draw attention to efficiency issues very, very few people in SL ever even think to consider.

I am the prettiest princess!
 There's me, out on adventures. I love this hair, I purchased it at Wasabi Pills, great shop. I've bought a tonne of stuff there. I do have a couple issues with it, though.

  See the dark hair band? That originally had a 1024x1024 texture. That's pretty ridiculous. It's just a shaded cloth texture. I replaced it with a 64x64 texture that looks more or less the same unless you zoom in so close it fills your screen.

  Credit where due, the base hair texture is only 256x256, which is reasonable. Most people use 512x512 or 1024x1024 which is horrendously excessive. The alpha layer on this hair, however, is 512x512 and that's not really necessary at all.

 Then there's one more texture! Inside my head is a box with a 512x512 Wasabi Pills store logo on it.
Neither the prim nor the texture are necessary, both are entirely hidden yet place just as much extra rendering burden on the videocards of everyone who can see me as if it were a giant box on my head.
 People love those store logo root prims. I'm guilty of it, too. back when I was making avatar accessories before I got all efficiency conscious. They're unnecessary and just add to the pile of things SL is trying to make your hardware render.

  One prim and one 512x512 texture might seem small, but my hair doesn't exist in a vacuum. Every avatar you see has probably at least one attachment like that. If you're in a sim with thirty avatars, that's thirty 512x512 textures dumped into your video RAM and thirty extra cubes your videocard is processing.

  Chances are, those avatars have multiple attachments like that. A pair of sunglasses, each shoe! Maybe a hat, or even the root prim of their shirt or any prim/mesh body parts they're wearing. Suddenly, in a sim of thirty avatars you're already exceeding your texture memory just on textures you never even see! That's before getting into the textures they're wearing that you can see! Let alone the sim itself!
Content creators can help by ditching this bad habit!

  Alright, now look lower! Not that far! See the metal chain on the leather weapon harness I'm wearing? (Great looking work, by the way, I got it at Dark Prophet Designs.)

  The chain is a set of sculpts. Each link is a separate prim. Not great, considering you could do multiple links in a single sculpt, but what really shocked me was examining it to find that each link in the chain uses a separate, yet nearly identical 256x256 texture for each half of the chain (mirrored on the other half). That's a total of thirteen unique 256x256 textures, which look identical. Even worse, each of those thirteen prims also uses a separate sculpt map.

  Now, I took the time to remake that chain using just one of the prims, and replaced the texture with a 64x64 texture that looks identical unless you zoom in so close the chain fills the screen. Later, I replaced the chain entirely with a single sculpt.

  What's more, the rest of the harness is loaded with 1024x512 textures. Nothing in the harness needs a texture that large to look good, especially with the quality of the design.

 Now, being someone who can do graphics reasonably well, I can make my own replacement textures, I can rip apart prims and put them back together more efficiently. The average consumer cannot. Most of them don't even think about these things, nor should they ever need to!

  The people who make these things can, and I'm hoping that by making these issues more widely discussed, more content creators will make a point of working more efficiently.

  Make it a selling point! Advertise how little your work adds to avatar draw weight! (LL really should have made draw weight marketplace searchable information.) When it's pointed out to people as a feature like that, it is likely to influence their buying habits in a positive way and we all benefit with the performance boost that comes with more efficient content and avatars.

 Another tip for reducing draw weight is replacing sculpts with mesh. Sculpts are horribly inefficient with polygons and content creators are generally able to create far more detailed attachments using far fewer rendering resources just by using mesh. So, if you ever have the choice between similar attachments, one mesh and one sculpted, consider going with the mesh version.

I have, by far, the lowest Draw Weight in this screenshot.
 At the time of this writing, my draw weight is 68,445, down from about 210,000 in January. I've managed to do this without anyone being able to see much if any difference in my appearance. I've cut out every hidden prim, every invisible root prim, every unseen texture, every redundant texture, every too-large texture and by replacing sculpts with mesh where possible. I'm sure if I replaced my remaining sculpts with mesh then I could cut my draw weight in half.

 My goal is to eventually reduce my draw weight out of the red (I think it turns to orange around 35,000), at which point I'll see if I can squeeze down to green.

 With mesh, if content creators start taking efficiency seriously, we can reach a point where there is no reason for anyone's draw weight to be over 35,000 and we can do that without sacrificing the quality of our avatars.



Thursday, February 21, 2013

Mesh Content Creators, You're Doing It Wrong!

Mesh is filling SL, which is great! I've recently redone Milk & Cream using as much mesh as possible and already people are telling me how great their framerates are despite the detail and sheer amount of content around the island!

I get an average of 30FPS around the new island with these graphics settings.
Shadows, Ambient occlusion, depth of field, etcetera.

I got 5-16FPS around the old island, which was mostly sculpts.
However, in building this I noticed one common thread in mesh content being sold in SL. Mesh content creators are building at the same sizes as they did with sculpts and prims prior to the introduction of mesh import and using that size as the basis for their advertised Land Impact costs. (When they're not outright lying to their customers by stating the number of mesh objects rather than the prim/LI cost, but that's another rant.)

 "Well, of course they would! Avatars are still 8' tall on average, and the SL default camera is still stuck in the 90's! They have to work around that!"

 Sure, to a point. You have to remember, mesh content gains Land Impact cost the larger you make it. I've literally cut the LI cost of mesh buildings in half by shrinking them down to a realistic size as opposed to the size the creator sold them at.

I was able to cut the LI cost of most of the mesh content down anywhere from 1/3 to 1/2!
This means more content around the island, which is still occupying only 1/4th of a sim!

 Lower Land  Impact costs are a boon to content creators because customers are often looking for the most bang for their buck in terms of detail versus LI cost. Higher LI means people can't fit as much in their land, and land is expensive!

 Before people point out many SL users can't even resize a prim I'm going to agree and counter that it is simplicity itself for a content creator to include both an "efficiently sized" version, the LI cost of which is what they advertise, and a scaled up version for more typical SL users. This takes, literally, seconds to do and costs the creator nothing.

 I'd add that content creators should make it clear in their listings that all LI costs are of the efficiently scaled version, and that a larger version is included with a higher LI cost. Most mesh sellers already note how SL changes LI costs based on size so this is a minor addition to what they're doing already.

 Ideally, Linden Lab themselves should be pushing more efficiently made content by improving the starter avatars, default camera settings and Linden maintained environments such as the infohubs, but since LL seems intent on driving customers away it would benefit content creators to encourage the trend towards efficient scale because it allows them to do so much more, and allows for an SL that is more appealing to new users, who in turn become new customers of the content creators.

Don't you wish all of SL was this detailed? It could be!
 In providing both the efficiently scaled version and the large version of their mesh content (as well as an explanation of why they are doing this and instructions on how to improve the SL camera), content creators ensure that their customers have the choice to use what better suits their needs, and and customers get exposed to how they can get more for their tier just by scaling down.

"I want less land and fewer prims, for the same amount of money!"
 - Nobody, Ever

Most people are simply unaware of the issue. It's in every content creator's best interest to make them aware of how size does matter in affecting their SL experience.