1 Tutorials LightWave 3D Smart skinning in LightWave 7.5 Qua Jan 26, 2011 4:04 am
Admin
Admin
by Michael Green |
The bones system in Lightwave I've found to be one of the fastest and most flexible bones systems available in terms of deformations. You have the options of controlling your bones with weight maps, or letting Lightwave's own bone falloffs calculate them for you, without having to paint weight maps. It has muscle bulging built into the bones, and this too can give useful results. But what if you want a little more control over how a joint deforms as the bones rotate? What if you want the elbow to come out a little as your wrist does a deep bend? A technique called Smartskinning has been developed in which you associate a morph or a series of morphs with the rotation of a bone, so you always get perfect deformations. As your arm rotates to ninety degrees, it morphs the polygons around the elbow into the perfect shape for that amount of bend. It's possible to set up such a system in Lightwave, and I'm going to show you how. First of all, this technique is entirely produced in Lightwave's Layout, you don't need to enter Modeler at all. This is useful for the particular way I do this, as it means you get to see the final result immediately, you can use it in conjunction with some of the other deformation tools in layout (including the bone muscle bulge facility), and you don't need to use weight maps on your object. As I very rarely use weight maps, (I find them fiddly to set up in comparison with the normal bones system in Lightwave) this is useful to me, whereas other smartskinning methods are Modeler and weight map dependent. Anyway, onto the tutorial. First of all, download these two FREE plugins: FI's Minimo, which allows you to animate in points in Layout(very useful in itself, but handy here too); Morphdriver CF, (which allows you to link a channel to an objects rotation, even taking into account IK) OR Smartskin (which is a displacement plugin which does a similar thing). [Tens de ter uma conta e sessão iniciada para poderes visualizar este link] Add these plugins to Layout by pressing alt-F11 to bring up the Plug-in panel. Click the Add Plug-ins button and select the plug-ins in the browser. Press alt-F9 to bring up the Keyboard shortcut editor, and click on FI's_Minimo under the Plug-ins sub-tree on the left hand side. Click a key on the right hand side and then click Assign, or just drag the item onto the key to assign it. I use shift-m which I can remember easily. Okay, now we're set. Load your mesh (Under the menu Items>Add>Objects>Load Object), and add bones to it, either by converting some skelegons (under the menu Items>Add>Bones>Covert Skelegons) which you had previously set up in Modeler or by just drawing them out in Layout (Items>Add>Bones>Draw Child Bones). Select your mesh object, and open the Item properties panel (press p). Set the Geometry>Subdivision order to 'last'. Now we're going to set up the arm. Drag the frame slider at the bottom to frame 10, bend the elbow to a good angle (press y and click drag the rotation handle). Key it (press enter), then at frame 11, Items>Tools>Reset it, and key it when it's straight. With Minimo, at frame 10 we'll create a corrective deformation, and turn this into a morph at frame 11, which won't have the bone deformation saved in the morph. I usually make the elbow bone use 'joint compensation' / 'joint compensation for parent' and 'muscle flexing for parent' (found in the Item properties panel (press p)) as this gives a reasonable deformation to start with. You don't necessarily have to use this. Interestingly, you can use negative values in these fields which can give useful results. Experiment with your own rig, you may not even have to use a corrective morph! Target your camera at the elbow bone and move it into a position where you can see the elbow easily. This makes it easier to use minimo. Go to frame 10. Add 'FI's_MinimoDrv' in the Deform>Add Displacement plugin list. Open Minimo's generic plugin. You should see the elbow in the preview window. If not, try selecting the camera from the View drop down (menu item 1 in the diagram below) and the joint should appear. This is useful if your view becomes unusable, as you can go back to the original camera view to start again. Note, because you can select any camera, you could set up a camera for each joint, or for multiple views for a single joint and easily switch between them. Minimo is a non modal panel, so you can switch between it and the main interface with no problem. This means you can also adjust the camera for a new position for the view if desired, and Minimo will use the new position in it's interface. However, you can use alt-LMB/ alt-RMB/ alt-ctrl-LMB/ alt-ctrl-RMB to rotate around any points selected in minimo in various directions. Use alt-shift-LMB to move the view, and alt-shift-RMB to zoom the view. Note that if you have no points selected, the view will rotate around the pivot of your mesh. Most of the options are self explanatory, but here's a few interface tips: LMB-drag transforms the selected points. RMB-drag draws a selection box. Drawn over points, it selects them. Drawn over empty space will deselect them all. Shift-RMB-drag adds to the selection. Ctrl-RMB-drag subtracts from the selection. 2 allows you to switch between multiple meshes, each of which must have the minimo drv plugin applied. 3 allows you to put a Background image in the view, say a photo of a joint, so you can work more accurately. 4/6 allows you to hide everything in the view apart from a vmap such as a selection set, uvmap etc. If you have the bulk of the mesh hidden, minimo will just rotate around the unhidden points. This makes it much easier to edit the mesh. 5 allows you to choose between moving, rotating and scaling the selected points. Modifications are performed in real time, so even though the view doesn't show the sub-divided mesh, you can see the deformation in layout's main window. All transformations are applied in the plane of the viewport, so you may need to rotate the view around your elbow to get the points to move in the right way. 7 allows you to change the mesh's display to unmodified by bones or deformed by bones. REMEMBER to set 'Timing' to 'After bone' to see the bone deformation of the joint. 8 deletes the keyframe for the selected points. 9 creates a keyframe for the selected points. The points aren't keyed till you press 'Create', so remember to click this if you're going to scrub the timeline, as the points will reset positions!! 10 indicates the current frame. 11 also indicates the current frame number, you can use this to change which frame you are on though! 12 allows you to skip to the next/previous keyframe. 13 allows you to clear any modifications from the selected points. Once you have achieved a good deformation for your elbow joint using minimo, (remembering to keyframe your modified points!) select your mesh, and go on to frame 11, the unbent arm. The Minimo deformation will remain. Select your object and go to File>Save>Save Endomorph and give it a name like 'Joint.Elbow100P' (for 100 degrees around the Pitch). Save your object to keep the endomorph! Deactivate the MinimoDrv plugin by clicking the tick next to it in the Deformation plugin list. Add the Deform>Add Deformation>MorphMixer Plugin. Open it and go to the Joint tab (this is made because we put 'Joint.' at the beginning of the Endomorph name). Open the Graph editor, and select the Joint.Elbow100d channel. In the 'channel bin' on the left hand side, make sure you have the morph selected. Click the Modifiers tab, Add modifier Morphdriver CF. Open the panel and select the Elbow bone in the Target drop down, and the channel to use in the Channel drop down (all very easy!). Enter the angles for the minimum 0% morph and the 100% morph, or alternatively, move the time slider back to frame 10 and click the Rec Item button by the Max value, and got to frame 11 and click the Rec Item button next to the Min value. The Mid value allows you to skew the morph so that comes in quicker or slower as the joint bends. Close the panel and scrub the timeline. You should see the morph applied as the elbow bends. This will work with IK motion too, so you should be able to set the rest of your character up easily. There you are, a morph specifically designed for a particular joint on your mesh. And you didn't need to go into Modeler to do it! I hope this has proven useful to you and that you find many more ways in which to use this technique! |