Showing posts with label efficiency. Show all posts
Showing posts with label efficiency. 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!

Tuesday, September 13, 2016

Virtual Space/Infinite Space


Virtual Space/Infinite Space
How to never run out of prims or space on any sized parcel or sim.


Over the years I’ve tried to help shed light on tips and techniques to allow anyone to get the most value out of their SL land, from shrinking oversized builds and altering your viewer camera settings to make your parcel larger, to squeezing out the most from your prim allotments by optimizing prim and mesh builds. Still, there’s one aspect of virtual land that is long overdue for a discussion.


That is the nature of land in SL itself.

Most people see their virtual land in Second Life as finite. You have your prim limit and your land area and that’s it. If you want a bigger house, a bigger RP area, more content to play with then obviously you need more land, right? Everyone knows this, it’s the typical understanding of how SL works.

It's also wrong.

Land in Second Life is virtual. Bolded and underscored. Everything about it, from the terrain to the content you fill it up with, is nothing more than a collection of 1’s and 0’s. What’s more, Second Life gives users an infinite amount of storage space for those 1’s and 0’s. You have an infinite inventory and can store as much content as you like in rezzed, in-world containers. What’s more, you can script those containers into what we call “rezzers” or “Holodecks”, after the famous virtual reality room from Star Trek.

Chances are, you’ve used one of these already. Ever bought a house or other large SL object which came in a scripted package? One that would allow you to rez and position the item just by clicking on and moving the package around? Or a skybox that lets you choose from a selection of pre-made scenes it can rez for you? These work in the exact same way and you can use the same sort of scripts to make any size land into an infinite space for all the content you could ever want.

And this works for any sized land, from tiny 512sq.m. parcel homes to full sim RP builds. The size of the land you own only limits the amount of content which can be rezzed at any one time.

Let me illustrate using my own home as an example. I have a 64x64 square parcel of mainland.



This is considered a mid-sized piece of land. It supports about 1000 prims. Most of the neighboring 64x64 parcels have a single house with maybe a quarter of the space left over for a tiny yard.Most of these parcels devote all of their prims to said house and the furniture inside. Possibly a single skybox for the illusion of privacy.

 We can do better than that.

Paying for Land

Now, before I continue, let’s look at the cost involved here. If you decide to upgrade your tier to purchase a mainland parcel this size, it’s going to cost you $25 a month on top of your Premium Membership. That’s $372 a year, a little more than a sim owner pays for one month. However, as I pointed out in a previous article, there’s cheaper ways to buy land. You can check out that article by clicking this link, but here’s a quick recap:

  • If you have multiple accounts, upgrade them to Premium with an annual membership. This will cost you $72 per account up front, but if you save the stipend and cash it out to put towards your annual payment, each account will only cost you $14/year afterwards.
  • If you have accounts made before LL lowered the stipend in 2006, then the tier will more than cover the annual payments.
  • Lump their 512sq.m. tier into a landowner group, giving you a 10% boost, and use that to purchase the land.

To buy a 4096sq.m. parce like mine you’d have to upgrade 7 accounts to Premium. That’s a lot of money up front but also look at it this way:

  • If you pay tier annually that’s costing you $372 up front and $372 every year after if you upgrade your tier and buy the land directly.
  • If you upgrade 7 accounts that’s $504 the first year then only $98 a year every year after.

On top of that, you don’t NEED to upgrade all those accounts at once. If you can afford the monthly tier costs, but not the up-front expense, upgrade the accounts with a monthly payment, then upgrade each to a yearly as you can afford to.

I’m Not Very Neighborly

I didn’t buy land in SL to experience mainland neighbors, so I ignore the ground level entirely and built my house as a skybox, complete with self-contained yard. Seen here:



Of course, no one wanders around SL with their camera pulled out that far and when you live on a 64x64 parcel there’s no reason to have your draw distance any higher than 88m while home. To anyone visiting my house, the yard looks like this:




As you can see, 64x64m is actually pretty spacious if you build efficiently. What’s more, the yard only uses about 300 prims and acts as a hub area for the rest of the build. Remember, we’re taking advantage of the infinite space virtual land affords. This yard, and the 200 prim barn interior, are the closest my home has to “permanent” structures.

Pick a Door


Spread around the yard are doors. Most of these doors, when clicked, will play a sound effect and give you a dialog message saying “This door appears to be locked but maybe there's a way to unlock it?” And there is!


Underneath the bridge people arrive at there is a terminal labled “Door Lock Terminal”.



Click the terminal and you get a menu asking “Unlock which door?” and a selection of doors to open. Choosing one will “lock” the currently “unlocked” area and “unlock” the newly selected area. If someone is in the currently “unlocked” area, you will instead get a message saying “The lock controls are overridden from the other side.” and nothing will change.

My liberal use of quotation marks is because this terminal is really the rezzer controls for the parcel. When you “unlock” a room, you’re derezzing the currently selected room and rezzing another. In addition, the rezzer replaces the locked door with a door that acts as a teleporter. The teleporters use the (as of this writing) recently added Experience Features so you just click the door and walk into it to teleport to the room interior.



Since I have nearly 500 prims free, and all of the rezzable areas are connected via teleporters, each rezzed area can be anywhere from a small room using only about 200 prims:



Or a 64x64m outdoor area bigger than the yard:


And I can add as many of these additional areas as I want! There’s no limit. Already my 64x64m parcel has more content, more places to go, than any homestead on the grid. Eventually, as long as I keep adding new areas, it will be larger than many RP sims.

Affordable RP Sims

That’s right, if you ever wanted your own RP sim but can’t afford, or justify the cost of, a sim, this is a great alternative. Sure, people can’t spread out to the four corners of the world, but unless you’re building a sim like Doomed Ship, where most of the experience is in exploring a twisting maze of corridors and secret passages, there’s RP benefits to keeping people restricted to a few locations at a time.

Not to mention, RP sims are rarely self sustaining. That’s why they’re always shutting down. Rather than spending hundreds of dollars a month on a brand new RP sim, the best bet has always been to start with a small, affordable RP area and expand only as your growing player base allows for it.

On top of that, as long as you expand in a modular fashion, an RP area that finds itself facing a dropoff in support can easily scale back during tighter times  without a whole lot of work, or permanently sacrificing content. That kind of flexibility means a greater ability to whether the ups and downs every RP area in SL faces.

Keep it Simple!

You don’t even have to get as fancy as I have. Have a 512sq.m. parcel for your house and want to take advantage of this to have infinite rooms? Keep the home furnishings to a minimum and put a door inside to act as your teleporter. Make the rezzer a lightswitch next to the door and use it to select the room the door will take you to.

Or, even simpler, a holodeck skybox where you just change the scene around you, without the need for a HUD. Setting up and packing your own scenes is super simple, and you can get free holodeck scripts off the marketplace to set up your own right now!

Thinking Big

The larger your land, the more you can do with a system like this. Have a full sim and you want to make the most of it for an RP area? Then taking advantage of the virtual nature of SL land will let you turn a single sim into an entire world of environments. Where my previous examples each used a single rezzer, a full sim build could use multiple rezzers spread across the sim.

You could have entire sim-sized environments accessible via rezzers, as well as multiple, smaller rezzers for individual areas. And since each of these rezzers can have an infinite number of rezzable environments, your RP sim can keep growing as long as you keep coming up with ideas.

Using Doomed Ship as an example again, using a rezzer the sim could be set up so that all of the core decks act as the permanent hub area, with rezzers built into various controls and locking mechanisms on each deck to open up further areas for exploration, separate from the main, twisty maze of rooms and corridors that make the sim so much fun to explore.


No-Mod/No-Copy Costs You More Than You Know

There is a catch. Rezzers only work with copy/mod content. So any no-mod/no-copy content you own will either have to be retired or limited to the hub areas. The best policy, of course, is to avoid no-copy/no-mod content altogether and encourage your favourite content creators to abandon bad, anti-consumer business practices which prevent you from getting the full value out of your virtual land.

Not all content creators sell no-mod/no-copy content to intentionally screw you over like this, most are simply unaware. Luckily, there are solutions for content creators who've been selling no-mod/no-copy content which could allow customers to update their content with more sensible perms, such as using this handy Item Exchanger/Updater from DesolateStudios.


Conclusion

SL has it’s share of problems, but the cost of land has always been overstated. Every landowner in SL has, at one time or another, wished for more space or more prims and I hope this article shows how you can achieve that easily, without breaking the bank.

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.



Tuesday, March 6, 2012

Mea Culpa! - Forest Path Lamp

 Last year I wrote a post about being efficient with prims. I used Dodie Snowbear's gorgeous forest path lamp as an example of a beautiful decorative piece that looked great, but was too many prims.

 I was mistaken. I had never seen the lamp myself, the Marketplace listing did not say how many prims the lamp was, the number of prims I stated it being was from incorrect information provided to me by another source. I am very embarrassed to say this information was incorrect and it is entirely my fault that I failed to check it myself.



 Today I received a very gracious e-mail from someone who works with Dodie, pointing out that the lamp was only three prims, not the eight I mistakenly stated it was. Only one more prim than the lamp I made by looking at the screenshots, and that extra prim was used to make the lantern piece look far nicer than it does in my version.

 At only L$100 there was absolutely no excuse for me not to buy a copy, considering I copied the look for my personal use and then decided to hold it up as an example in my article about efficiency. That was absolutely unfair of me and I apologize to Dodie Snowbear and any readers who decided not to purchase this wonderful lamp due to my incorrect information.

 Again, it is a gorgeous lamp in only 3 prims, very much well worth the purchase!