What's New at New Media Arts Inc?

Have you visited the new NMA Website?

Visit our new website:

NewMediaArts.org



Use the comment sections to tell what you think!
Showing posts with label OpenSim. Show all posts
Showing posts with label OpenSim. Show all posts

Thursday, April 28, 2016

Blender: Weight Paint tools list for OpenSim avatars

Mesh tats, separate tube top
I started learning to make rigged avatar attachments for Flying Saucers Return in 2013, while I was crazy with pain and loaded on an assortment of chemo drugs and morphine. My point: anyone can learn this. It takes time, patience, a good eye and imagination and a little arithmetic. It doesn't take high-level thinking. The hard part for me was finding the tools in the Blender interface. So I made a list, and here it is.

This is not so much a how-to, as it is where the Weight Tools are, though I've added a few suggestions along the way.

I'm using the Avastar plugin for this example. If you're not, you've done the extra steps to import your skeleton from the Linden Lab Wiki, and have parented your mesh model to it, or you got the Avatar Workbench (a better idea) and are working with that. It doesn't affect this list significantly. 

I'm assuming that you've already worked on weighting clothing, starting with a mesh model that fits closely to the avatar body, because it's a good way to learn. There are great tutorials out there – I learned much from the Machinimatrix and Aine blogs. Medhue is another artist well worth watching in his video tutorials. I've also learned a lot from Ben Simond's "Blender Master Class" - you'll want a paper copy unless you can see the illustrations on a large enough screen.

Chiton, needs work
The model I'm using for the examples here is not a close-fitting piece of clothing, it's a loose chiton, which in real dressmaking is a piece of cloth folded over and pinned at the shoulders, belted over or under the foldover. You can make it in about 10 minutes with a sheet. Modeling and weighting is not so straight-forward, as a lot of vertices are too far from the bones for the default weighting to work, and I modeled it so that I can texture it as though it actually was a single piece of cloth. I'm weighting it in two sections - top and skirt, just to keep from going nuts. I may join them later.

If you've studied up you know that you need a well constructed clothing mesh model, made out of quads with rows and columns that wrap evenly around the outside of your avatar model, with enough vertices around the joints to move where it needs to move. If it's symmetrical on the x-axis, it'll be easier to weight.

The goal: After weighting you're going to want to see your clothing mesh vertex rows and columns moving evenly while you move the bones to the most common poses - walk, sit, dance - without overlapping vertices or spikes. Each bone's influence should show as gradual changes in the weight colors.

A vertex with 1.00 (all) weight from a bone will show as red in the weight mapping for that bone. 0.00 is dark blue and orange–yellow– green represent the values in between.
If you have switched your mouse buttons (File>User Preferences>Input) to select with the left mouse button instead of the right, so that it's easier to shift between Blender and other software, then control-left-click to select a bone, and shift-left-click to select a vertex in Weight Paint vertex masking.

Memorize this:
  • Each vertex in your model will need to be weighted by at least one bone in the armature (the avatar skeleton).
  • No more than four bones can influence (weight) a vertex.
  • The numeric value for weighting for each vertex – the 4 bones or fewer that influence that vertex – is a percentage that must add up to 1.000.  
I'm not covering “fitted mesh” here – once you get the movement bones under control, fitting to the collision bones is frustrating, but not difficult to understand. The setup is different; the tools are the same. 

I'm using the Blender Default editor, with one modification – my bottom window is a UV editor instead of the Timeline editor (bottom far left box).

Most of the following is context sensitive – you won't see the tool until you have the right thing selected.

THE LIST
Outliner
Outliner, at the top far right, is the list of the data in your file – in this case your armature and its components – Animation, Pose, Bone Groups,
Avatar_meshes, and your clothing models.
  • In my example here, I have two pieces of clothing – the two parts of my Chiton, each bound to the armature and within its outline.
  • The eye icons on the right are useful to hide or show what you're working with. In the example I have the armature visible, the upper body mesh visible, the two pieces of my costume visible, and the Chiton top selected.
  • You can use the Outliner to rename or delete components of your scene
  • You can use the Outliner to select items, very handy in a crowded scene.
Properties Window, just below the Outliner, on the far right. This window has a series of tabs, labeled by icons.
Properties Window, Object tab
  • Object tab (cube icon)
    • If you have your armature selected in the 3D-view window, scroll down to Display, and you have some choices. I have X-Ray clicked, so I can see the bones under the mesh models. If you scroll down a little further (if you're using an Avastar armature), you'll see Avatar Shape, Avatar Appearance, Avatar Materials, and Expressions tools, where you can make or upload custom avatar shapes and change the avatar mesh display.
    • If you have your clothing attachment selected, the Display area changes to offer other choices, such as Wire, X-Ray and Transparency, which you should play with and see if they might be useful to the way you work. I occasionally check "Wire" but usually leave all this blank.
  • Object Modifier tab (wrench icon)  With your costume piece selected you can see your modifier stack. The one we're interested in here is the Armature Modifier, called Avatar Modifier if you're using an Avastar armature.
    • “Vertex Groups” should be checked, and, usually, “Preserve Volume”, which helps. Look up "quaternions" if you want to know why.  
    • Properties Window, Modifier tab
    •  Leave the other check boxes alone, AFAIK they're not compatible with OpenSim avatars.
  • Object Data tab (vertex triangle icon or armature icon)
    • With your clothing model selected in weight paint mode, look at Vertex Groups.
    • If you're using Avastar, Vertex Group assignments are created when you bind your clothing model to the armature, otherwise, depending on what model you imported, you may have to set up and assign vertex groups yourself.
    • When your model is in Weight Paint mode, and you select an armature bone (Pose mode), the name of that bone shows up in the bottom left of your 3D-Viewer window. Depending on other settings, the weight painting (the rainbow colors) for that bone might not show up in your 3D Viewer but you can force the display if you also select the vertex group for that bone under the Object Data tab.
    • If Vertex Selection Masking is on, you can
    • Properties Window, Object Data tab
      • Assign or Remove vertices in the vertex groups (experiment with this before you use it on something you care about) 
      • Use the Select or Deselect buttons to see which vertices are being influenced by which bones. If you're modeling something tight that closely relates to the avatar bones, such as a catsuit, the default vertex group assignments work pretty well. For loose clothing, like my chiton, where the vertices are further away from the bones, I'll end up changing some of the assignments. 
      • You can delete bone groups that you won't be using. 
    • With your your armature selected, rather than your clothing model, you'll see the armature icon instead of the vertex triangle icon for Object Data. Lots of interesting information here. You can select what you want displayed for your skeleton, such as Stick vs Octahedron, bone names, shapes, Xray, etc. Avastar also lists this stuff with useful presets in the Tool shelf. The rest of the settings are mostly for making animations.
Menu “Header”. (see image below) Below your 3D view window. You're already familiar with Object and Edit modes, using the Tab toggle. To toggle between Object mode and Weight Paint mode, it's Ctl-Tab, which is useful for seeing how you're doing with the weighting, if you have a texture applied to your model. 
  • For simple models that follow the bones directly, this is all you need, with the Weight Brush Tools discussed below.
  • For loose clothing that has more complex movement, you'll need more: When your clothing model is selected in Weight Painting mode, two cube icons appear in the Menu Header. The one on the right is “Vertex Selection Masking”. 
  • Vertex Selection Masking shows the vertices that you're weighting. Weighting is a percentage relationship between vertices and the armature bones. If you can see those vertices, it's easier to see what's going on. If you switch to Edit mode you can select rows or columns of vertices, and that selection will also display when you switch back to Weight mode with Vertex Selection Masking selected. It's much easier to make useful selections in Edit mode than it is in Weight Paint mode.
  • [NOTE: switching between modes can cause Blender to crash if you hit the wrong key with your left hand. Save your file each time first – ctl-S]
  • Just to the right of the mode selector is a view selector - you may like adjusting the weighting of vertices in wireframe mode with Vertex Selection Masking selected - it's easier to see if your rows and columns are staying straight.
User Persp., Property Shelf activated, Torso bone selected, mTorso group selected, Vertex Selecting Masking on, and a single vertex selected to see the incorrect weights. 
Properties Shelf.  Just to the right of your 3D view window, toggled on and off by hitting the “n” key. If your clothing model is selected and in Weight Paint mode with Vertex Selection Masking selected, and you select one vertex (shift-click), a Vertex Weight window appears (make sure you're on the All tab in this window), where you can see which bones are affecting this one vertex and use the sliders to adjust the bone influence.
  • One cool thing about working with one vertex at a time is you can really see what's happening in problem areas – use the sliders until the vertex is in the right place for the pose, then don't forget to hit “Normalize” to recalculate the arithmetic. Other options to Normalize the percentages aren't as good.
  • This is where you find out that which vertex you work on next matters – sometimes you can't move a vertex where you want it to go for that bone rotation until you've moved the ones around it, or even several rows away. 
3D-View window. We're usually working in User Ortho mode, but sometimes it's easier to work from the inside the model, and for that you need User Persp mode. Numpad "5"is the toggle between the two modes.

Tool Shelf to the left - Weight Paint Brushes and other tools, Vertex Mask Selecting on, a single vertex selected
Tool Shelf. Far left panel, toggled on and off with “t”. When your mesh model is selected in Weight Paint mode you'll find Weight tools – usually the top tab called “Tools”. How you use these depends on the model you're weighting. 
  • Weight painting takes practice and patience, and is both logical and intuitive. If you're making something to emulate soft fabric and you raise the left collar bone, you're going to want to see the vertices at the top of the shoulder and arm follow the avatar mesh, and the vertices under the arm and around the top of the chest and back lift a little while draping around the avatar mesh. For something stiffer, like a leather biker vest, the whole side of the vest might lift and swing out.
  • My brush settings are usually: Add or Subtract brush at around .005 strength, or Blur at .250, radius depending on what I'm working on. But everyone's work flow is different. 
  • I keep Auto Normalize (right under the weight brush sliders) checked, which keeps the total weight on a vertice at 1.00 while using the brushes, so if I'm using the Add brush, it adds weight from whatever bone is selected in the 3D window, and reduces weights from the other bones involved.
    • Auto Normalize can have unexpected results, especially with the Blur brush, so if something has gone wrong, you may have to go back to vertex groups in the Properties Window and Vertex Weights in the Property Shelf, to discover that, for example, your left ankle somehow got involved with your right shoulder vertices and you're going to want delete some vertex group selections or bone weights in the Vertex Weights. It happens. It's not pretty.
  • It's easy to accidentally involve more than 4 bones. My chiton got hip weights in the areas under the arm from the default weighting assignments, blech. 
    • The bones you don't want involved might not be the ones that get deleted by using the “Limit Total” tool (below the Weight brushes).
    • “Normalize All” can be useful, or a mess, for mesh models that don't follow the bones directly. 
    • With this model, I might need to deal with problem areas by looking at each vertex in the Properties Shelf and deleting bone settings individually. Or at least look at a few from a problem area to see where they're going and go back to Vertex Groups in the Properties Panel to check for vertices in the wrong places.
  • In the Tool Shelf under Options I usually have X Mirror and Topology Mirror checked, and that's great while working on the central bones, maybe not so good working on arms and legs.
  • It won't ever be perfect, and you'll end up making an alpha layer to hide the avatar mesh bits that poke through in more extreme poses. I'll repeat the goal here for cloth or leather: smooth transitions between weight paint colors, even rows and columns where possible, no overlapping vertices or spikes.
If you're using the Avastar plugin, then you already know that most of these tools are consolidated, rearranged, and enhanced in the Avastar tab in your Tool shelf.

And that's it! These are your tools.

I almost certainly missed things or wrote about them without nearly enough clarity. Suggestions are welcome.  

last updated 5/7/2016

Friday, April 1, 2016

Avatar Repertory Theater - past, present, future

 
With the words that Shakespeare gave Miranda: "O brave new world that has such people in it!"

When Iain McCracken (Sodovan Torok in Second Life) and I founded Avatar Repertory Theater in 2008, there were already several active live theater troupes in the grid.

Talk of live theater in Second Life had started much earlier, of course - Thinkerer Melville (Selby Evans) had been discussing it in forums as early as 2005, working with playwrights, waiting for the technology to catch up. Adele Ward (Jilly Kidd) had experimented with poetry readings - streaming sound via telephone hookups inworld - a 1-5 minute lag from speaker to hearer.

Then "Talk", live voices, finally arrived to our virtual world in 2007, and we could get to work. Act Up Theatre, founded in 2007 by Upo Choche, also experimenting with various ways to get sound and sight to audiences, staged productions in late 2007, suffering through and dealing with many technical problems - avatar movement lag, software crashes, show cancellations because it was impossible to keep avatars, their voices, and a few dozen audience in the same virtual space. It was fun, and addictive.  

Paggles Whitman and I kicked off 2008 in January with "Sex, Death and Religion", a theatrical presentation of each other's poetry to celebrate the building of a Greek Amphitheater on Cookie sim. You can read about it here: in James Braman's "Handbook of Research on Computational Arts and Creative Informatics". Because we kept it simple, with a small cast and minimal sets and props, we managed a couple of shows with no crashes, no interruption to the sound. Whew.  
  
That was followed swiftly by In the Pink, unstaged readings of original works, The Bacchae, produced and directed by Phorkyad Acropolis (Stephen Schrum), back at the Greek theater, and two more productions by Act Up Theatre Company - original plays of "Unexpected Detours", and Shakespeare's "A Midsummer Night’s Dream".  All were amazing, g
round-breaking and suffered much from technical disruptions.

It was during the Shakespeare that Iain, who just finished his scene as Wall, and I found ourselves, avatars that is, behind a bunch of huge sculpty trees, thinking.  The Midsummer set was magnificent, the actors and directors full of talent and chops brought from the "real" world, and I was a forlorn and cranky Titania who could not get my avatar onstage. Stuck in the forest. Couldn't run my camera around the trees without skipping out beyond the theater dome, couldn't find my way through the tree trunks, lost. Iain, a superb programmer and scripter, rigged a vehicle attached to a dragonfly avatar, flew me onstage, dropped me off at my mark, got me through the rehearsal.  


And then it came to us. Virtual theater is about the tech. Unless enough people in the crew and cast have a solid technical understanding of simulator resource limitations, what a viewer's video card can handle, how to handle voice and sound effects and avatar movement limitations, the artists and actors will not be seen nor nor heard very well.

We needed to start another virtual theater company, on an entirely different basis. So we did. Even in 2008, we thought it possible that virtual theater would move beyond Second Life, so we named it, after some brainstorming, Avatar Repertory Theater, aka A.R.T. We recruited a few people we knew who were talented actors and easy to get along with, and who brought other skills - sound engineering, set making, avatar design, animating, directing, dramaturgy, publicity, administration.  Kayden Oconnell, Micki Nikolaidis, Rowan Shamroy, Dolgoruky Umarov, Em Jannings, Thundergas Menges joined us.  Selby Evans donated space on Cookie sim in Second Life, JubJub Forder gave us props and set pieces.  We had a company.  

We were offered a set of short plays from a playwright group that Selby Evans had been running the previous year. We picked three and built and put on our first show: "Tales from the Metaverse", performing at JubJub Forder's shopping mall and at Cookie sim. Thundergas made a machinima of one of them - Masquerade, which you can see at our website, www.avatarrepertorytheater.org.

Then we immediately started working on Shakespeare. Our founding members recruited more actors, we grew. The Tempest for February 2009, with dragons in the cast and audience, a whole lot of virtual water and an enormous steampunk ship. 

By March, 2009, Kayden Oconnell started
d a weekly show for us to experiment and improvise. "A.R.T. Plays Around" began and that's where we worked out the technical and artistic abilities that are in our "knowledge trunk" now. How far the Talk channel travels in a sim. How much lag there is in live Talk and how to compensate for it. How to handle our equipment and settings so that we sound good, look good, and don't crash. How to cover for each other so the show goes on even when we do crash, lose sound, or all our clothes disappear. How to adapt a play so that we can perform it in this new medium. How to design a set that rezzes fast and that the avatar actors can navigate without falling off or getting lost. And much more.

Yes, we move our own avatars while we're talking. It's all live.  

By 2010, this and another project I started in 2006, Antique Pattern Library, were becoming so active, with revenue, expenses and potential tax problems, that I started New Media Arts Inc with core people from each project, and we got our 501(c)(3) tax exempt status so we could raise a little money and put a more secure footing under the projects. NMA has grown too, and taken on a life of its own. www.newmediaarts.org.  

Over the next seven years of ART, troupe members joined us, troupe members  left - some because of personality conflicts, more because this is a hugely time consuming activity.   

By Plays Around's last show in 2015, each show was no longer an experiment. It was generally a fully staged one hour show, with sets, costumes and animations. There's a list of them here: A.R.T. show archive list

A little less than 300 shows in seven years.  Most were small, some took our building and avatar designers a year to build. A total blast. But too much for unpaid volunteers, too much for anyone. Also, and this is important, by this time over half of our troupe was becoming so successful in real life live theater, television and video, that they no longer have time to do much virtual theater. That really is a good news/bad news situation! A success story for the actors, and that makes me happy. 

We now have a core of about half a dozen actors who are fully trained in virtual world voice over, avatar movement and animations, costume and prop rezzing. Another half dozen or so, equally gifted, who perform with us when they have time, plus technical, publicity and other support. 

We're in the middle of major transitions. We're travelling out to the hyper-grid - OpenSim grids where we can travel from one grid to another, each with a virtual "Suitcase" to carry sets, costumes, props and animations. Hamlet at AvatarFest, scenes from Midsummer Night's Dream at the OSCC. 
We're  producing videos - "Flying Saucers" is out and one of our teams just uploaded a set of tutorials for OpenSim newbies. We have a 16-sim OpenSim world, Cookie II, hosted at the Kitely grid, with space for all kinds of events and performances, along with privately accessed smaller worlds for producing videos. Projects in pretty much all the planning phases. 
I'm excited.





If you'd like to donate to the cause, you can do that right here 
 Click to support New Media Art's general fund.
-
If you shop at Amazon, you can sign up at Amazon Smile, and they'll donate a small fraction of each of each payment to NMA:
-






Monday, April 13, 2015

A great Blender tutorial


Aine's OpenSim blog jumped out on my screen today. For all of us who don't have formal education in 3D graphics and want to learn Blender anyway, her tuts are, in my opinion, the best for getting over the hump on the learning curve.

The short version and my take on it:

We should model with 4-sided faces that loop around your shape logically. That's textbook. Then, and here's where I wasn't quite getting it: convert the quadrangles to triangles before exporting to OpenSim or SL. Or it will get done for you, and not the way you'd want. Pay attention to the angles of the cuts. The faces texture better if the edges of the faces are going in similar directions, in relation to the shape as a whole. Rigging works better, too. 

Before you export make sure that all the faces are pointing outward, so the textures land on the visible side of each face. Blender can usually do that automatically (Edit mode>Mesh>Normals>Recalculate).