Prim-to-Mesh done just right

The year was, oh, perhaps 2009 or so. In the middle of all the excitement about virtual worlds in general and Second Life® in particular, professional 3D designers were raising eyebrows at a new opportunity to sell their content.

A virtual world with a million regular users who were engaged in consuming digital content, specifically, 3D models? And doing so regularly? Half a billion US$ of yearly transactions? Strong DRM in place (what we residents call “the permission system”)? All that just to prettify avatars and put them on poses on top of some virtual furniture? Well, it seemed too good to be true. And there was, indeed, a catch: you had to use Linden Lab’s own application to create content — which was designed having amateur content creators in mind, not professionals.

Professionals, well, used meshes — and had done so for over a decade. They populate marketplace sites like Renderosity, DAZ3D, BlendSwap, and who knows what else; doing business selling COLLADA files (or at least Wavefront OBJs… or Blender files… or whatever was popular at the time as a file format). They used Maya, 3DS Max, Blender — professional content creation tools. They had graphic pipelines fine-tuned for their own work — design once, deploy everywhere. Well, everywhere except Second Life, because SL had no way to use their creations: you had to do everything from scratch.

A few naturally went that way, and prospered. But the rest of the professional 3D content creation world stayed away. And, ironically, as the media started to lose interest in SL, Linden Lab spread rumours that mesh import would be available as an option in the near future.

Mesh development took a long time, and had lots of pitfalls. By the time it was ready and stable, it made a timid appearance (24 hours after Linden Lab announced its general availability, it was also developed for OpenSimulator). The battle around the dozens (hundreds?) of third-party viewers meant that Linden Lab’s own viewer, which was initially the only one able to correctly import and view meshes, was used by a minority of users. Established content creators frowned about the slow adoption of mesh-capable viewers. A few, of course, started releasing meshed content — specially in the clothing and apparel market segment. And soon, professional content developers would start dabbling a bit with SL again. There was some traction; there was a long period until mesh caught some momentum; soon, however, all major third-party viewers started to correctly display mesh, and, by 2013, it was clear that mesh was here to stay, that avatar personalisation took a next step into the new generation, and long after the media completely forgot SL (even today, the scattered articles about SL are illustrated with… pictures from 2007!), the mesh economy exploded. Literally. Top designers who are mesh content creators are, once again, making thousands of US dollars per week. The SL economy grows and grows in spite of landmass shrinkage (we have probably to thank the SL Marketplace for that), an overall reduction of simultaneous logged in users, and a drop in the active users. Still, the market blooms.

Mesh content has huge advantages, one of which is the possibility to dramatically reduce polygon count on a scene (compared to equivalent techniques using tortured prims), and, because of that, its adoption has become universal and strongly encouraged by Linden Lab and some core OpenSimulator developers on their own grids. But there is a huge disadvantage, too: amateurs are left out of the game.

Designing 3D content with a professional tool is not for the faint of heart. In a recent discussion with a teacher of digital art at high school level, he told me that his students have little difficulty with video and 2D graphic production — powertools like Adobe Premiere, AfterEffects or Photoshop are relatively easily grasped, understood, and successfully employed even for relatively complex projects. Put the same students in front of 3DS or Blender and they utterly fail. Remember, these are the future generations of graphic designers, and in this 21st century, most of them will have to master 3D art in some form. But they’re completely overwhelmed with the complexity of 3D tools.

Why? It’s not only the interfaces, which are horrendously complex, thus forcing a huge learning curve. But I’d identify two major drawbacks. The first is the requirement to learn how it all works, from a theoretical point of view, and since 3D models have come mostly from architecture, the movie industry (for CGI), and gaming design, everything is insanely complex. In fact, “simplification” algorithms — reducing the amount of polygons — is part of research on the hard-core fields of mathematics; just grab a copy of MeshLab to see what I mean: the menu entries have citations of peer-reviewed articles about each algorithm, instead of the usual “help” bubbles or similar UI elements. Read those papers, and yes, it’s rocket science. Well, honestly, I find rocket science a bit easier to understand; you just need to learn a bit about Newton physics. 3D algorithms, however, require a vast amount of knowledge on an incredible range of subjects, none of them easy. And while it’s true you don’t need to demonstrate math theorems to be able to create sculpties with Blender, it needs a full understanding about how to project a 3D solid upon another — and how to do it using a tool like Blender.

Definitely not what an amateur with high school maths is able to understand.

To make matters worse, these days, being a 3D artist is not merely having some talent and technique to model 3D objects. It also requires programming — understanding how to construct a graphics pipeline that generates your model and renders it appropriately; and I won’t even go into complexities like “rigging” (even though professional tools are able to abstract the concept and turn it into something slightly easier to grasp). Putting it into words: creating a simple T-shirt using the LL templates for clothes takes a couple of hours to understand, and even amateurs are able to create something fun with them using GIMP or Photoshop. Doing the same with a meshed shirt requires months of learning a complex tool, years of experience with that tool, and several hours until you just “get it right”.

We come to the second issue next: graphic pipelines. If you’re doing 2D art using GIMP or Photoshop, the “pipeline” is easy: you just use a few layers, add a few plugins on Photoshop (like, say, FilterForge), and play around with filters. The result is a finished image.

3D art is nothing like that. You might start with Complex Tool A to create a sketch of your object (say, Sketchup). Then move to Complex Tool B to “sculpt” the object, or align it properly, or add further elements to it that neither tool A nor tool B is able to do. Then you use Complex Tool C to clean the mesh up. Then you project the mesh to an UV map using Complex Tool D, and, finally, try to assemble a single file with the mesh and the textures with Complex Tool E, and hopefully you can then upload to Second Life as a COLLADA file. With luck, it will even look vaguely the same as what you had originally in mind. Top-of-the-line 3D modelling tools try to do all of that in a single application: no wonder they are so complex! And, of course, at each step of the way, the files used to transfer content are ever so slightly different so you will need to compensate. Sometimes the only option is to open a text editor and do that manually; or, better, write your own programme to do the work for you. Or, well, write that algorithm inside one of the top professional 3D tools, which are also programming environments specifically for 3D content creation.

No, clearly, this is not something an amateur wants to go through.

By contrast, Second Life’s interface, while clumsy, is simple. Drop a few primitives around, glue them together, and you have something closely resembling what you have in mind. You just need one single tool: the SL viewer. Best of all, you can share content easily, get help from friends, collaborate with them to create more complex content. The disadvantages are twofold: you’re stuck with prims, which waste a lot of polygons (thus “eating up” precious simulator resources and forcing people to buy more land…); and you cannot use your content elsewhere (except perhaps on OpenSimulator).

Now all of this is rather stupid. Even though we assemble content in SL using prims, they’re really just meshes. Prim torture is just a way to tweak the mesh, adding more polygons, by using parameters. Once an object is linked together, a full mesh for that object is internally generated and sent to the simulator’s physics engine for collision processing. But you have no access to that mesh — it only exists in the deep structures of the simulator. Ironically, it’s also the viewer that will use that mesh to draw frames of the scene on your screen. So, beneath the UI, it’s all meshes — but you have no way of getting access to them.

The SL viewer could be the ultimate 3D content creation tool for amateurs. And even professionals might be able to use it to create prototypes and export them to a professional tool for further processing in the pipeline. So, besides giving access to a fully-fledged virtual world, the SL viewer could also compete with the vast array of 3D content creation tools, but having a slight advantage over them: it was designed for amateurs, hiding the complexities of 3D content creation by providing a (relatively) easy interface, which, however, was able to produce the amazing content we have been seeing for the past decade.

Well, someone just did that.

The clever guys from the Singularity Viewer team have just released a version that exports any prim-based object (and yes, that includes sculpties too!) as a Wavefront OBJ or DAE (COLLADA) file. Ironically, they don’t seem to appreciate the breakthrough this means; the article announcing this option thinks that Media-on-a-Prim is more important, and delegates the amazing ability to export anything as a COLLADA file as just a “minor” feature. Wow! Well, I have nothing against MOAP, and I have written countless articles about how important that is, but… exporting SL content as COLLADA files is a vastly major breakthrough with a huge impact!

Now talented amateurs can get back into the game of content production. They had been depressed with the coming era of all-mesh content — but some of them have over half a decade of experience in using prim-based content, knowing all the tricks to create good, compelling objects. Sadly for them, learning one of the top professional 3D content tools to apply their skills and talents was way beyond them. But thanks to the Singularity Viewer team, they can now just get all those objects they have lovingly created over the years and export them as COLLADA files — and re-import them again.

I’ve read a few forum discussions about that. Of course, professional content creators, who are currently reaping the rewards of their ability to use Maya, 3DS or Blender, frown upon the quality of the Singularity-exported COLLADA files. Almost all of them have united their opinions by saying that the results are very disappointing — resulting objects have a huge Land Impact, and, as such, they’re not usable. And, to a degree, they’re right: a sculpty, for instance, is a mesh with thousands of polygons. But a sculpty theoretically just has a Land Impact of 1. Re-import it as a COLLADA file, and it’s impossible that those “thousands of polygons” have the same Land Impact — it’s simply not possible. Similarly, very complex prim-based objects with lots of prim torture will create meshes with an insane amount of polygons — but, because they are “just prims”, they have low Land Impact. The resulting mesh, however, will still continue to have that insane amount of polygons, and, as such, it will not be able to “compete” with the same object using prims.

Well, LL has not kept secret their plan to slowly “force” tortured prims and sculpties to have a raised Land Impact — to reflect the amount of polygons they have. When they do that, meshes will become even more interesting — since, unlike prim-based objects, you can use applications to reduce the polygon count while still keeping the object with high rendering quality. When that happens, amateurs using prims will simply export all their content with Singularity and re-import it as meshes, and benefit from lower Land Impact. Until that happens, however, Singularity-exported meshes might or might not be “better” than prim-based content. But, at the very least, it means you can finally use your content outside SL. At last!

Here is my own simple example. I’m an awful builder, but years ago, I needed a simple spade to take a picture, and having not found a reasonable freebie, I just glued four prims together and created one. Today, I exported it as a mesh and re-imported the mesh again (this means the textures get lost, but it’s easy to apply them again — it works just like applying textures to the original). Here is the result:

two spades_001Now, which one is the original, and which one is the copy? Hard to tell. Clicking on them gives a clue: the meshed spade has actually half the Land Impact (hooray!).

I’ve also noticed that the exported COLLADA file is rather ingenious. When re-importing, not only the object’s size is exactly the same as the prim-based content, but even the orientation is precisely the same! I was actually pleasantly surprised with that, but I shouldn’t have been: after all, Singularity’s COLLADA has been produced from a scene rendered by a viewer who understands exactly what the object is supposed to look like.

So, which is which? Zooming out produces the following result:

two spades_002Because the defaults of the Mesh import dialogue box suggest a very aggressive LOD, you can clearly see that the spade on the right seems now to have a “thinner” handle — it’s already losing polygons, even at this short distance. Zoom in, however, and it’s not possible to distinguish the two objects: they look precisely the same.

Lost that amazing sculptie texture that you had preciously kept, and now there is no way to retrieve the original? Worry not; Singularity has no problem in converting sculpties into meshes, and you can even group them together with prims very easily, and get back the original mesh that was used for the sculpty. Fun, isn’t it? However, the drawback is that sculpties have some 1024 polygons or so; I tried to export a 10-sculpty object to a mesh, and came up with a huge mess… I mean, huge mesh with tens of thousands of polygons 🙂

Professionals, of course, would be able to use the resulting mesh and filter it through their graphics pipeline and reduce the polygon count while still making the object look great. Since I’m poor, I can only afford MeshLab to do that (because, well, it’s free 🙂 ), and it’s rather hard to “get it right”. But my point here is that Singularity’s solution works. Rather well, in fact.

So even if you dislike Singularity (I’m definitely not a fan; it has atrocious performance on my outdated hardware, and I miss all the nice features from the other viewers), at least you can use it now to export all your prim content to meshes, work with it, and reimport. Even if you gave up on Second Life (boo on you) and wish to use your creations elsewhere (I’m not going to name names!), you have now the perfect solution for that — a simple, quick way to prototype 3D content in Second Life, and simply use Singularity to keep your meshes around for whatever next-generation rendering engine is coming around the corner.

And, of course, it means that talented amateurs are once again brought back into the fold of the SL economy and not left to rot with their “outdated” prim-based content. Everybody can become a mesh creator now.

When will this amazing feature be available on the official Second Life Viewer? You guessed it — never. But LL will be losing a market there — the market for easy-to-use 3D content creation tools.

Print Friendly, PDF & Email