# Posts tagged ‘Combination Sculpture’

Im current working on some basic frameworks for corrective morph building, weight maps and skinning without the necessity of vertices.

Generating the corrective isn’t the hard part – that is just a simple math formula: base + (combination – target). The tricky part is first making the corrective process seamless to the user; you want them to ramp there blendshapes together, see the problems and quick edit the combination to the desired result. The backend should handle the creation of the corrective, and the order.

Storing the orders of correctives and the absolute results is absolutely crucial in making a system that handles being edited, and rebuilt.

Why do you need order and absolute result of the corrective?

Imagine that you have 3 base shapes. You blend two of them together and build a corrective. Then in turn you use this corrective with the third base shape to make a new corrective. Firstly this is already getting complex and secondly what happens if you change any of the shapes that when into making the correctives?

Essentially you’d be applying the wrong offset to the combination of base shapes resulting in a broken corrective. This is where you need to store the absolute target of the corrective when it got made. Because then you can retrieve this shape and use it in turn to build the corrective again.

You need order because it is crucial! – absolutely crucial to a complex system. If you don’t store the order of correctives you wont know which one to rebuild first, second, third. For example if you build the last corrective first, then the first the last will be broken.

So if we go back to our example with 3 base shapes – these shapes essentially would have an order of 0 – all of them. Then if i was to make a corrective of the first two it would get an order of 1, now using this corrective and the third shape to make the next corrective it would get an order or 2. you see how the order works?

Essentially its whether or not the combination of shapes includes a corrective and if it does you get the highest order of the correctives and add 1 to it. For example if i was making every combination of three (0) base shapes:

0 0 0 – base shapes

1 1 – first order correctives

2 – second order corrective

So if you store the order and the absolute target value of each corrective you can rebuild them after changes have been made to the base shapes. Additional values need to be stored such as the base shapes used and the slot the corrective was placed in, to make the system complete solid.

Building the framework is the key, once you have that in place you can use it to build the toolset to do all the handling of the shapes and corrective.

I’ve just started watching the Gilbert Strang MIT Courseware on iTunes, and highly recommend it – after watching it a light bulb went off in my head. Daniel Pook Kolb’s Blendshape system is very very impressive – but I did’nt and still dont understand it fully.

Thinking out loud here I thought that it might be essentially a form of finding out the ‘unknown’ in a linear combination of an nth dimensional space as the corrective of the combining shapes. For example the unknown of :

x[2,3] + y [4,5] = [6,7] would be [-1, 2] ( its hard to show as i’m not using LaTex atm)

Before any corrective is used the ‘unknown’ is [0,0], this would be synomanous to adding two blendshapes together without any corrective.

I’ve included what would be needed for a non-breakable system for the animators, it includes (in green) some 10 more additional targets needed. In total there’s some 30 targets for 6 base shapes. What key with a combination network system is:

- How many connections a corrective has.
- And how these are connected.

If we split the system down into essentially ‘stacks’ then it can become easier to understand, the first stack is an order of 1 -this is the base stack, then 2 then 3 and so on; for each corrective in its appropriate stack its has the same amount of inputs as the order of the stack. What becomes interesting is the connections, in most cases the last stack drives the next but we also have unique connections such as a 2 stack corrective (6 + 9) driving a 5th stack corrective jumping 3 stacks.

Whats also important in this system is compiling the network when you change a corrective in a stack. On each stack all you need to be doing is generating a corrective and the inputs it requires – compiling this network would go through the connections a build the correctives. What the user see’s/modifies is the final corrective – which is infact a mathmatical ‘messed up’ target working behind the scenes. Whether this is realtime generated thing or a procedural ‘compiling ‘ step depends. Then later takes your ‘asthetic’ target, looks at its inputs and generates the real corrective.

The network is non-comunicative in terms of process – its a left to right system with all the corrective looking only at there inputs with a simple sorting method.

Essentially the ideas of combination sculpture: to model a series of poses and corrective poses that exist in a space governed by wieghts can be applied to any rig – including bone and muscle rigs. All your doing is making poses and corrective poses.

The math behind corrective poses can ofcourse be script so it becomes a simple task of making the combination look right, and behind the scenes do that math to make the corrective shape. For bone and muscle type setups, you’d need ways of storing all transforms of all the joints/controls used in the face as if they were verts and do some corrective transform math to build the corrective pose.

As to making the poses, there seems to be some governing rules, for one, the order of making the corrective shapes. Take for example an n-space of 3 (basically a point3 space, 3 dimensions) , essentially three sliders – we have around 7 poses existing in this space: [1,0,0], [0,1,0], [0,0,1], [1,0,1], [1,1,0], [0,1,1] and [1,1,1]

The last [1,1,1] has to be built last, because it by it’s very nature is the combination of everying, and likewise [1,0,0] , [0,1,0] and [0,0,1] should be made first as there the initial single poses. What happens between these is the tricky part , and especially [1,0,1]. [1,1,0] is a simple extension of [1,0,0] – so deducting from that [1,1,0], [1,0,1], [0,1,1] should be the order, we model the corrective poses.

I took another look at some research on n-space combination sculpture today and the light-bulb ( i think) finally went off in my head as to how it works. Essentially you have four parts:

- A n-space comprised of weights
- A set of targets (i.e shapes)
- An orgin/neutral shape
- A vector (the sum of the weights)

The old ideas of standard blendshapes basically go out the window, but the power you gain is pretty amazing – and in theory can be used for any facial type setup including bones and muscle rigs.

In simple terms, you associate a target(shape) to a weight,this for all instances is standard blendshape stuff – but with n-space combinations you can associate a target to more than one weight.

For example lets say we have two targets: A and B, and there respective weights: w1[1,0] and w2[0,1] remember weights exist in an n-space so if there was 3 it would be as follow w1[1,0,0] , w2[0,1,0] and w3 [0,0,1]. These do nothing atm, until we associate a target(s) to them so e.g target a is associated to w1 at [0.5,0] ( a target doesnt have to be at 1 of the weight)

Still follow? Well simply put we define a space from weights so point1 would be just one weight, a point2 would be 2 weights and a point3 would be three weights.. and so on. If we have a space of the nth number its an n-space so if we have 30 weights, i.e sliders in our rig we have…. yes….. an n-space of 30 dimensions!

Now the clever part comes in that the system basically cant break. The cool part comes in that you can associate a target shape to 1 or more weights(sliders)! so say we set weight w1 at a value of 1 so [1,0] and w2 the same [0,1] we now have a combined value of: [1,1] and this shape combination may not work. So we associate a new shape to this weight vector.

All that changing the value of the weights does is that it moves a vector through the space of what its comprise of eg. 3 weights [.3,0,0] [0,.2,0] [0,0,.7] we have a vector in this space: [0.3,0.2,0.7].

What i dont fully understand is achieving the final, delta. But im working on it – the funny thing is Jason Osipas setup is very reminesent of this n-space idea, working in planes etc. And could easily i think be adapted to work with it.

more to come..