SO! We have a small little experimental feature we want you to know about…
…But first, a primer on computer graphics and video games.
As most of you know, Second Life can suffer from lag problems. Lag means a lot of things to a lot of people, but in our team (viewer rendering), this mostly boils down to graphics pipeline stalls.
Ever wonder why your XBox 360 games run so silky smooth? Well, most of it is because of how professional video game and 3D art studios are run. Though the images you see in your games are rich, vibrant, and diverse, they are actually the result of very highly regimented artwork pipelines and restrictions. Skilled game artists are given polygon counts, texture sizes, and numbers of textures which they must restrict themselves to in order to give you that experience.
One of the costliest things for a GPU (the part of your machine that does the rendering) to do is state and batch switching. Put simply, this means the more times the GPU needs to render *different* things (read: non-shared textures, non-shared geometry, etc.), the slower the experience becomes.
So, what does this have to do with YOU?!
Well, Second Life is not regimented. It’s not a formalized art studio, and you’re the ones creating the content.
People are going to build their avatars the way they want. This is great. But, it can also mean potentially disastrous performance for those nearby.
So we chatted and thought, “hey, why not let the people explore this for themselves??” “Let social and group dynamics take effect – and let the Residents see what effect avatars nearby can have on their experience.” Maybe it will work, maybe it won’t. But aren’t you curious to see just how expensive those new boots *really* are? 🙂
So enough talk- how do you turn the thing on?
Well, in the latest Release Candidate, just go to Advanced->Rendering->Info Displays->Avatar Rendering Cost. [Edited to Note: If you don’t see an “Advanced” menu option, toggle it on or off on a PC: Ctrl+Alt+D or Ctrl+Alt+Shift+D, or on a Mac: Option+Shift+Open Apple+D. Nod to Minnetonka Loon for pointing out we should have included this info. — Katt]
Watch this video tutorial:
You’ll now see little numbers floating near everyone’s nametags. These will be either Green (Good), Yellow (Eh), or Red (Meh!)
What do these numbers mean? Well, your Avatar Rendering Cost is computed based on the relative cost of all those fantabulous features your avatar has hanging off of it. It’s done as follows…
– A base avatar begins with a score of 1
– 5 points added for each unique texture on the avatar (not counting the base skin). Rationale: Unique textures break batches, create CPU overhead for decoding, and consume GPU memory bandwidth. However, note that this is across the avatar- so two unique textures across 10 prims only count as two unique textures!
– All attachments are then looked at on a per-prim level. The prims are weighted as follows:
– 10 base points for having the prim.
– 1 point added if prim is invisible, shiny, or glowing (each counts). Rationale: Invisiprims/shiny/glow create a small amount of overhead by breaking batches or requiring an extra render pass.
– 1 point added for each planar-mapped face of the prim. Rationale: Planar mapping creates a small amount of CPU overhead that gets worse with flexible objects.
– 1 point added per meter, per axis, of the prim’s size. Rationale: Bigger prims are higher LOD and create more fill.
– 4 points added if prim has bump applied. Rationale: Bump mapping breaks batches and requires a register combiner, and creates a lot of CPU overhead when coupled with a flexible object.
– 4 points added for each transparent face of the prim. Rationale: Alpha creates a lot of overhead by needing to be sorted every frame AND by breaking batches.
– 4 points added for each animated textured face of the prim. Rationale: Animated textures break batches and require the use of a texture matrix.
– 8 points added if prim is flexi. Rationale: Flexible objects create a lot of CPU overhead and consume graphics bus bandwidth.
– 16 points added if prim is a particle emitter. Rationale: Particles create even MORE CPU overhead and consume graphics bus bandwidth.
Note that these weightings, and their resultant totals, are not a *perfect* measure of your cost- but more of a relative counter to weigh against other avatars. Point: it’s close, but it’s not scientifically perfect. For that, you’d have to delve deep into batch sizes and draw calls. These weightings and their description/rationales were written by Runitai Linden, one of our most senior graphics engineers and a man who knows rendering efficiency! 🙂
And another note- ironically, the Avatar Rendering Cost display itself is CPU intensive, since it’s essentially profiling all the avatars all the time. So a good practice would be to walk around and turn it on when you want a glimpse- otherwise if you turn it on at all times, know your performance is suffering!
We have high hopes for this, and other tools like it, to help you begin moderating your world. For example, with Avatar Rendering Cost, you could…
- Try to get all attendees at your events to be within a certain Cost limit
- Build your content in creative ways that give the most bang for the Avatar Cost-buck 🙂
- Save your most beautiful (but most complex) attachments for photo shoots, and use more performance-friendly outfits for day-to-day work
Consider this almost like a carbon footprint approach to the performance in SL. And no, in case you’re wondering- this isn’t an attempt to offload our big responsibility to make the viewer more efficient! 🙂 It’s a way to start educating Residents about how 3D art should be made- these are guidelines that hold true in every modern 3D realtime system today. We just figured you should have an easy way to see how costly certain pixels really can be!
Lastly, a few more important points:
- This information, including the weightings, will soon make it into a wiki and/or knowledgebase article
- Katt Linden, communications expert par-excellence, will soon be posting about follow up events around Avatar Rendering Cost- office hours, creation guides, etc.
- You may have noticed there are many hidden features like this in the menus. In the months ahead we’d like to cover more of them- to give you a complete and robust way to explore the technology underlying your world!