Adding Animations

Note: though this tutorial refrence .lwo files, files from any supported 3d application can be used.

It s time to add animations to model.Switch to script (S shortuct). Serious Modeler supports various 3d object formats as animation frames.

From Lightwave frames can be exported in couple ways:
1) use of save transformed function from Object panel (painfull if you have more frames)
2) applying savemorph plugin in Object displacement tab.

Every frame in animation is represent with single .lwo/.3ds/.obj ... object (for example if you have object walk in 30 frames, 1sec, you will have 30 .lwo objects representing walk saved from Lightwave). In archive with headman model is folder called Frames where all frames are stored. In script add after these lines

ANIMATION Default_Animation	<- usually default position used for adding attachments and textures
SPEED 0.1
HeadMan.lwo

new lines describing animation called Walk

DIRECTORY Help\Modeler\Headman\Frames\Walk                      <-- path to files
ANIMATION Walk <-- animation name
SPEED 0.055 <-- single frame lenght
13.lwo <-- list of all frames in animation
15.lwo
17.lwo
19.lwo
21.lwo
23.lwo
25.lwo
27.lwo
29.lwo
31.lwo
33.lwo
35.lwo
37.lwo
39.lwo
41.lwo
43.lwo
45.lwo
47.lwo
49.lwo
51.lwo
53.lwo
55.lwo
57.lwo
59.lwo

As you noticed strict sequential numbering isnt required, nor there are any naming guidelines (use of similar names is good since you can easy copy/paste names in different animations). Since Engine supports geometry interpolation you dont need to use all frames from animation (for example every 2nd frame can be left out and animation will still be fluent). Click on Update animation (CTRL SHIFT A) and after few seconds you should have 2 animations in model (Default_Animation and Walk). Browse thru animations with cursors UP/DOWN. Select animaton called WALK and it will automatically start playing (RETURN start/stops animation play). While animation is stoped use cursors LEFT/RIGHT to scrubb thru animation. Open Tools window and select Animation tab to get information about animation lenght (in seconds and frames). Also from there you can speed animation (small number for frame lenght) or slow down animation. With scripting approach to defining animations, interesting effects can be achieved, like creating couple animations from same frames (no extra memory used) or combining more animations into macro animations (for example combining walk, pick_object and walk again animations can be joined in one macro animation called ACTION). In archive you will find script file with all animations defined and their respectively frames in Frames folder.

Note: When adding new animations to model, you cant use Update animation (CTRL SHIFT A), you need to recreate model so Modeler can calculate bounding boxes and precission for all frames of animations in model.