In last week's NWN tech forum on fixing Second Life lag, ex-Linden Lab developer Karl Stiefvater argued that meshes would be a giant boon. At first I was skeptical, but a Resident named Followmeimthe Piedpiper (oh yes) sent me these two compelling visual illustrations:
"The first shows a normal cubic prim rendered in Second Life as a wireframe." (At right.) "Without any cut sides or hollows it still uses 56 vertices. All these need computing to rez." That's a lot of excess machinations, because by contrast, "A normal basic real life 3D cube in comparison only has 8 corners." Mr. Piedpiper went on: "Now compare a simple wall with two offset window holes in it." (After the break.)
"Made from prims it needs a minimum of 6, adding up to a whopping 6x56 = 336 vertices. (Shown as the blue dots.) The same wall made from a mesh by punching two holes in a box uses 24 vertices."
I checked this demo with Karl (now known in SL as Qarl Fizz, and an Emerald viewer developer), and he confirmed this checked out: "Yup -- he's right on the money." So when meshes are enabled in Second Life, and gradually become more commonplace, basic mathematics suggest lag in SL will decrease. Of course, meshes are only expected to make it to Open Beta later this year, it's unknown when they'll ship to Second Life proper, and it'll probably be a year or more for meshes to gradually supplant prim-based creations. What to do about lag in the meantime? I have an idea, but that's for another post.
Of course, it will also require designers to design their things to minimize the number of faces they use. You will see a lot of highly nonoptimized builds out there, just as you currently see a whole lot of highly nonoptimized textures.
Posted by: Rob Knop | Thursday, August 19, 2010 at 02:12 PM
Even without mesh support, there aren't already a lot of highly non-optimized builds out there already?
Efficiency won't be the only gain w/ mesh support. Control of the final product is the most sought after element that mesh support will bring to SL.
In fact, if you want to read more, you can check out the blog I wrote a year ago about this.
http://bit.ly/17a5X2
Posted by: reed | Thursday, August 19, 2010 at 02:27 PM
True, it requires designers to minimize the vertex and face count to *really* make a difference. The best way to do that is to compute the "prims cost" of a mesh as a function of the vertices used in the mesh.
If the mesh is efficient, counting it as a single prim (or even a prim-fraction) would make a lot of sense, encouraging efficient design (which is what real game level designers strive for). A high complexity mesh would be correspondingly "more prims".
Still, if the designers can go from 336 to 8 vertices, overstating the vertex cost slightly would still allow massively more complex (in terms of actual visible complexity) designs for far fewer computing resources. Add in the reduced data costs and it seems like mesh could be a huge win in terms of performance.
The question becomes one of how harmful such successes are to the amateur designers who will remain dependent upon the simplicity of prim building (as I have heard no indication that mesh will be anything but an import-only methodology).
Posted by: John Lopez | Thursday, August 19, 2010 at 02:31 PM
Sigh. 8 should be 24. Still more than an order of magnitude.
Posted by: John Lopez | Thursday, August 19, 2010 at 02:55 PM
The more I think about it the less happy I get about the proposed way LL will implement meshes. I'm very happy they're coming, we need them and some people will do amazing things with them, but there's another issue here too.
Since LL have apparently no plans to support the creation of meshes within the SL client we'll all have to import them from some other app'. So it was with sculpts, but sculpts only really enhance prim-builds, they're a poor substitute for structural builds since the collision detection is beyond useless. This is not true for meshes, they're physically as accurate as they are visually and they're going to be amazingly useful for structural builds and so they'll probably start to supplant prim-builds quite soon.
This means only those with the requisite skills in Blender or the bank balance for Maya will have full access to them - this renders the skills of many prim-builders, lots of whom learned their craft within SL, almost obsolete. Presumably LL will argue it's not cost effective to incorporate even basic mesh creation within the SL client - so they're effectively now outsourcing creation to established app's and the people that can already use them. Really this starts to feel a bit like a major corporation ignoring local labor and sending jobs offshore and I'm not sure we should be any happier about it in SL than we'd be in our own RL neighborhoods. Meshes, yes please - but can we have a (basic) way to create them in SL from prims too?
Posted by: Jovin | Thursday, August 19, 2010 at 03:42 PM
Jovin, an enterprising scripter wrote SculptCrafter, a tool to make sculpties out of prims, so in theory there's nothing stopping residents from scripting similar tools to optimise a linkset into a more efficient mesh...
Posted by: Nat Merit | Thursday, August 19, 2010 at 03:58 PM
I also think it's likely we'll start seeing pre-built mesh building materials like roofs, walls, window frames etc, just like you can get packs of 100 different sculpties on a similar theme now. People will be able to incorporate these into buildings using the standard in-world building interface.
I don't think it's very likely that everyone who builds now is going to change from making prim buildings to designing entire buildings using specialist 3D software and exporting these over wholesale to Second Life, if anything because that doesn't seem like very much fun. But using a toolbox of pre-optimised walls with windows in them, etc to build in world? I can see myself doing that, especially if there's a prim saving - I already faff around with megaprims to get more from my prim allowance afterall, why not pre-made boxes with door and window shaped holes in the right places?
Posted by: Nat Merit | Thursday, August 19, 2010 at 04:08 PM
I believe there are 3 tools today which allow SL residents to create sculpts inworld. I know some very good builders who create complex sculpts for boats with them. There is no reason why the same should not happen for meshes.
It would be the best of both worlds: build inworld with prims for quick prototyping and create a mesh out of your objects with a tool.
Think of all those existing objects that can be converted to mesh. Or, think how prims can be used to prototype a house inworld to better adapt it to the landscape instead of creating one by trial and error with an external tool.
I think the future is bright.
Posted by: IndigoMertel | Thursday, August 19, 2010 at 04:13 PM
Wait... a cube uses 56 vertices?!? Is there a good reason for that?
Posted by: Vax Sirnah | Thursday, August 19, 2010 at 06:02 PM
@Vax Sirnah, for lighting. Taper it just a fraction and it'll be 8 vertices though, which yet another legacy thing.
Posted by: Nexii Malthus | Thursday, August 19, 2010 at 07:04 PM
whoever gives us the capability to export a necklace and convert it to mesh and send it back as one prim will be wallowing in L$.
Posted by: Ann Otoole InSL | Thursday, August 19, 2010 at 07:07 PM
Sculpties...way beyond my skill level. Meshes...same. I could learn the latter via Blender, but the time required is not what I should be doing as an educator.
But I like Nat's idea. I would be happy to pay a good designer for elements I could manipulate such as "pre-built mesh building materials like roofs, walls, window frames etc, just like you can get packs of 100 different sculpties on a similar theme now."
I could cut lag on our one big build that way, dramatically.
Posted by: Ignatius Onomatopoeia | Thursday, August 19, 2010 at 07:58 PM
There is stuff you can do for buildings in mesh that is pretty much impossible to do properly with prims and sculpts. Can't wait.
Posted by: Ann Otoole InSL | Thursday, August 19, 2010 at 08:41 PM
I would like to see this same experiment done with a sphere, a ball, or a pizza.
https://www.xstreetsl.com/modules.php?name=Marketplace&file=images&ItemID=1153828
Posted by: Little Lost Linden | Thursday, August 19, 2010 at 09:15 PM
Given the standard 18-polygon-per-face cube, one could simply sell a set of cubes with only two polygons per face and use them as square prims and still show a net gain in performance.
That wall-with-two-windows example, though, makes no sense to me - traditionally, meshes have to be composed of triangles, or at least polygons with no concave edges. That example would be impossible. Properly broken down, it would still be fewer polys than a prim version, but still.
Also, Google Sketchup supports Collada exports, and it's free. I'm positive someone will come out easy-to-use mesh editors. I never bothered to learn Maya or (shudder) Blender, but I used Valve's Hammer editor for building low-vertex mesh items all the time. You have no idea how much I'm looking forward to mesh support.
Posted by: Buckaroo Mu | Thursday, August 19, 2010 at 09:45 PM
I think this is great to build with, but for reducing lag I'm not impressed.
Of the total load on the asset servers, what percentage is prims and sculpt maps, versus textures, scripts, animations, sound files (as in gestures), etc.?
Posted by: Nightbird Glineux | Thursday, August 19, 2010 at 10:10 PM
Hello, look this link, viewers are totally free
http://inflife.net have luck :-)
Posted by: Abel | Thursday, August 19, 2010 at 11:30 PM
That reminds me. I forgot to add inflife to my comment spam rules.
Posted by: Tateru Nino | Thursday, August 19, 2010 at 11:41 PM
@ Nat (& others) - Yup, I use SculptCrafter inworld and it's very useful sometimes. I'd still argue that kind of functionality should be in the official client and not outsourced or left to Residents to create - now we have to build the content AND the tools to create it? While Linden Lab answer the phones?
Pip Linden said at the recent SLCC he doesn't think it much matters if Residents are simply combining pre-formed meshes instead of creating their own and that certainly seems to be the way LL are headed with this. I'd argue that it does matter to many (though admittedly not to all) of us and although turning SL into one big virtual LEGO® set might attract some new users but it's going to bore a lot of the existing ones too. So I guess we either climb the learning curve up the north-face of Mount Maya or learn to play nice in LL's new kindergarten?
Still, can't wait to see what meshes make possible in SL, I'm not as pessimistic about it as I might sound.
Posted by: Jovin | Friday, August 20, 2010 at 03:53 AM
Nightbird, use of mesh also potentially reduces rendering lag from textures as usually every surface in a prim build has a texture, even if that surface would never be visible. I don't know how efficient SL is at dealing with hidden textured surfaces, but given this is one of the aspects Qarl mentioned in his original comment, I'm going to assume this would also produce a non-trivial improvement.
Although, from your wording, I think you may be looking at this purely from the point of view of size of assets and therefore amount of content that needs to be streamed, which as you correctly say isn't going to be huge differences compared to sounds, scripts etc, although there will be some improvements to download speed (and sim crossings - especially if a single mesh replaces a massively complex linkset sculpty hair style). But what we're actually talking about here is complexity of models in terms of how fast and how efficiently they can be rendered. That's the area where use of mesh will make the most difference and also what Qarl claims is the number one cause of the type of lag most people complain about.
Posted by: Nat Merit | Friday, August 20, 2010 at 04:42 AM
@ Buckaroo Mu
You are right in thinking meshes are normally composed of triangles with a vertex at each corner. A simple cube therefore has 12 faces. A cubic prim on the same basis has 108.
The mesh wall has 52 faces - what you see is just how 3DSMax rendered the wireframe after a boolean subtraction. The 6 prim wall has 648- still a very inefficient way of making something so simple.
Posted by: followmeimthe Piedpiper | Friday, August 20, 2010 at 04:52 AM
Mesh is not going to do much for hair. Sorry. Flexis and all. need hair. Not hardened lava flows. nVidia has a bunch of hair vids. Commit to nVidia only and let's see what is possible. Oh thats right. Your IBM buddies are pushing you to droid no 3D.
Oh yes what happened to flexi sculpts? Will mesh be flexi?
Tell you what Phillip. Commit to Havok Cloth and we will have a game changer.
Posted by: Ann Otoole InSL | Friday, August 20, 2010 at 05:20 AM
I'd also be very interested to know if meshes can be flexible. I understand from Tateru Nino's Dwell On It blog that the mesh beta NDA has been lifted, so can anyone comment on this from actual testing experience?
Back when the NDA was briefly lifted, there was talk about rigging meaning we could have mesh clothing that moves naturally, and entire mesh avatar replacements that flex realistically around joints. It's also love to get confirmation of whether this is actually on the cards or not. Avatar attachments are a huge issue when it comes to sim crossings and crowded region lag (especially when every prim in a necklace, shoe or hairstyle linkset uses unoptimised textures and contains a resize or recolour script).
Posted by: Nat Merit | Friday, August 20, 2010 at 07:41 AM
now hold on just a minute. granted less vertices = a good thing, but no one has shown me this will be "less lag"
generally when i think of lag, its due to things not rezzing or being able to move in a sim. i don't see how mesh complexity has anything to do with either of these. the # of vertices is only going to have an effect on your FPS. which is great and all, but not if it's at the expense of higher bandwidth imo!
in fact, i would wager on average a mesh object is very likely going to consume more bandwidth than it's prim counterpart. sure you can make nice pretty examples as shown above where the mesh can be greatly reduced, but is that really an average case? do you really think people are going to pop out to 3D studio MAX to make that wall with a window in it and pay 10L to upload it? finally just because some builds can be highly optimized and still look decent, doesn't mean content creators will do this.
someone show me how a mesh can be sent to my client using far less bandwidth than the prim equivalent, then you will have something to talk about. i'm guessing by the time you tack on all the UV coords (that you get for free with prims), most mesh objects are going to take more bandwidth to download than a prim equivalent.
Posted by: furroy | Friday, August 20, 2010 at 08:48 AM
Unfortunately, SculptCrafter is unusable for anything requiring precision, as it fails to precisely place objects, and I'm not talking the imprecision caused by the 0-255 integer steps inherent in sculpties -- SculptCrafter only generates RGB values from 2-252 (127 plus or minus 125), making a 10m wide sculptie impossible, but far worse, it reads the prim positions as if it was going to place them in a 10m wide area, resulting in placement and sizing errors of all the "prims" in the resulting sculpt.
Posted by: Galatea Gynoid | Friday, August 20, 2010 at 12:56 PM
@Nat Merit: "But what we're actually talking about here is complexity of models in terms of how fast and how efficiently they can be rendered."
You are saying that lag is produced within the viewers, and that lag can be reduced by designing models of objects for efficient rendering?
I disagree. I think the time savings you describe for a more efficient rendering pipeline within the viewer are minor compared the time needed, for each object, to get information on its component prims (including the textures, scripts, etc. that you call "assets") from the asset servers and to send that information over the LANs or Internet to multiple destinations (the sim and one or more viewers).
I see lag as a combination of database and network issues. One thing meshes will help with is in reducing the number of prims needed for an object. This may result in significant savings depending on how other things, like textures, are handled by the designer.
"...and also what Qarl claims is the number one cause of the type of lag most people complain about."
Can you direct to me to this?
Posted by: Nightbird Glineux | Sunday, August 22, 2010 at 06:58 AM
Concept issue here: are we to believe some 32,000 sim owners (or more, if we consider minor land owners) are going to replace all their builds with meshes?
First, one has to know how to make a mesh, and that requires a complex tool such as Blender or Maya (or assorted other mesh tools). Will Linden Lab release a mesh tool? (Have they released a sculpty tool?).
No matter what new toys LL brings in, SL is still going to lag... and will continue to do so until they start focusing on basic core issues... such as an entire sim lagging when someone ports, changes clothes, or rezzes a MONO object. It will lag until they fix, once and for all, numerous DDOS attacks on their own servers. To be blunt, SL lags because LL codes like amateurs on JOLT and they don't debug worth a [numerous expletives withheld]. Until that changes, SL will lag.
Posted by: Wayfinder | Sunday, September 05, 2010 at 10:33 AM
(forgot)... bottom line, meshes are not going to reduce lag unless someone makes an entire sim out of meshes. Current sims will not benefit.
In addition, the real bottom line is that prims don't lag... at least not significantly enough to notice. We've run tests. Prims themselves are probably one of the least-laggy things on all of SL. One single avatar can lag more than a nearly full sim of prims. If you have a sim full of builds, but zero scripts, zero physical items, and one avatar with no one porting in or out... it doesn't lag at all (except for server-side issues... which IS the main source of lag).
So IMO, mesh really won't make any measurable difference as far as lag. It will be great if people know how to make mesh items, but I'd bet dimes to donuts LL doesn't implement mesh any better than they've implemented textures or sculptys. A man would be a fool to take that bet. ; )
Posted by: Wayfinder | Sunday, September 05, 2010 at 10:36 AM