Archive for January, 2013

mama

The second movie I’ve worked on is out soon. It’s called Mama, and trust me, the trailer does not show even a corner of the creepiness.

Without giving too much away, I worked on an important shot during the climax of the film, and I rigged Mama’s hair.

Tags: ,

spline IK overshoots

I’m constantly attempting new setups in rigging. Usually this is out of necessity, such as when current scripted setups don’t behave reliably or deliver the desired result with new models. Other attempts are me exploring things about my setups with which I’m not one hundred percent satisfied. I’ll keep doing research until I find a setup that works as I feel it should in the majority of situations, stably and predictably.

Stretchy Spline IK is something I’ve never liked because of the way its chains overshoot the end of the curve when the spline’s curvature is too great. I’ve never worked in a studio that had its own custom Spline IK solver, where this problem is non-existent, so I research solutions whenever I hit the issues that stretchy splines always bring.

Recently I had a thought about using live sub-curves of a spline (using the Maya subCurve node). I’ve always figured that the overshoots are due to floating point rounding and the fact that measuring a nurbs curve is an inexact science; curves are sub-samples a few thousand times, and the distances between points are summed.

(Before you ask, I use splines because they’re easy and light when you need to be able to lock a chain to a minimum or maximum length, but still allow stretching. I have not found a fast way of doing the same using a nurbs ribbon.)

I wrote a custom node to extract sub-curves by length along the original curve (using MFnNurbsCurve::findParamFromLength), then attached joints to each subCurve with Spline IK. I figured that sub-curves made by length would lock each joint in place, and that somehow this would work around the overshoot issue.

Boy was I wrong.

Turns out the assumption I’ve had for a while– the same assumption I’ve heard from other riggers– was itself incorrect. It’s not that the lengths aren’t being measured accurately enough, but that as the spline curves in on itself, the effective lengths of bones on it should shrink because the bones can’t bend to match. Obvious in hindsight, but it caught me by surprise. It’s like Manhattan Distance: in Euclidean space you may only be two kilometers from that pizzeria you love, but you end up walking three kilometers to get there because Euclidean distance doesn’t take into account the fact that we can’t pass through buildings. (Or: that sewers are winding and not always as easy to traverse as the city streets for your average turtle.)

On the up side I can think of a few good uses for the sub-curve node I made, so the experiment wasn’t a total loss. I also have a few ideas of how to use the curvature of the driving spline to come up with a scale value, meaning I have new experiments to carry out.

The test proved to me again that it never hurts to pull apart an established method in an attempt to do it better. “White belt mind,” a teacher of mine used to say– try to never lose that initial state we all have when we begin something new and are constantly trying to learn.

Tags: , ,

normals display in blender 2.6x

I was working on a simple mesh in Unity in Blender 2.65a and I could not for the life of me remember how to show normals (to find some flipped normals that were causing faces to show improperly). Some spots say that the normals are displayable from the N-Key panel in the 3D view, but I thought a more concrete bit of information in order.

First, the normals are only displayed in edit mode. While in edit mode, if you mouse over the 3D viewport and then press the N-Key, you should see buttons appear in the N-Key panel under the Mesh Display category. Pressing one of those buttons will either show vertex normals or face normals, respectively.

The Mesh Display buttons that appear in edit mode.

Nice thing about Unity is how it updates; I love that saving over an old FBX file will replace every instance of the mesh in scene prefabs, provided you haven’t done anything wacky. One save and all the normals get set to where they need to be. Not to mention, the Unity 4.0 interface upgrades are a great addition!

Tags: , , ,