SKA Studio overview

This section will introduce users to SKA Studio (Skeletal animation Studio).

SKA Studio is based on knowledge and some of features of Serious Modeler. Things that were considered problematic like UV data handling, model recreation and general interaction with 3d application are handled differently and more in natural way. Mdl format is history and wont be updated or supported in future (tho it works in world along SKA models).

For more technical info, check SKAInfo.txt file supplied with archive.

SKA models consist of few files which are transparent to users. Main model is now called .smc (SKA model configuration) similar to .amc files that were used previously. They are created in SKA Studio and hold all information needed to create/edit and use model. New "entities" are ASCII Mesh .am which is actual geometry exported from 3d app. It holds all UV data, points, polygons etc. Skeleton is exported from 3d app to ASCII Skeleton .as, it represents bones, with their names and default positions. ASCII Animations .aa conist of 2 parts, bones rotations/translations and vertex animations. Vertex animations are conducted via morph targets or special shaders (not to confuse them with vertex shaders found in graphic cards). Combination of skeletal animations and morph driven turns out to be very powerfull and fast. Instead of using many bones on face or hands of character, using morph targets gave more control and finer detail + low overhead on hardware with many bones. Also, with LOD for skeleton and mesh in distant mips morph targets could be deleted or other used for even less impact on hardware.

Those 3 parts of model are independent of each other and from model which allows easier updating and editing of models and powerfull features like Skeleton sharing between models, animation sharing between models, totally free control over LOD for meshes and LOD for skeletons, animation blending, powerfull and easy to create shaders.......


There are some general rules about exporters and SKA itself:

- only supported polygon types are triangles.
- exporters support:
* mesh with uv maps assigned and surfaces/materials names.
*weight maps (bones influences on mesh vertices).
*uv maps (to assign more uv maps on same mesh use surfaces/materials and assign diff uv map to each surface or use multilayer shaders)
*morph maps (morphing poses/vertex animations)
*skeleton (bones hiearchy) with names, rest positions and rest lenghts
*bones animations (rotations and translations, size changes arent supported)
*morph keyframes (vertices animations)


New filetypes explanation (based on example model filenames):

Grunt.am
- ascii mesh exported from 3d application.It consists of vertices, polygons,UV maps, Weight and Morph maps and surface names. Weight maps names are used to match mesh deformations with skeleton's animations. UV maps hold uv mapping information for entire mesh. Morph maps (optional) hold morph targets in mesh (names and deformed poses). Once imported in model, it is saved in its binary form (Grunt.bm).

Grunt.aml
- mesh ascii list. It is created in SKA Studio. It holds link to ascii mesh (for easier recreation of mesh). It also holds lists of mesh lods. One model instance can have more than one mesh list.

Grunt.as
- ascii skeleton exported from 3d application. It holds bones names,hierarchy, rest positions and lenghts. Once skeleton is added to mesh, its converted to its binary form (Grunt.bs) on model saving or SKA studio exiting.

Grunt.bs
- binary version of skeleton.

Grunt.asl
- list of skeletons in model. Because it holds link to skeleton ascii source, Binary skeleton can be easily reexported and recreated/adjusted without need to recreate whole model. It also holds lists of skeleton lods.

Grunt.aal
- list of animations for model. Each model can have more lists (good for animations sharing, where some models can share same animations like run, walk, wound.....). Each list holds name of ascii animation, (Grunt_Fire.aa for example), treshold for optimisation and compression ratio. Once animation list is added to model and model is saved, .ba its binary representation (Grunt_Fire.ba) is saved.

Grunt_Fire.aa
- bones rotations/translations exported from 3d application (like LW/Max/Maya).

Grunt.ba
- binary, compressed and optimised animation file. It consists of all animations listed in animations lists. It is saved with exiting SKA Studio.

Grunt.shp
- shaders parametars. It holds names of shaders and their parametars and surfaces they are assigned to.

Grunt.tex
- texture used in shaders.

Grunt.smc
- model (script describing model). Differently to old model format (.mdl), mesh, skeleton, shaders and animations are totally independent. It makes adjustment to each part easy, also it allows mesh sharing, skeleton sharing and animations sharing.


Making example model

Ill explain exporting example model (Zorg Grunt from SS: SE). Tutorial will cover Lightwave part of exporting but exporting from other applications should be THE same.

Load scene (like IdlePatrol.lws). Run SE Exporter plugin from Master plugins.


Lightwave scene



LW exporter explanation:


Lightwave exporter GUI



1) Face Forward - by default "normal" models like characters, weapons.. shouldnt be exported as "face forward". Use of it is for effect models (explosions/smokes.. which are FULL face forward) and for fire/fountain models (HALF face forward).

2) Animation Order - animations are by default exported in "normal" order (from 0th to last frame), tho there is option to export them reversed.

3) Export Mesh - It will export currently selected object (or all objects if no object is selected) to ascii mesh located in same folder as object(s) it exports.

4) Export Skeleton - It will export bones skeleton of current object(s) to .as file. Skeleton is exported in its REST pose (which can be defined in 3D app).

5) Export Animation - It will export animation of bones and moprh animations of currently selected objects, if no object is selected, animation will be exported for all objects in scene. If scene have any morph animations (keyframe or expression driven, they will be embedded in ascii animation file.
Animation name is derived from following: "ObjectName"_"SceneName".aa (for example Grunt_IdlePatrol.aa).

6) Export Bones - it will create skeleton from "sections". Its alternative way to animate similar to Character studio's biped 'boxes' or Puppetmaster). Instead of using bones, other objects parented in hierarchy are used to deform mesh. Bones' names are created from objects' names.

7) Export Section Anim - used in conjuction with Skeleton creation, it exports rotations/translations of objects instead of bones.

8) Absolute positions - when exporting mesh, its exported positioned as loaded into scene, by enabling "absolute positions" it will be exported as positioned in scene. This option is used, for example, when character is holding gun (with its own skeleton) whom is also animated. When exported, gun will be positioned exactly as in scene.


To export do following:
Click on Export Mesh (exports object to ascii mesh), next click on Export Skeleton (exported to ascii skeleton) and lastly click on Export Animation (to export animation to ascii animation).

Now, run SKA Studio.

Ska studio interface explanation:


SKA Studio GUI



1) Main rendering window -rendering modes and atributes can be switched. All shaders/geometry parameters changed on model are updated in realtime in it.

2) Tree controls -all settings/parameters are adjusted/edited there. It can be switched on/off,undocked...

3) File options -standard file options (load/save...)

4) Model creation/editing tools -all tools/options needed to create/load/edit model and its parts are accesed from there (or with RMB from Tree controls).

Tools explanation:

1) New Mesh List

- by clicking on it, user will be prompted to either create new Mesh list (which will hold all meshed added for current model) or to load existent one (if existent one is chosen, user have option to load it or save new one over existing one. If existing one is loaded and later edited, all models using those list(s) will be changed. This approach is called "Instancing" and generally is very powerfull but can lead to unwanted changes. Note, one model can have more than 1 mesh list.

2) New Skeleton List - same as with Mesh list, user have option to create new list, load existing one and overwrite old one. Note, one model can have more than 1 skeleton list.

3) New Anim Set - create new one, load existing set (with animations in it) or overwrite old one. Note, one model can have more than 1 animations set (which is desirable). For example of player model, 1 animations set can be used for all cutsequnces, other for all standard animations (which can be also used by multiplayer models) etc... This way models dont load all animations, just ones from list, there is huge saving on memory + animations which are edited are exported only once and all models using them will be updated.

4) Add Child - works like "attachments" from Serious Modeler, they are usually guns,decals and similar stuff which can be deformed either by their own skeleton or by skeleton from parent model. Same as with lists, new attachment model can be created or old one loaded. Once model is loaded, its parent bone (if there is skeleton in parent model) should be set and offsets (if needed). Child models can have their own set of animations which can be played along animations of parent model.

5) Add Mesh - user can load more than 1 ascii mesh (exported from 3d app). Mesh is loaded with its Morph maps, UV maps,surfaces/materials and weightmaps. All meshes in list are now used as LOD meshes and can be totally different from original mesh. In Tree controls, under every mesh in list, LOD distance is located.

6) Add Skeleton - user can load more than 1 skeleton which are used as skeleton LOD. Note, bones count and names in LOD should match names and count of weight maps in mesh in same LOD or some parts of mesh wont move/rotate.

7) Add Animation - adds animation(s) in current animation list. Every animation in list can be manualy adjusted, with duration, compression (less quality but smaller files).

8) Add texture - load texture(s) to be used with shaders.

9) Create and add texture - create new static/animated texture(s) from tga source or create new effect texture using procedural shaders.

10,11,12) Browse Specular, Reflection and Bump texture -loaded from default SpecularTextures, ReflectionTextures and BumpTextures folders.

13) Add Collision box - creates new colision box for curent model.

14) Delete - deletes curent item in Tree Control.



5) Display and time tools -bones visibility, floor rendering... are accesed thru tools located here.


Display Tools GUI



2) Reset View (A) - centers model on screen.

3) Show wireframe (CTRL W) - renders wireframe over model.


Wireframe render



4) Show skeleton ( CTRL E) - renders skeleton for curent model.


Model's skeleton render



5) Show active bones in skeleton - since animations exported dont necessary need to use all bones, only used in curent animations are displayed green. If you want to blend few animations together (like runing of character with its fireing of weapon), only used bones in any animation should be exported.


Used bones in skeleton render



6) Show texture (CTRL T) - toggles texture rendering on model.

7) Show floor (CTRL F) - toggles floor rendering.

8) Show normals (CTRL R) - toggles normals rendering.


Normals render
9) Automips (CTRL M) -toggles automatic mip distances switching.

10) Collision Box (CTRL C) - toggles collision box rendering.


Collision box render
11) All frames bounding box (CTRL SHIFT C)- toggles rendering of all animations' frames bounding box.

12) Anim queue (CTRL Q) - toggles animations queue rendering.

13) Anim loop - plays current animation looping.

14) Pause animation (Enter) - pauses current animation.

15) Stop animation (Esc) - stops current animation and return model to default position.

16) Sync anims - sync blending animations.

17) Show light (CTRL D) - toggles light model rendering.

18) Change ambient color (CTRL A)

19) Change light color (CTRL SHIFT A)

20) Set model strech - size entire model (size values arent saved in model, its used as reference only).


From file menu click on New (or CTRL N shortcut) to select name for new model. Browse to folder where all needed files are stored (.aa, .am, .as) and type name Grunt (.smc) will be added automatically. Press ok, Grunt.smc file is saved.

With new model script prepared, click on New mesh list. In requester type Grunt and press ok. Grunt.aml will be created. In it, link to ascii mesh will be hold. Next we need to add ascii mesh to list, click on Add mesh and select Grunt.am from requester. You should end with model like on IMAGE4.


Image 4



When you click on mesh's list, button Convert will appear at bottom of Model's tree control. It is used to recreate meshes in mesh list for that model once mesh is fixed or new geometry added to it. All animations, skeleton, LOD and texturing settings will stay intact !

Tree Control Explanation:


Tree control window



Note: many options are available by pressing RMB with one of entries in Tree selected.

1) Zorg.smc - name of root model (Parent).

2) Zorg.aml - Mesh list (holds meshes). When any list (mesh/skeleton/animation) is selected, option to "Convert" them is available. What it does is to reload content named in them (mesh) and updates it (new geometry added to mesh or new bone in skeleton).

3) Grunt.am - 0th LOD mip in ascii mesh list.

3b) Other LODs of curent mesh in model. Assigment of surface shaders can be done on all LODS in same time, unfold all meshes and select all same surfaces in them (like Head for example). From Shaders pulldown, select desired shader and set its parameters. Once model is saved, shader parameters are saved for all LOD meshes. For each LOD mesh switching distances can be adjusted from numeric entry.

4) GruntSurface - surface(s) found in curent mesh. For each/all surfaces shader(s) must be assigned.

5) List of loaded textures for curent Mesh.

6) Zorg.asl - skeleton list for curent model.

7) Zorg.as - LOD skeletons in skeleton list. For each LOD skeleton switching distances can be adjusted from numeric entry.

8) Zorg.aal - animation lists (model can have more than 1 animation list).

9) Animations from animation list. Their speed, translation and compression can be altered.

10) Collision boxes, when selected they are automatically drawn. Their names/values can be altered on the fly.

11) All frames bounding box - when calculated it calculates volume of all animations frames. It is used to avoid cliping (large models with small collision boxes could be clipped off screen).

12) Child model parented to one of bones of its parent. It can have all parameters as Parent model.


Next, we will load texture for that model. Click on Add texture and select Soldier.tex from requester. Nothing changed, because we didnt assign shader to mesh's surface. In Model's tree controls unfold mesh and click on Gruntsurface. Bottom down, option to select shader for that surface appears. Select Base , Soldier as Base texture (this is actual 2d texture) and GruntMapping as Base UVmap (mapping coordinates). Grunt should be textured now.


Shaders window



Now we will add skeleton. Click on New Skeleton List and type Grunt in requester. Grunt.asl will be saved. Similar to mesh list, it holds links to ascii skeletons for easier sharing/ recreation. Click on Add Skeleton , and load Grunt.as. Click CTRL E shortcut to enable Skeleton drawing (or click on Show skeleton button) in model's visibility tools. In Model's tree control you can unfold Skeleton, by clicking on bone name, in main rendering window bone influences (weights) are rendered.Note: when clicking on bone in model its'weightmap influence is rendered or you can select bone from Skeleton part of Tree Control.


Weightmap for current bone



We need to add animations to model. Same like with mesh/skeleton, we need to add Animation list first. Click on New animation list , in requester type Grunt, Grunt.aal will be saved. In animation list we need to add actual animations. Click on Add animations, from requester select .aa files. 8 animations should be added. From model's tree control, click on any animation to play it. Enter shortcut pauses animation while SHIFT + cursors left/right play animation frame by frame.
We can add child (attachment) model to this one. Click on Add child , from requester select Gun.smc. By default child models attaches to 1st bone in parent chain (Pelvis).
In tree control click on child model and select Parent bone to be R_HandNull. Adjust rotations in rotation fields to -180, -90, 0. IMAGE5 shows Grunt model with all animations and child models loaded.


Model with all parts loaded




Shaders:

Shaders are type of texture rendering over desired surface. Every (most) require one or more texture maps, UV map (texture mapping coordinate), blending type. Some additional parameters like blend strenght, color etc can be edited also. Shaders are advanced version of "Rendering" panel from old Serious Modeler. Each surface on model can have different shader applied or they can use same.

One good example of Shader is Reflection-Specular shader. Note: every mesh list contains list of textures used by meshes in list. Before adding and adjusting shaders, needed textures must be loaded.


Shaders panel



1) Shader pulldown - choose one of existing shader there.

2) Base texture - color map for surface.

3) Reflection texture - choose one of loaded texture to act as reflection.

4) Specular texture - choose one of loaded texture to act as specular.

5) Base UV map - UV mapping coordinates for Base texture.

6) Base color - optional coloring of Base texture.

7) Reflection color - strenght (alpha) of reflection.

8) Specular color - strenght (alpha) of specularity.

9) Double sided - enable double sided rendering of polygons in surface.

10) Full bright - when enabled, surface wont get shading from world, it will act as bright material.

Similar to Reflection shader, every other shader have common parameters like UV map, base texture and effect on surface. This approach is open and new shaders can be easily add without large intervention in Engine itself.

LOD:

Unlike old .mdl format, new supports LOD on 2 levels: mesh LOD and skeleton LOD. Using Mesh list and Skeleton list, lod meshes and skeletons are loaded. Both lod's are distance defined, which allows combinations of mesh(es) and skeleton(s) in certain distance. For example of highly detailed monster, it can have eyes, mouth, teeth in 0th mesh LOD animated with morph targets and fingers on hands animated with bones in 0th skeleton LOD. As its more and more away from player, its morph targets in mesh lods can be deleted (morph animations wont played couse there is no morph targets to affect). In 2nd skeleton LOD, for example, bones on fingers can be deleted and replaced with hand bone (necesary adjustments to weightmap on model must be done, all points from fingers weightmaps should be added to hand weightmap). Since mesh lod is free form, meaning that lod meshes dont have to created from base mesh, nor they have to have same number of surfaces, uv maps, weight maps... it allows alot of control over look of model. Allways note that mesh and skeleton in same distance (matching together when model is active) should have matching of weightmaps and bones or some of vertices from model wont be affected with bones. Also, if there is weightmap without bone influencing it, you might encounter strange deformations, becouse more than 1 bone can influence same vertex on mesh, their influence is normalised at 100% (sum of all bones' influences on vertex cant be higher than 100%). Another possibility is to change animation style using lod. For example, character hands can be animated with bones in lower lods (when its near the player) and with morph targets in distant lods. This is achieved by deleting morph targets from lower lods (since there is no morph maps, animations wont play). Also, since all LOD meshes are independent, they can have different mapping, new textures add in lod... possibilities are countless.

To adjust lod distances for mesh/skeleton click on mesh or skeleton in mesh/skeleton list.


Adjusting mesh lod



Distance switching values are saved in mesh list, thus preserved when meshes in list are recreated (same with skeleton's distance). To see how certain skeleton lod "matches" mesh lod, disable automip (CTRL M), from mesh list select desired mesh and from skeleton list, desired skeleton. Choose any animation and press play. If something is wrong you are able to see it in realtime without need to run game. Matter of fixing is much easier then before, fix weightmaps in your 3d app, export mesh, in Tree control click on Mesh list and convert button. Mesh list will update and animation playing will still play with new changes done.

There are some notes to take care of:
If bone whom have child model parented to is deleted, child model is deleted also. Problems with skeleton lod usually happen with removing bone(s) from skeleton but not joining their weightmap(s) with other weightmaps. For example, every finger in hand of character is animated with bones (meaning every finger have its own weightmap). When you remove finger bones from hand, only bone left is hand itself. In mesh, all weightmaps for fingers should be deleted and points/polygons in them added to hand weightmap otherwise strange deformation of hand will occur (or no deformation at all).


Morph maps

Morph maps allows mixing of vertex animations with skeletal animations (giving more control over animation and appearance plus programmable deformations). Animator can use displacement mapping in 3d program to add "wave" displacement on mesh which can be then converted to morph targets and programmed as shader to displace geometry (example of Lava golem from Serious Sam). Another usage would be to pose hands/fingers on character without using to many bones (which highly impacts hardware) or adding procedural shaders to randomly play character blinking eyes etc...

Since both type of animation (vertex/skeletal based) can affect model in same time, they can be exported in ascii animation in same time (boneenvelopes and morphenvelopes). When animation is played both morph and bones animation is played. Alternatively, animation blending can be used (playing morph animations with character facial expressions and skeletal based running, walking....). with high polycount models morph targets tend to use more memory (becouse of all vertex data they need to have saved), thats why they can be removed from mesh lod.

Next part will cover more advanced tutorials and tips.
Stay tuned for more.