Posts tagged ‘Nurbs’
August 25, 2007
I’ve been looking into curves for quite awhile now, along with waves and dynamics eventually hoping to combine all three. Along with these ive been trying to understand the rules of rigging especially layer and hierachal rigging. A lot of riggers i know dont undestand the idea of ‘layers’ in a rig. In simple terms its like a layer in photoshop but in rigs it free up a lot of issues if you keep aspects of a rig to a layer – so for example your base skeleton could be your first layer, then basic setup then twist, then deformation. So its more like layered relationships – deformation is a good example. If we can modularize deformation in a simple system we can use it all over the place.
Major deformations like skin simulation are outside of this, but twist, stretch, compression and bulge could be driven by one system. If we treat this system as a curve the issue arises is that its not uniform so control objects along it would bunch up so we need:
- A simplified curve, that possibly introduces horners rule (for speed)
- Uniformity across the curve (important if the tangent vectors are straight)
- The ability to overshoot the curve at both ends* (-0.5, 1.5)
*Why do we need this, well basically to allow for length between the points along the curve to be maintained, for example if we dont want the curve to compress the points along it need to overshoot the curve. This can be pretty simply acheived using a subdivision method. To keep a value at the same value i.e a length of 10 along the curve, all we do is divide this length by the curves length eg. 10/100. = 0.1 10/200 = 0.05. Problem comes in if the length of the curve is shorter than the defined length the ‘bucket’ inwhich t resides wouldnt exist. So you need to do some fiddling around. I’ll post some links accompanying this post.
July 21, 2007
Is it possible to get the length of a curve without walking along it, standard methods essentially split it into chunks and measure there total – the more chunks the better the accuracy. I’ll look into arc length and least square methods.
March 18, 2007
Ive been looking into the math behind one of the most powerful math formulas around : NURBS, or non-uniform rational-basis or bezier splines. They have an almost majestic power to TDs and riggers, along with the allusive animated pivot. Once controlled though they offer almost limitless control of a curve using a combination of the rationality of b-splines i.e the weight. And the non-uniformality of all splines i.e the spacing.
I can understand the math, but for the life of me couldnt understand the non-uniformality – its hard to actually visualize like quaternions in a way. But with my code, I started to notice something odd – i think ive been writing the ‘basis’ function with out me even knowing. In working out the percentages in which ‘t’ [0,1] lived in, i had essentially made the knot vectors nessesary for a b-spline. So basically what this means is in theory (its all in my notes atm) that i can write a b-spline basis function that neatly ties into a polynormial function. And therefore in theory Nurbs. Working out the weights its the tricky part.
The amazing thing with understanding the power polynormial function is that your curve can reside in any degree, i.e it can be cubic, quadratic on the fly. Based on the number of knot vectors – this is important as it the larger the degree the more complex the working out is. So if i have a curve of only 3 points, my degree can be 2, and so on. At the minute, im not going to expose the non-uniformality (its just exposing an array of knot vectors), so im just making an URB spline lol.