Animations and collisions

With all attachments added we can proceed on importing animations.
Serious Modeler supports Vertex animation system. Every animation in model consist of several frames of 3d objects. Since managing large number of frames could be painfull, its advised to create folder in your player directory with name Frames. In that folder you can have subfolder for body frames, legs frames etc.
On Image50 Lightwave's Layout is shown with Colt setup scene loaded.

Lightwave StainlessSteve-Model twice in Texture and Wireframe
Image 50

First frame of scene represents pose in which player holds colt and knife. This frame will be used for creating COLT_STAND animation for player's body.
From Layout save transformed Body object or use Savetransformed displacement plugin. Save object int Frames_body folder (for example) with name like Colt_stand.lwo. In Serious Modeler open script (s shortuct).
Script should look something like:

;******* Creation settings
TEXTURE_DIM 2.0 2.0
SIZE 1.0
MAX_SHADOW 0
HI_QUALITY YES
FLAT NO
HALF_FLAT NO
STRETCH_DETAIL NO

;******* Mip models
DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\
MIP_MODELS 1
Body.lwo

ANIM_START
;******* Start of animation block

DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\
ANIMATION Default
SPEED 0.1
Body.lwo

;******* End of animation block
ANIM_END

END

Every animation needs name and pointer to files, to create Colt_Stand animation, select this part of script

DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\
ANIMATION Default
SPEED 0.1
Body.lwo

and paste it after Body.lwo line.
Change path,animation name and name of object that is animation. After editing script should look like this:

;******* Creation settings
TEXTURE_DIM 2.0 2.0
SIZE 1.0
MAX_SHADOW 0
HI_QUALITY YES
FLAT NO
HALF_FLAT NO
STRETCH_DETAIL NO

;******* Mip models
DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\
MIP_MODELS 1
Body.lwo

ANIM_START
;******* Start of animation block

DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\
ANIMATION Default
SPEED 0.1
Body.lwo

DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\Frames\Frames_Body
ANIMATION Colt_Stand
SPEED 0.1
Colt_Stand.lwo

;******* End of animation block
ANIM_END

END

Click on CTRL SHIFT S to recreate model (add animation to model). Every time you add or remove something from model's script you need to recreate model. If you update frames in animation or animation's speed you can update model without recreating. Once model is recreated, cycle thru animations (curently 2) with Cursor Up and Cursor Down. For now there arent much to see. Next we will add colt redraw animation. This is animation when player changes weapon (from colt to shotgun or similar). To save on filesize (and speed up animation creation process) and to demonstrate Modeler's scripting strenght, we will use same frames for draw and redraw animation. Image51 shows few frames from Redraw animation (10 frames long).

StainlessSteve-Model Six Animation-Frames
Image 51

Use savemorph displacement plugin or manualy export frames (painfull) from Lightwave.
Open model's script and add lines:

DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\Frames\Frames_Body\Colt_Redraw\
ANIMATION Colt_ReDraw
SPEED 0.12
01.lwo
05.lwo
10.lwo

DIRECTORY Models\Tutorials\Tutorial01\Player\StainlessSteve\Frames\Frames_Body\Colt_Redraw\
ANIMATION Colt_Draw
SPEED 0.12
10.lwo
05.lwo
00.lwo

after

    Colt_Stand.lwo

line.
Speed line defines speed of every frame in animation. If you have 3 frames and speed is 0.12, whole animation will be 0.26 seconds long. Second animation, Colt_draw is done using same frames as Redraw animation but with sequence inverted. This feature of Serious Modeler allows adding more animations but keeping filesize small. Click on CTRL SHIFT S to recreate model (add animation to model). In animation control panel you have now 4 animations. Select Colt_Redraw animation and press Enter shortuct to play this animation looping (Shift Enter) plays animation only once. While animation is playing, in Animation tab of Tools panel change animation frames speed to see different behaviour (Image52).

SeriousModeler describing the Animation Bar
Image 52

This number will be saved in model once its saved, but wont be saved in model's script (replace value in script with new one and update model's animations).
Press Enter again to stop animation. With Shift Cursor Up and Shift Cursor Down you can jump to first/last animation in model.
With Shift Cursor Left and Shift Cursor Right you can jump to first/last frame in current animation.
Continue adding other animations. When you make animations for certain weapon, like shotgun, enable its visibility in atachment tab for visual guide.Save model

Load player model and repeat adding animations setup we did for body. If all went ok, you should have model fully animated (Image53) and ready for adding another 2 collision boxes (swim and death).

SeriousModeler with list of Animations
Image 53

Select "Crouch" animation from Animation control panel, in Attachment tab select any of Body's stand animation (Image54).

SeriousModeler StainlessSteve-Model Crouch-Animation
Image 54

For visual guide, enable virtual floor rendering (f shortcut). Go to Collision tab in Tools panel and add new collision. Name it CROUCH, press c to enable collision box rendering. Leave Width to default 1.0 meter, change Height to something like 1.5 or 1.6 meters.

SeriousModeler StainlessSteve-Model Crouch-Animation Collisionbox
Image 55

We need to add one more collision, Swim collision box.
Select "Swim" or "SwimIdle" animation from Animation control panel, in Attachment tab select any of Body's swom stand animation (Image56).

SeriousModeler StainlessSteve-Model Swim-Animation
Image 56

Click on Add button in Collision tab to add new collision box, name it SWIM. Click on checkbox left from H=W. What it means is that Serious Modeler will apply same values you type in for Width, to Height parameter. Change Width and Lenght to 1.5 and in DY field type -0.75. This means that virtual collision box will be centered 0.75 bellow ground with diameter of 1.5 meters (Image57).

SeriousModeler StainlessSteve-Model Swim-Animation Collisionbox
Image 57