So I promised you some talking about how I designed and built a full combat/rp sim and managed to keep the lag to levels very low. It's helpful to have some background information and Gwyn has of course spoken my thoughts in a more elegant way then I ever could. First go read her post here.
Now Gwyn is talking about the absence of limits, but the important thing to remember is that we do have limits and that the basis of low lag design currently will always produce lower lag design in the future. The math is stated in Gwyn's paragraphs here...
Let’s take a simple example. A cube has one polygon per face; 15.000 cubes would be 90.000 polygons to be rendered, assuming that all cubes are not tortured prims. The higher the prim torture, the higher the number of polygons on that prim; as a rule of thumb, worse-case scenarios are torii and sculpties, which can quickly get to a thousand polygons each. But avatars are even worse — they count almost 7.500 polygons each (not counting attachments, of course)! Now do your math: one scene with 15.000 prims, all of them sculpties, and a hundred avatars (not to count attachments) will quickly have about 16 million polygons to render.
Is that a lot?
Well, low-end graphics cards — the ones that power perhaps 80-90% of all computers in the world — tend to be able to render about 5 million polygons. Per second. So the scene just described above — all 15.000 prims in front of your screen with a 100 avatars dancing in front of them — would be rendered at 0.3 FPS. Now you know why.So, how do we as sim designers deal with this in an intelligent way that keeps the dual seemingly opposing natures of good art and good programming? There are lots and lots of answers to that very complex question. For me and my designers here are a few things we did on Endless Nights.
So how do other virtual worlds deal with this nightmare? They do the maths the other way round: knowing that the low-end cards can render 5 million polygons per second, they know they can, at most, have scenes with 200.000 polygons in sight (so that the card can easily do 25 FPS without stress), but possibly even less. That’s why World of Warcraft’s avatars just have 1.500 polygons (and most of the MMORPGs do the same). They rely on insanely good graphic designers to get the most out of those 1.500 polygons — and get some help from the current generation of graphics cards to do a lot of special effects without any extra “cost” in GPU processing. These games look awesome because the graphic designers and 3D modellers can figure out beforehand what path your avatar will take, and make sure that all scenes are rendered with just 200.000 polygons. Granted, sometimes you get hundreds of avatars in a raid or so, and your graphic card will start to skip frames due to the extra polygons that suddenly require to be drawn, so lag exists elsewhere in the Metaverse, too!
First, talk to your client very clearly about what is important: Feeling of the Art, Efficiency of the Lag, or Detail of the Design.
These aren't opposing concepts, rather complimentary ones... If you can find out how people rank these then you can determine what's truly important to them. You never want to sacrafice one for the other, but it gives you a priority. Using Endless Nights as an example, the clients determined that the Feeling and Efficiency were the top two things they wanted. The detail was important as well, but it was third on the list. This gave us the freedom to not be concerned that they wouldn't like the 'look' of low prim design as long as we textured and constructed it well and kept the 'feeling' of the sim in place.
As a result we ended up creating all the major builds of the sim and the infrastructure of paths and trees and such in under 3100 prims, most of which were cubes. So using the math above:
7 * 3100 = 21700 polygonsThat's being efficient. Then we start to look at the textures that we used. A technique if you are building an homogeonous sim is to use a very low number of textures and strategically offset or color them to make each build look different. The difficulty with this for Endless Nights is that we had several different 'regions' for the hybrid nature of the sim. We have a medieval setting, a semi-modern but rundown city, a more natural area... You see the issue. So we use the same idea in a localized way. Each area uses around 10-20 textures. The benefit is that once the texture is downloaded into the cache of the client, it dosen't have to request it again from the server. So if you are in the city, the city will load quickly from then on, if you move to the medieval portion of the sim, it may slow for a few seconds but it won't have to reload every time you have to go around in that area and look at a new building. So, knowing this I made sure that all my textures were 512x512. So again, this is about the efficiency of getting the client to perform quickly and not mess up the ability of the avatar to run or shoot or enjoy the roleplay.
So I hear some of you thinking, "How do you do a whole sim in 3100 prims? That's gotta look horrid!" The answer to that is that it's a tradeoff. My personal machine has two SLI top of the line video cards in it. So I can see everything anytime, it's very rare that I lag in SL. However, for a mass audience you have to design correctly... We design low prim because we're good at it and we don't see the point of wasting the resource limit that we currently live under. Believe me, we can be prim wasters if we are told to or want to. I made a plate of onion rings in Endless Nights that is over 60 prims, that's more then some of the buildings. We just don't do it as standard operating procedure. We start from a point of optimization and move towards the unoptimal as discussions with the client indicate we should. The majority of people seem to find our builds 'pretty' or 'beautiful' and don't notice the techniques that are different,
We like our low prim designs, we think they add charm and that the tradeoffs are worth it. But again, our job is pleasing the client. Don't hesitate to get ahold of us and let us please you, by doing something low prim like Endless Nights, or by using every single prim on a sim in one massive castle.
0 comments:
Post a Comment