News
LW Plugins
3D animations and images gallery
Textures
Download
Tutorials
On-line Store
Register a plugin
Subscribe to newsletter
Contact

TUTORIAL7
SmartMorph basics: driven key

In this simple tutorial I will explain how to use one of the powerful features of SmartMorph - driven key. When you start using it you will love it ;-)
I'll show how to use it with a simple eye rig example. My friend Piotr Rusnarczyk created that great character. It suits the need of this tutorial perfectly.

In order to get realistic eye animation it is not enough to only rotate an eye ball. An eye is not exactly spherical and even small its movements cause changes around it. Also upper and lower eye lids move accordingly to eye ball movements. In basic case we will need four corrective morphs for all extreme eye positions: left, right, up and down.
Driving those morphs with SmartMorph is extremely easy - it can be done with only a few mouse clicks.
Let's start from simple eyes setup. Each eye ball is parented to a bone that points to a target. By moving the target user can rotate both eyes and keep them focused to one point.
First of all add the plugin as a displacement to the object you want deform and open the interface. Because you can have as many instances of SmartMorph attached to your object as you need, in order to easily organize your morphs there is an option that allows you to name instances. You can type the name in the last tab, in this case it can be just 'eyes'. You do not have to do it - it is only a small feature that may make your workflow smoother in large and complex projects.
If you are planning to use morphs intensity values over 100% you can change sliders range at that tab as well. Type 150 in max input box and reopen smartMorph interface.
Next go to mixer tab. This tab contains all features from LW built-in morph mixer plus many more. The first noticeable difference is that there are no morphs visible when you start it first time - you can choose which ones you want to use and only those will be displayed. It makes work with morphs easier and you do not have to worry about naming convention to get morphs organized in groups (SmartMorph groups are described later in this tutorial).
Using 'Add morph' button add 4 morphs that will be used for eye deformations: eye_up, eye_down, eye_left, eye_right.
Default SmartMorph mode is set to auto key (small tick near set key button). Personally I found it frustrating in native LW mixer that I wasn't able to turn it off. So in SmartMorph you can remove the tick and keyframes will be created only when you click the 'set key' button. It is quite useful especially when you want only test something. Working with driven keys is also easier and less confusing with auto key turned off.
Now the fun part :-)
Select all morphs (That's right, you can use multiselection) and set 'driven key' from the pop-up below. This tells SmartMorph that you want selected morphs to be driven by something. Now you need a "driver" - an object that will drive intensity value. Please select driver from item list at the bottom. In this example it is r_eye_bone. Also you have to specify a channel from selected object. You can choose any from rotation (H,P,B) or position (X, Y, Z). We want to change morph values depending on the bone rotation. eye_left and eye_right morphs depends on Horizontal rotation, up and down on Pitch one.
ok. So you have selected which channels should drive which morphs, only one step left. You have to tell SmartMorph what value of selected channel represent what intensity value. Let's say for example:
H=0 -> intensity=0%
H=20 -> intensity=100%.
Of course you do not have to specify them manually!

Set eyes target object in position in front of the head so eyes are in default straight position. Select all morphs and set their intensity to 0%. You can do it very easily using fast slider feature: ctrl+click (shift+click set morph intensity to 100%). You also want SmartMorph to remember that value for all selected morphs so click 'set key' (if you turned off auto key). Now all 4 morphs "know" that in that bone position their values should be 0%.
Next move target object to make the eyes look in extreme right position. Select eye_right morph and set its intensity to 100% (shift click on slider). And again you want SmartMorph to remember that so click 'set key'. now when you move target object you will see that morph value will change depending on its position! Just repeat it for other three and your eye rig is finished. No expressions, no typing just a few simple clicks :-). You can set as many keyframes as you want - you are not restricted to only min and max values. Also working with auto key turned off allows you to work all the time in frame 0 (or whichever you want) and you do not have to change time to set up a rig.
So to use driven key the procedure is to move a driver to a new position, change morph intensity and click set key button (if auto key is turned off), move driver again, change intensity... and so on.

You can see morph values in smartSheet window. If you animate target you will see graph with morphs values in time. In this example target was moved in a circle to rotate eyes in all directions.
Orange color in smartSheet means that morph intensity value is over 100%. Green indicates morph set to driven-key.
Those 4 morphs form a kind of group. You only use them together and don't want to mix them with other ones. So why not put them into a group? Select them all and click 'make group' button. In the dialog box that appeared specify the name for that group for instance 'eyes_correction'. You can now see that instead of four morphs in the list you have only one - a new one. This is a smartMorph group. By double clicking it you have access to all its content and you can change whatever you want. But what is really cool ;-) this group works like another morph! so you can again set its intensity, drive it with another object etc. You can also use that group in another smorph tab (sequence). In that simple way you can make new morphs that are combination of existing ones, that can be animated, textured etc.
By setting intensity to 0% for that group you can disable all morphs in that group and you can do it with one click only (ctrl+click).
There is only one limitation: a group cannot contain another group, it can only consist of normal LW morphs (both absolute and relative).
click image to play animation