Tuesday, June 19, 2012

A Quick Tour of Cloud Party and Some Thoughts



So today there's been a huge buzz about a new virtual world platform that suddenly appeared seemingly out of nowhere, I followed the inworld tutorial, and immediately set to work feeling my way through the interface and platform. I haven't tested it as extensively as others have been, so if what you see here piques your interest, do go in and share your findings!

Here's a quick laundry list of features:

  • Mesh upload (Collada)
  • Materials (Normal, Specular, etc.)
  • Custom bones and animations
  • JavaScript scripting. (omg, a REAL programming language! fjakldfajfj;fda FINALLY)
  • Local avatar movement (no more rubber banding)
So let's break it down:

The Tour

So on entering and being shown all the shiny new features, it feels like these guys know what builders in SL have been craving for (literally) years now. If you've read my past post on building an RPG in SL, you'll know that I had the worst time of it with LSL, among other things.

Mesh upload is already a given, so let's take a brief look at the other things.

Custom bones and animation

There's a bright rainbowy-tentacular future in store for the future dev's of the metaverse!

Well, immediately you can see that there's obviously SL users here :P but what's significant about this picture is that those tentacles are actually waving back and forth and curling. We've been drooling over this prospect and begging/waiting/whining/raging for years.

NPC's, hello again! I can't reiterate enough how important NPC's are!

Materials

Another one we've been waiting on for a while. Here's the materials floater:


Criticisms aside, the SL renderer is quite the feat- it handles massive amounts of vertices and textures quite admirably. I'm not sure how efficient WebGL rendering is, but the truth is, normal maps were designed to get around this kind of problem- by making the lighting appear smooth when in actuality you have a low resolution model. There's also other modern goodies like specular maps, for when you want to add that extra bit of light-dependent shine, and of course diffuse maps, for your basic texturing needs.

Scripting - JavaScript


Not exactly hip to the scripting language yet, I went and inspected someone else's build. I don't know whose it was though so props to whoever made it.

Look at that. It's beautiful- so beautiful. It's JavaScript. In all reality I hate JavaScript (what with "===" and all that)- but you know what, given the alternative was LSL, this looks like the Venus de Milo to me right now. Honest to goodness objects, arrays, properties-- I haven't dug deep but I'm sure that scripters around the metaverse are probably thinking how nice it would be to work with a true scripting language for once.

I'm known for this phrase, I'll say it again, "RAZZIE HAET LSL".

Oh, one more thing, the scripting window opens in a separate tab-- which means you can script on another screen. Oh heck yes.




Local Avatar Movement

So this one is a quick one to explain. Rubber banding is the bane of the metaverse. You get one hiccup in the line and suddenly you're walking in place, and then suddenly shot forward. It's annoying, and people have been begging for client side avatar movement for ages.

It's also controversial.

You see there's a trade-off. If you do client side collision, you get smooth instantaneous movement with no penalty when your connection hiccups for a brief second- however this means that other avatars are non-physical to you. Basically, if two people are controlling their own physics, who decides who pushes who? If the server is handling it, it can decide, but you're at an impass between two points of authority, so the simplest solution is to just pass through each other..

-- and that's what you have here. Some people hate it, I personally love it. I'll take smooth walking over avatar<->avatar collision any day. I can't be sure how the rest of the physics work, but that's my understanding of the clipping so far.

But the question you might be asking now is, do physics even work?

Server-Side Physics

Avatar<->Avatar may not collide, but Object<->Avatar does! So physics for the most part works as you would expect, big win there. That wooden marble knocked me out of the way, I took one for the team, so be happy!



Basic Object Editing

The object editor is pretty straight forward, you see a channel window appear on the left with all the object editing properties. You select movement buttons from the top, and you can choose between a visual library of items. I should note, those are not prims in the SL sense, I can't be sure, but I don't think you can do prim torture commands on these items.


Your inventory looks very sleek, no more guessing what strange crime against humanity may be lurking in what you took into your inventory as "Object". At least, depending on how you take the picture :P


Just to be complete, I uploaded a simple cube and took a picture to see how it would look in my inventory and what the process was like-- very nice!




I forgot to mention, you also look like this when you're in build mode :P



Miscellaneous

I don't really have a proper header for these other notes, as I was primarily focused on the builder's aspect, but I'll stuff it here.

At some point I triggered the ability to have a free house, I don't know what the deal is but I gave it a shot.


I guess that's my house, alongside the many other ones just like it :P Here's the shot of the whole neighborhood.


Here's also a glimpse of the inside of the house, as well as a look into one of their UI floaters. Seems pretty straightforward.


A lot of your UI in regards to personal actions happen by accessing a "smartphone" with what looks to be an iPhone and Android shiny button style interface.


The UI is overall pretty easy to come to grips with. I think they were pretty successful in reducing the learning curve on this thing

No SL-Style Camera - which means placing objects can be a pain


This is just a personal pet peeve, and it's not just Cloud Party that does it, every non-SL virtual world I've visited does it. Nobody ever implements an SL-style camera. If it's a legal thing, I couldn't know- but I've visited Kaneva, Active Worlds, Blue Mars, Onverse, Friends Hangout, Tundra, Jibe, IMVU, Cobalt, OpenWonderland, Multiverse- and who knows what else- and NOBODY, I mean NOBODY ever implements the SL camera.

I even wrote one in Unity3D to see if it was a technical thing. It totally isn't. If I can do it, anybody can.

Seriously, if there's no legal ramification, and no design reason- give us an SL-style camera, somebody, anybody. I've been using the flycam to take pictures, it's definitely something, but it isn't designed for building like the SL-camera was. If it's a design thing, at least give us a mode where we -can- use it, at least to build.

Why should I have to run my ass clear across the metaverse just to see what the letters on a sign say, or do some weird sort of juggle and dance just to cam to the side of an object I'm looking at. Maybe I'm missing something in the tutorial, but this really eats me.

Most importantly, and I want to make this clear, it pains me even more-so in Cloud Party than any other VW because they are so close to awesome it's not even funny. So if any Cloud Party dev's are reading this, I'm really applauding you, honestly, this rocks. You guys have done a great job rethinking inventory, and object channel windows, using simple to understand floaters, I hardly had to ask any questions to figure out how to move around.

So this last bit about the camera hurts so much because, you know, "so close,  yet so far away"-- but it's beta, so I make a big whine about it to hopefully bring attention to the issue :)

It could also just be me. I'm totally willing to accept that no one else has an issue with it.

For the non-builder, the camera navigation is still ace


In all reality maneuvering around here has been one of the least aversive experiences I've had in navigating a VW. In fact, I would say it's one of the best ones bar none, short of SL.


Some Thoughts


All in all, it's good to see solid potential for an alternative to SL. Really, this is probably the most promising thing we've seen in regards to actually being close to a functionably useable alternative to the SL platform since RealXtend debut'ed their viewer mod with mesh, materials, and bones (another project to be covered in another post).

There's an army of content creators out there, desperately searching for a platform that can handle the dreams they want to build. They have the know-how and passion to design entire worlds- they just need a platform that can do it.

Wednesday, June 6, 2012

OpenSim and Mesh - Understanding the Misunderstandings


The Situation

I'm not here to start a flame war. I feel that a lot of the anti-mesh sentiment is a result of misinformation, bad experiences, and a whole slew of other issues that are not the fault of the mesh format at all.

To be fair, as a reference, I have experience in all three forms of geometry building: prims, sculpts, and mesh. Not just small glances. I have done full scale, thorough projects using each. So please, keep an open mind, and listen to what I have to say. I'll do my best to be as clear as I can.

Invalid reasons to despise mesh:

  • Your viewer doesn't support it
    • There are very few viewers that are still in active development, that do not support mesh.
    • Your viewer is still your choice- but remember, it's only your choice. Don't try to force the decision on someone else.
  • It breaks the collaborative and seamless in-world experience.
    • You're going to have to read to the end to see this one. :)
  • You can't export mesh
    • Well, yeah, that's sort of a good thing. You don't want people downloading your assets. If you already have the 3D model on your hard drive, the very nature of mesh allows you to upload entire linkset-style scenes without having to resort to XML files. Nothing changes, build once, upload everywhere.
  • You don't know how to use a 3D modeler
    • In the old days, Blender's interface really was pretty bad, but since 2.5 on, they've re-factored their interface and it's actually a slick, powerful, even intuitive.
    • If you've been exclusively a prim modeler and have no interest in using a 3D modeler, that's fine, but still read on and see what I have to say. You may warm up yet.
  • You don't think you can learn to use a 3D modeler
    • This is simply just not true. ImagineFX and 3DWorld magazines are full of self-taught digital artists. Sure, a school can help, but the wealth of knowledge out there hinders nobody from getting into it.
    • It can be scary at first, I admit. I was there- but having friends who can help, going to the irc channels.
  • You've become frustrated with a 3D modeler
    • We've all been there- I've been there. It's not the program's fault (but sometimes we like to lapse and claim it is ;) ..) The truth is, you may have run into a limitation of that particular package, or someone just hasn't shown you how yet. Be patient, google, ask, and persevere. This is one of those "if it was easy, everyone would be doing it" sort of things. You need to put in the work if you want to stand out. It's the same drive you used to learn how to build with prims and script, it's just taking a little longer.
  • You've been burned by a 3D snob
    • This is the worst, and I don't understand where they came from, but I've been seeing a lot of people think that because they either went to school for it, or learned how to use a program, they're suddenly better than anyone else in 3D. These guys ruin it for everyone.
    • What's worse, they even fight among themselves, claiming one package is better than the other. Stay away from these battles, they mean nothing in the end.
    • At all else, usually asking them for their portfolio tends to shut them up. If someone feels the need to gallivant their prowess around, more often than not, they have nothing impressive to show. Serious digital artists tend to be more focused on their craft than convincing you they're the best thing since sliced bread and youtube cats. Even if they are good, all the more reason to beat them at their own game.

A Quick Primer in 3D Graphics Cards


On the most fundamental level, everything rendered in the SL viewer is composed of triangles, and textures mapped onto those triangles. Prims, sculpties, mesh, avatars, it's all composed of triangles.

The graphics card sees everything in this manner:

Source: http://www.esiee.fr/~perrotol/TheRedBook-1.0/chapter02.html

These are the "primitives" in the belly of the beast. You see cubes, cones, pyramids, and spheres. The graphics card only sees these. The very molecular structure of the virtual world.











Ok now let's see that in a way that actually makes sense:


OpenSim scene on let, same exact scene in wireframe view on right (ctrl+shift+r)
In this manner, the currency of your video card is how many triangles it can render in a fraction of a second. So, for example, if your video card can render 1.5 million triangles every 1/33rd of a second, your frame rate is 33fps (frames per second).

However, when your graphics card cannot render all the triangles in the scene in a short enough time, it will draw the scene fewer times per second. So, for example, if the scene is so heavy, your card can only draw the scene 5 times a second instead of 33, you get what we call, jokingly, a slideshow, or more appropriately, "lag".

What this means for you as a builder, is that when you overload your scene with too many triangles and too many textures, that 32,000 prim masterpiece may run so utterly slow, that visitors run screaming, because they can move their camera maybe once every 5 seconds.

Efficiency

Prims, Triangles, and Mesh



What does this prim and the mesh cubes have in common? They have the same amount of triangles.

That's right. The single prim cube on the left takes the same amount of effort for your graphics card to render as the 9 mesh cubes on the right.

I made texture mapping of the mesh cube match that of the prim cube. The only thing you can't do with the mesh cubes that you can do with the prim cube, is torture it.

Let's zoom in and compare.

Prim Cube: I did the math in the picture for convenience. There are 108 triangles on that cube, you can even count them.
Why are there so many? Prim torture. These shapes are mathematically generated by the parameters sent. Bandwidth-wise, they're great. Viewer-side, not so much.



Mesh Cube: You can see here, the mesh cube uses 1/9th the amount of triangles that the prim cube uses. It's as few triangles as you can get to create a cube. The mapping is the same, as you can see by the coloring I did on the faces.



Sculpties, Triangles, and Mesh

Ok, this needs to be covered. A lot of people have trouble telling the difference between a sculptie and a mesh. A sculptie is a square grid composed of 2,048 triangles.

single sculptie is equivalent to ~20 prim cubes, and ~171 mesh cubes.

That deserved to be bold. Let's look:


If you've been following everything so far, this should horrify you, and guess what-

We're using these things all over the place. Sculptie hair uses 10, 20, or more of these pieces. Rocks, birds, shoes, socks, toes, avatars- sculpties have found their way into every part of building- and for what was available at the time, they were great- but we have a better format available.

I could fill a blog post on the differences between the two, and if enough people want me to, I may, but let's keep this short, sweet and to the point. 


Props to whoever made the ubiquitous "noob". :)
Sculpts require many, many, individual pieces which must be exported from your 3D modeler of choice, and arranged properly inworld, by hand, with the build tool, resulting in things like this:










Want an example of how mesh changes that? Wireframe your own avatar body.
The true virtual reality of it all.


Hammering it home about prims


I really must reiterate, and hammer this in. Prims are just mathematically generated sets of triangles. You can pass them funky parameters and get some really broken shapes. To demonstrate, I grabbed Phoenix and rezzed some of their "extra" prims, in which they added options that send parameters to the viewer you can't normally access. This is all from the build tool:




Really, it all comes down to triangles. Prims get triangles into the scene by mathematical generation, sculpties do it by by applying modifying the placement of all the triangles in a predefined grid. Mesh is the most unconstrained method of all, because you can define where every triangle goes, and how many there are.


That's it. That's the big deal about mesh. It just gives you fundamentally direct access to to viewer's most basic geometry type- the triangle. That's something the previous two methods did not give you. It lets you be efficient, and precise.

Keeping the in-world experience "seamless"


I would be a complete and utter hypocrite if I tried to claim that everyone should use mesh for everything. That's not the point of this whole exercise. I'm terrifically guilty of several thousand prim builds:




It's true, prims feel great to use, and in many cases, they're good enough. They get the point across and provide an easy way for someone to get up and be creative in a fun way, with little effort. Mesh does not mean this has to end- not in the least.

In fact, mesh can mean new in-world tools for prim builders.

Let me explain.

If you've been following so far, you understand that a prim is essentially a mesh that is generated mathematically. In this manner, a prim is really just a mesh with settings, and predefined faces.

Well you can make your own primitives, for future reuse:



In the above picture I made a simple shape (a doorknob if you have enough imagination :P ) and I custom defined its faces. Now I have essentially a "doorknob prim" that I can re-texture and reuse however many times I want, and the only difference is I have to rez it from inventory instead of the build tool. (Well, you can't torture it either, but if you made the shape,  you shouldn't need to).

Important to note, this is an example of a more complete object, most prim builders will create a linkset of individual prims. The benefit of the mesh method is that you can do more intricate designs, or irregular base shapes, more efficiently, and define their faces so you can reuse them however you like in the future.

Yes, you still need to make that basic shape, or maybe others will make them free for you to use, but in the end you're manipulating them the same way you would manipulate prims, you just have more freedom in how you want to define your prims, and aside from actually creating the shape- once it's made, you can stay inworld and do not break the seamlessness.

One more example

Personally, when it comes to architecture, I like to use prims as a drafting medium- and optimize later on. Here's an example of a mesh version I created of a prim floor my friend had made for me:


In the end, we chose to keep the sim non-mesh, to suit people who still insisted on using non-mesh viewers. 

For my own projects though, any avatar I create will always be mesh :) I've put away my sculpties for good.


Why is this all so important? What does it have to do with OpenSim as a whole?


The more ambitious our projects get in the open grids, the more demanding the requirements will be on ourselves as well as our fellow viewers. If what you're working on fits within the confines of your resources, and the resources of your target audience, that's one thing..

.. but when you start reaching into the geometry count stratosphere of your sim, your visitors are going to feel the slowdown- and that's why it's important to OpenSim that mesh be allowed to flourish. Because of the platform, I've seen users build worlds that are simply immense in their scope. Unlike SL, we can afford to cover clusters of sims, and make them feel like a continuous world. If we're to continue being world builders, we need to understand the limitations of our tools.

45,000 prim cubes = 4,860,000 triangles
45,000 mesh cubes =   540,000 triangles

Mesh easily fits into every level of building there is. If you're going to give it the thumbs down, please, at least consider that you may be blaming it for something that's not its fault. (See top, invalid reasons to despise mesh).

It's just a format with an immense potential, and I never saw anything wrong with more tools in the toolbox. I don't like to hammer in screws.