Friday 26 June 2009

Corrective morph-system

Sometimes. Most of the time. Two morphtargets will not play friends. Meaning that together they move same points in [X,Y,Z] When both are triggered the points get a double-translation that ends in PURE UGLINESS.
To ensure that the result is better, we apply a third morph that fixes the result
This morph is dedicated to only fix this coincidene and is called a corrective-morph

Morph1 + Morph2 = ugly
Morph1 + Morph2 +correction = nice


UGLY----->NICER

Thats all nice.
The problem i had was how to make this system automatic.
When the two morphs are triggered together i wanted a percentage of the third morph to be triggered. Doesnt sound hard? We are actually talking here about two values controlling one value. And there is no multiply/divide-node in max.
The resulting math would look something like this:

Morph1*morph2 = value of correctivemorph/2
But where to write this in max?

So i decided on fixing it on the face-gui level.



The yellow dot is the controller. When moved along Y. it triggers morph1. Along X, Morph2.
Since the extenct of values are [1,1] the diagonal would have to be 45-degrees.
So if i made a another "invisible shape"(the grey rectangle inside the yellow dot) 45 degrees on the controller...its local-axis X would always be defined by the controllers XY. Perfect. One value derived from TWO values.
Pointconstrain the "invisible shape" to the controller and voila!
This localX was easy enough to use to trigger the corrective morph through a ExposeTransform-node.




Thursday 25 June 2009

More Morphs

Shifting volume around can be tedious. but after a while it becomes rather meditative. And you keep moving point/vertices around untill its looking good. :)
This is the mesh that is going to be the morph-target for the inner part of the eyebrow...moving down.


the eyebrow is divided into three. Inner, middle, outer. They have to move: up, down, left, right.
And since the system needs to be on both sides we get
3*4*2=24 morphs just for the eyebrows. Luckily its easy to flip the geomitry over to the right side with the new polygon tools in max.
That little toolbox there with looptools (curve and straight) really makes my day.

Wednesday 24 June 2009

Scripts scripts scripts

I am a beginner scripter. I am really new to it all.
But they are a great way to save you loads of work.

Here is an example:
15 bones are running down each arm the torero. I want them to be maya-style/tendons so i can easily pull them off the rig and make nice arcs etc etc.
That would take me half an hour of quite repetitious clicking/selection/applying/aligning.

Here is a script that does it in one second. It could probably be written nicer and use FN()-functions for some of the things. But it works great!


AxisPointArray=#()
BoneArray =#()
join BoneArray $Selection

for i=1 to BoneArray.count do
(
PositionPoint = point()
PositionPoint.box = true
PositionPoint.size = 8
PositionPoint.wirecolor = color 0 255 0
PositionPoint.transform = BoneArray[i].transform
PositionPoint.name = "Position_" + BoneArray[i].name
join PositionPointArray PositionPoint
)

for i=1 to BoneArray.count do
(
AxisPoint = point()
AxisPoint.box = true
AxisPoint.size = 8
AxisPoint.wirecolor = color 0 255 0
AxisPoint.transform = BoneArray[i].transform
AxisPoint.name = "Axis_" + BoneArray[i].name
in coordsys local move Axispoint [0,0,8]
join AxisPointArray AxisPoint
AxisPoint.Parent = PositionPointArray[i]
)

for i =1 to BoneArray.count do
(
--BoneArray[i].position.controller = position_XYZ ()
BoneArray[i].position.controller = position_list ()
MyposConst = Position_Constraint ()
MyposConst.appendtarget PositionPointArray[i] 50
BoneArray[i].pos.controller.Available.controller = MyposConst



)
for i=1 to BoneArray.count-1 do
(
Aimer= lookat_constraint()
BoneArray[i].rotation.controller = Aimer
BoneArray[i].rotation.controller.constraints.appendtarget PositionPointArray[i+1] 50
Aimer.lookat_vector_length = 0
Aimer.PickUpNode = AxisPointArray[i]
Aimer.upnode_world = false
)

-------------------------
------------------------
And here is what the script does :
Adds the green points to the correct-places and binds the bones to the green points.

NamingConventions

Some quick thoughts on naming-conventions for objects in the scene.
Right now, my torero-scene consists of 1199(!) induvidual objects. Each of those has a purpose and a lot of time it can be hard digging after then in the viewport. Or maybe i need to access them through scripts.
So I used a naming-convention that goes like this: (in this case the controller for the left shoulder) All in studleyCaps

-ToreroCtrlShoulderLeft
1. The charactername
2. What type of object
3. What part of the torero
4. What side of the torero, unless its an object on the mid-axis. e.g.Spine.

-ToreroBonePinky04Left
Here is another example to show numbering. I have many bones running along each digit of the hand of ther torero...and I number them BEFORE i write "Left". No real reason. I just think its less messy.

A great tool for mass-renaming is wahooney´s rename tool (he has lots of great script)
head over to www.wahooney.org for more :)
True, max comes with a mass-rename tool already, but wahooneys just have tons more flexibility

MorphTargets

This is the peak of tediousness ;)
To be able to animate the face of the torero i chose finally to rely on morphtargets.
Morphs are "tweaked" versions of the object. A target-mesh so to speak. When i drag a slider, i want the toreros face to go towards that target-mesh

Originally i planned doing this more parametrically by rather skinning the lips etc to point that where floating over a nurbssurface to always retain volume and art-direction... but i costed more than it tasted in the end. Specially since max is operating with a somewhat outdated (hah! its a decade old, for sure!) morph-system. I ended up having nightmare about points not moving linearly in XYZ-space. And i wasted two good days.
-lesson learned: The way that is best is the way that works.


(a third of the shapes needed)
One shape just tweaks a little exclusive part
of the face. e.g.
-upperlip-upwards
-eyelid-down
-Eyebrow-inwards
etc etc etc.



this picture shows the facial-control-panel(!)
in action. Those small yellow dots represents a
specific area of the face. When they move, the
corresponding area shapes with that movement.


Here is a quick view back in time from when I was modelling the head of The torero.
So much fun! :)

The Rig

This system took me a while. I must make my own rigscript for the next time around so i dont have to repeat this prosess anymore. Its the fifth time i make rigs, and the process isnt becoming more fun. just more tedious as my ambitions grows.

For those you who are not "techy". A rig is a skeleton that drives the virtual puppet. Those colorful-curves that seems to be floating around is the "controllers" that the animator grabs to animate. They in turn drive the skeleton.

For those of you who ARE techy:
-i wanted to try out a couple of new things on this rig. The elbow consisting of multiple joints was one of them. So i could have more or less the same volume in his elbow while bending the arm.
The same technique is applied to the shoulders and i am very very happy with how the deformations turned out. There was no need for additional skinmorphs in the shoulder-area (armpits not included...they were another story..)


(Click on image for a larger view)



to do list on the rig:
-finish facial-rig
-fix some bloody twist-bone-errors on the upper-legs
-fix the jacket with morphs or something while rotating chest to the sides and forward

Here are some images of the model:

(click on images for a larger view)




And i found some OLD drawings as well :P





Here are some images of the set i am modelling(no colors yet!):
The dressing-room is located in a quite luxurious "hall" in the back-end of the Arena.
On the podium is where the mirror is located and most of those 40 seconds will be viewed THROUGH the mirror.






(some "details" :P)

Torerego Just got its own BLOG

Hi, My name is Stein Lotveit. I am a Norwegian animator currently living in Madrid.
Between projects and work I try make my a shortfilm that is called "Torerego".
This blog is to serve as a production-diary and also function as a mean to push myself to work harder and publish my progress :)

About Torerego:
Torerego is going to approx. 40 seconds (wow, that IS short). The film is about a Torero in a dressing-room. The medium for the film is Animation done on computer.
I want to make the quality as high as possible, So its still going to take quite a while to finish.
At the time of writing the project i have completed:

-modelling character
-75% finished character-rig
-modelling 1 set

yet to complete:
-story-editing
-rig
-texturing
-shading
-animation
-lighting
-Image-postProduction
-sound