Copyright: Copyright 1998, by Craig Graham.


INTRODUCTION

Ok, welcome to RsdANIM - this doc's not great, but hey; no-one payed me to write it....

What is RsdAnim? Well, mainly it's a PC (Win95) hosted keyframe animator for Playstation RSD format 3D models. It does a few other things as well, we'll come to those later….

First thing to mention - RsdAnim is not a modeller.  It might look a bit like one, but it's got very few modelling tools as such. So to start with, go get a modelling package (I recommend 3D Studio Max v2) to actually create some models.

RsdAnim will allow you to sequence keyframes together (in fact you can have many sequences for one model at the same time). It will then generate Sony's Playstation MIMe data for you, to allow you to play the animation on the Playstation from within your games. It's ideally suited to character animation and morphing, where you want to move bit's of a model around ( for instance bending an arm at the elbow) whilst still keeping a 'skin' over the whole model (that's how the Dino demo was done).

Where does RsdANIM fit in with Sony's RSDTOOL? Read these comments from the guy who wrote RSDTOOL.

Please read the Copyright Info and Contact The Author sections before going on....

THIS MANUAL IS A WORK IN PROGRESS - IT'S NOT FINISHED, SO FEEL FREE TO SEND ME LITTLE TUTORIALS AND STUFF FOR INCLUSION......

I'd appreciate a decent job offer on a decent Playstation project. I'm fed up with the one I'm on at the moment, bloody shoe-string outfit. Get me out of here - I'm dead good. Come on, please......

Craig.


File Support
SUPPORTED FILE FORMATS

You can select from one of the following standard 3D formats:

3D Format	Load	Save	Texture Info	Animation Data	Object Grouping
Playstation Model (.RSD)	Yes	Yes	Yes	Yes	Yes
Playstation Runtime Model (TMD)	No	Yes	Yes	Yes	No
3D Studio ASCII Object (.ASC)	Yes	No	No	No	No
3D Studio Max ASCII Scene Export (.ASE)	Yes	No	Yes	Yes*	Yes

* Partial, still a work in progress

The best format to load is RSD (accurate texture mapping). Next best is ASE, which RsdAnim converts into RSD format internally. ASC is a bit duff (at least, 3DS Max ASC files are - they have no texturing info).  TMD format is save-only, because there is no way to find out what the texture files were once a TMD is compiled (it only contains texture coords within the PSX frame buffer).

You must convert your textures into TIM's before starting to use RsdAnim on a model. I recommend you do this before applying textures in whatever your modellor is. RsdAnim supports TIM format textures, and to an extent it supports BMP's as well - but for consistency with other tools this is used internally only.

2D Format	Load	Save
Playstation Bitmap (TIM)	Yes	No
Windows Bitmap (BMP)	Yes	Yes
WHAT DATA IS IN WHAT FILES?

Quick summary of what data RsdANIM put's in what files (these are only the ones it actually generates):

FORMAT	STANDARD?	INFORMATION/DATA
.rsd	yes
.ply	yes
.mat	yes
.xgrp	Almost, it's pretty much the same as Sony's .grp format, only the group name is on a seperate line to the rest of the data so you are allowed spaces in the names.	Polygon Grouping / Object  information
.move	RsdANIM's own format	Animation data
.bone	RsdANIM's own format	Bones skeleton description
.TMD	Yes *	Playstation standard runtime model file
.mim	RsdANIM's own format	Binary representation of MIMe animation data for use with RsdANIM_LIB's LinkMIMe() function.
.rs	no quite	R-Script (an extended version of JavaScript) script file

* NOTE: TMD saving is a work in progress - the results are not as good as using rsdlink to convert the RSD file at the moment. It's aimed mainly at the Action Replay Preview function.

(that said, as of v1.52, they may actually be better due to expanded TMD primitive support).


SYSTEM REQUIREMENTS

Required system to run RsdAnim is:

•	Microsoft Windows 95

•	Microsoft DirectX v5

•	32Meg RAM

•	Pentium or compatible CPU

Recommended:

•	Hardware 3D acceleration (better results come from even a crappy 3D card like an S3 Virge)  - but NOT 3Dfx, as it cann't render into a window.

•	64Meg RAM

•	Fast MMX CPU (I use an AMD K6/233)

•	DirectX v6

•	Datel Action Replay card.

My development PC is:

Cheap box shifter AMD K6/233Mhz, 80Mb RAM, S3 Virge 3D card, Datel Action Replay Pro comms link..

My other test PC is:

HP Vectra VL, Pentium P200, 32Mb RAM, ATI Mach64 graphics card (no hardware 3D)

Using Windows NT

Officially:

RsdAnim does not work with Windows NT4 - this is because the NT version of DirectX is v3, and RsdAnim requires v5 (or better).

NT5 includes DirectX v5, and so should be ok (but I've not tried it).

Unofficially:

You can get a hacked patch for NT4 that gives it DirectX5 support - it's not an official Microsoft thing, so don't ask me where to get it. I don't use NT myself, so I've got no incentive to track it down. I've had reports from some people that say it does work for running RsdANIM on NT4 though...


Project Manager
THE PROJECT MANAGER

Somewhere around the RsdAnim window you will see a nice Tree View. This is the project window, and it's where you organise your animation's.

At the root of the tree is the RSD model file. You'll not do anything with that directly ever again ;)

There are 5 important types of entry in the project tree, each with a different icon displayed next to it:

Polygon/Vertex Group

Texture Bitmap

Keyframe

Movement (Animation Sequence)

Skeleton (bones animation framework)

Double clicking (left button) on an entry in the project window usually does something. For instance, double clicking on a Polygon group will select that group. Double clicking on a Keyframe will swap to that keyframe.

Right clicking on an item in the Project Manager Tree gets you a popup menu with common operations in it. Exactly which operations depends on what type of item you click  on.

eg. Right-clicking on a Keyframe get you a menu with Edit Info,Rename,Replace & Delete in it.


POLYGON GROUPS

A polygon group can be treated like an object in most 3D design packages (indeed, the 3DS Max importer converts Max objects into RsdANIM Polygon Groups).

To create a polygon group, you select some polygons or vertices and click on the:

 Group Polygons icon in the Polygons toolbar.

You will then be asked to give a name to the group. This will be the name that show up in the Project Manager view.

Double clicking on a polygon group in project manager will select the group.


TEXTURES

RsdANIM uses standard Playstation TIM files for it's texturing.

Any TIM's used in the project will be shown in the Project View. If a texture is selected in the project view when you bring up the Texture Wrap Dialog, then it will be the default texture in the selection popup.


SELECTING BITS OF YOUR MODEL

There's loads of ways to select bits of you model in RsdANIM. We'll start with the easiest....

The Pick Tool

This is like, the standard tool in almost all Windows graphical tools, so you should all be roughly familiar with it. Specific things you need to know:

•	Clicking on a vertex selects that vertex. The vertex will turn red.

• 	Clicking and dragging will drag out a box and select everything within the box.

•	Clicking on the end-joint of a bone selects that bone. The bone (not the joint) will turn red.

A polygon is selected if all it's vertices are selected. So, dragging a box round a polygon will select it, as it selects all the vertices. Equally, clicking on each vertex in turn will also select the polygon.

 The Magic Wand Tool

This is a bit more cunning. It selects a whole connected object mesh by following all the connections between vertices. Eg. If you have a simple model of a person, with each limb made from a single box, clicking on one vertex of a box will select the whole box for you. This only works if there are no shared vertices between the bits of the model.

Select All

Usual sort of thing, select it from the edit menu, it'll select the whole of your model.

Invert Selection

Selects anything not already selected, and deselects anything that was selected in the first place.

Auto Deselect

This is an option in the Edit menu. If enabled, every time you select something with a tool or using the Project Manager, everything else will be deselected, so you only get the bit that you just selected.


Copyright Info
COPYRIGHT INFORMATION

RsdANIM is not Public Domain.

The author reserves all rights with regards to this product, and no distribution is allowed outside of approved channels as defined below.

A limited license is granted for the use of this software without charge by members of Sony Computer Entertainment Europe's Net-Yaroze program, for non-comercial projects only.

No other license is granted by the author at this time, and any other use is prohibited.

No comercial use of RsdANIM is permitted at this time without the authors written and witnessed consent.

RsdANIM may be made available for download from the Sony Computer Entertainment Europe Net-Yaroze WWW Server. Only those people defined above are permitted to download or possess via some other means the RsdANIM program.

R-Script and the Logo [image] are copyright Craig Graham.

The JavaScript™ Interpreter Core of R-Script is available under License for embedded systems use via Intelligent Group Ltd & MSU (Milton Keynes) Ltd. Contact the author for details.

Craig Graham.

Enquiries via email to:

c_graham@hinge.mistral.co.uk


CONTACT THE AUTHOR

You can get in touch with me, Craig Graham, at the following address:

Land Mail:

Craig Graham

Flat 5

Kingscliffe Court

27 Rock Grove

Brighton

BN2 1ND

England

Telephone:

+44 (0)1273 818816 (home)

+44 (0)385 568405 (mobile)

Email:

c_graham@hinge.mistral.co.uk

I'd appreciate a decent job offer on a decent Playstation project. I'm fed up with the one I'm on at the moment, bloody shoe-string outfit. Get me out of here - I'm dead good. Come on, please......


KEYFRAMES

Keyframes specify what happens in what order.

Initially there is one keyframe called BaseFrame - this is the root model for all movements. A movement consists of a move from this position to a new position.

You create keyframes withing Movements by selecting the movement in the Project Manager and clicking on the Add Keyframe button. This will then bring up the Create Keyframe dialog. You give the keyframe a unique name here.....

A new keyframe entry will appear under the currently selected movement for the keyframe.

Double clicking on the keyframe in the Project Manager will take you to that keyframe

(well, it actually copies the keyframe into the EDIT FRAME).

If you modify a keyframe (or just want to replace it with a completely different one) click on the Replace KeyFrame button.

Dragging a Keyframe in the Project Manager Tree allows you to re-order the keyframes, or even move keyframes from one movement to another.

KEYFRAME PROPERTIES

Clicking on the KeyFrame Properties button will bring up the Keyframe Info dialog (shown below). You can change the number of video frames it takes to reach this frame from the previous one here.

By default the time taken to get from one frame to the next is 20 video frames. The less you set this to, the faster the movement will happen (speed=distance/time, where time is proportional to number of video frames).


What Gets Editted
WHAT GETS EDITTED?

Ok, first, most basic concept. The scene you modify is the EDIT FRAME. It doesn't get saved until it is stored in the Project Manager. You can change the edit frame as much as you like, safe in the knowledge that you can always get back to where you started.

There is no Undo as such, but what you can do is use the Set Marker option in the edit menu instead. This will preserve a copy of the edit frame without you having to add it to the project manager, and selecting Restore Marker will bring it back again.


TOOLBARS

As this is a work in progress document, here's a summary of all the toolbars and what the buttons actually do. Buttons are listed left to right.

Pick Tool

Magic Wand

Move Selected

Resize Selected

Rotate Selected

Create Bone

Move Joint (free move, doesn't effect model or child bones)

Rotate Joint (skeleton rules apply, effects attatched bits of model and child bones, hold down shift to rotate joint around child instead of parent).

Locked Rotate Joint (sort of an inverve kinematics tool, maintains orientation of all bones except the one actually rotating, skeleton rules apply, effects attatched bits of model and child bones, hold down shift to rotate joint around child instead of parent).

Measure Angle. ( Simple tool for measuring an angle - doesn't change model at all).

Delete Selected Vertices

Delete Selected Polygons

Create Polygon (only available if you select exactly 3 vertices)

Attatch selected vertices to currently selected bone.

Detattch selected vertices from currently selected bone (if they are attatched).

The rest of the buttons in this toolbar are axis locks for move/rotate operations.

XYZ - free move & rotate.

lock ops to the XY plane

lock ops to the YZ plane

lock ops to the ZX plane

lock ops to the X axis only

lock ops to the Y axis only

lock ops to the Z axis only

Rotate View around Y axis clockwise

Rotate VIew around Y axis anticlockwise

Rotate View around X axis clockwise

Rotate VIew around X axis anticlockwise

Increase View Scale

Decrease View Scale

Scale View to fit

Manual Scaling (hold left button down in view pane and drag mouse left&right to change scale).

Zoom Area.

Pan.

Play movement animation.

Create Polygon Group

Invert Selected Polygons Normals

Set Selected polygons face colour

Make Selected polygons transparent

Make Selected polygons opaque.

Paint Selected polygons with the texture selected in the Project Manager.


Keyboard Shortcuts
KEYBOARD SHORTCUTS SUMMARY

Ok, I may not have used the standard windows keyboard shortcuts. So bite me....

Here they are anyway....

Standard Stuff

CTRL+O	Open

CTRL+S	Save

CTRL+P	Print

Viewing

ALT+ '+'/'-'	Change view scale

ALT+Numeric Keypad 4/6/2/8	Rotate view

Selection

CTRL+A	Select All

CTRL+N	Select None

Edit mode shortcuts

ALT+Space Bar	Select (picker / drag box select)

ALT+W	Magic Wand Select

ALT+M	Move Selected

ALT+R	Rotate Selected

Other stuff

CTRL+I	Vertex Info

CTRL+G	Create Group from currently selected  polys+vertices


VIEWING PANES

There are 4 viewing panes, setup as Win95 splitter windows. Each one can be configured to display different views of the same model that you are animating.

There are 4 basic modes of view, each with several options that can be set for it:

Textured.

The full monty, as you'll get it on the Playstation view, with texture mapping and lighting.

Options available in the View menu:

Show Model. Actually display the  view of the model. Why turn it off at all? Well, for example, if you're animating a boned model, you might want a view showing just the skeleton, without the clutter of the actual model getting in the way.

Show Vertices. Draws a little blue box at each vertex location. Useful for selecting individual vertices for fine editing.

Show Bones. Show the skeleton of the model (if it has one).

Show XYZ Axes. Obviously, it shows the XYZ axes. There's a coloured box at the end of each axis (Red=X, Green=Y, Blue=Z).

Show Grid. Displays a 3D grid. Useful when looking at side/top/front, but a tad cluttered when you rotate the view to an odd angle.

Additionally, selecting Configure Lighting will bring up the lighting configuration dialog.

Wireframe.

Not as busy as the texture view, and you can see actual polygons.

All options from the textured view are available plus one more:

Back Face Removal. If checked, then wireframe has backfaces removed when it's displayed, otherwise all faces are displayed regardless of whether they are hidden or not.

General Stuff In Texture & Wireframe Modes

Right hand mouse button click and drag rotates a view pane, just like in Sony's RsdTool.

The View toolbar contains a few options to make things easier for you as well:

From left to right, we have:

4 view rotation buttons (like using the right button click & drag).

View Scale step +/-

Zoom to fit: zooms in or out and auto-pans so a model exactly fits into a view pane.

Manual zoom - select it, then left mouse button click & drag to change the zoom scale for the view.

Zoom Area: Click and drag a box to mark the area you want to zoom.

Pan: Pan around the view.

Play animation: play the currently selected Movement.

Texture UV.

Rather more specialised, this view mode shows whichever texture you select in the Project Manager , and if you select a part of the model which uses that texture the texture UV's will be shown overlayed on the texture with lines showing polygon edges and squares showing vertices.

There are no options for UV edit views.

Velocity.

A work in progress this will allow you to setup velocity/accelleration curves for movements. Simply shows a timeline with keyframes of the the movement selected in the Project Manager at the moment though.


LIGHTING CONFIGURATION

Lighting can be configured indivudually for each view pane using the Configure Lighting option from the View menu.

Three lights are available, one at the end of each axis.These can be setup simply to have any combination of a red, green and blue component (no r/g/b == light off, r&g&b==white light).

You cann't change the intensity though.

NOTE: Lighting configuration is saved in the windows\RsdANIM.config file. This is a binary file, so no trying to edit by hand...


ACTION REPLAY PREVIEWER

If you're lucky enough to own a Datel Action Replay™, then you're in for a treat. RsdANIM provides a small Playstation program that simply displays TMD's for you.

The clever bit is that it allows you to download the graphics direct from RsdANIM to the Playstation using the AR. Believe me when I say that this is EXTREMELY fast - for example, an RSD with 40K's worth of TIM's + 10K of data will be download to the Playstation in arund about a second.

How to do it:

1) Use SIOCONS to download Previewer.PXE to the Playstation.

2) Run RsdANIM.

3) Set the correct IOPORT for you Action Replay Comms card in the options dialog (it'll be remembered, you only have to do it the first time you use this).

4) Load a model.

5) Click on Send All in the Action Replay Control toolbar.

Viola. The model will be displayed on the Playstation.

NOTE: There is an "AR Send Viewer" button in the AR control toolbar - this uses forced EXE download to put the complete executable onto the playstation without using SIOCONS. This option is unfortunately not available to Yaroze members at present as I cann't release the standalone executable version of the previewer that we use in-house without Sony's say so. Sorry...

Other Stuff:

• If you've already downloaded the textures to the Playstation, you can use the Send Model button to send just the model (TMD) without the texture's (even faster downloading).

• If you've changed a texture without changing the model, you can use the Send Textures button to send just the textures (TIMS) without the model.

• If you enable 'AR View Tracking' in the Action Replay Control toolbar then the rotation of the current view will be replicated on the Playstation, so you can rotate the model on the Playstation using the PC's mouse at the same time as you are rotating it on the PC.

• You can select the resolution that the playstation is displaying in by using the option in the Tools menu to change the resolution.

• There's a button to remote reset the playstation in the AR Control toolbar. This will have the same effect as pressing the reset button on the PSX.

PREVIEWING ANIMATIONS

The AR previewer also allows you to view your animations on the Playstation as well.

This is done in the AR Previewer using the RsdANIM library (downloadable from my WWW page), so what the preview show is exactly what you get in your own programs.

How to do it:

1) Go through the process of downloading the model and stuff (see above).

2) Select a Movement in the Project Manager tree.

3) Click on "AR Send Animation" in the Action Replay Control toolbar.

The selected movement will be downloaded to the Playstation and will continue to repeat until you send another animation.

NOTE: You can send one animation after another, you only have to send the actual model and textures once (they stay in the playstation until replaced). So, if you've got several movements of the same model you can view them all in turn, by just selecting them and clicking on Send Animation.


FEATURES LIST

This is just a quick list of what RsdANIM can do. Not all this stuff is documented in the help though....

• Colored and lit wireframe view.

• Fully textured view.

• RSD model loading/saving

• TMD model saving

• 3DStudio Max r2 ASE model loading (with texture support)

• 3DStudio r4 ASC model loading

• TIM image file loading.

• Model Optimization. Allows you to selectively reduce the vertex & polygon count of a model.

• Grid Align. Forces vertices onto a definable 3D grid.

• Object centering.  Center's a model so the average coordinate is {0,0,0}.

• Point Select. Select a single vertex.

• Drag Select. Select all vertices/polygons in the box you drag out.

• Wand Select. Selects all connected vertices/polygons from a given start point.

• Move. Move selected vertices.

• Rotate. Rotate selected vertices around a point.

• Resize. Scales selected polys.

• NEW(v1.6): Stretch/Squash. Scales selected polys on an axis, keeping overall volume constant (like rubber).

• NEW(v1.6): Magnet. Free deformation tool.

• NEW(v1.6): Bend tool.

• Polygon grouping.

• Face Normal inversion. Swaps the ordering of vertices in selected polygons to make the face normal vectors point the other direction.

• Printing. Prints a wire-frame view of the current model.

• Multiple Movement based keyframe animator.

• MIMe data export for direct use with the gteMIMefunc() Playstation call.

• NEW(v1.6): Block list (type2) MIMe for faster processing & smaller animation data files.

• Vertex sorting.

• Face colour editing.

• Vertex colour editing.

• Set shading method for selected polygons (gourard/flat).

• Enable / disable lightsource calculation for selected polygons.

• Transparency control

• Texture mapping (manual, cylindrical, spherical & planer)

• Bones animation control.

• Fast on-Playstation preview using Datel Action Replay.

• Timeline / velocity view.

• NEW(v1.6):Direct editting of polygon all properties.

• Configurable view lighting.

• Fast Direct3D display.

  - Rotate

  - Zoom

  - Zoom All

  - NEW(v1.6): Zoom Area

  - NEW(v1.6): Pan

• Fast on-playstation preview function using the Datel Action Replay Pro-Comms Link

  (Windows 95 only).

• NEW(v1.6):Point lightsource embedding.

• NEW(v1.6):Scripting language (R-Script)

• NEW(v1.6):Simple modelling tools (polygon, pyramid, cube, cylinder, sphere, mesh objects).


Comments From Mr RSDTOOL

I recieved an email about RsdANIM from the guy who wrote RSDTOOL for Sony (Malachy Duffin).

Here's what he had to say about it:

Hiya Craig,

  Just to let you know that you are doing an excellent job with RSD Anim.

Originally, I had intended to do something similar with RSD Tool, but after

about 6 months working on it and Tim Tool, I got offered a job at Shiny

Entertainment, California, where I've been working on a PSX game.  I had

assumed that Sony would keep developing it, but it seems to still be at the

same version when I left a year ago!

Well, that's from the horses mouth...cann't say fairer than that can you :)


INTRODUCING BONES

What are bones? If you know the answer to this, skip this bit (it'll bore you).

Still with me? Right....

Bones systems are exactly like the things in your body. Your bones control how the rest of the body (flesh, skin, muscle) are linked together and how they move. Bones have joints linking them together (like, your elbow for instance).

In the context of 3D animation, a bones skelton makes it much easier to animate a 3D model.

Let's take this example (you can download the model from my WWW site). The human body is an ideal candidate for a bones style approach. You put the bones in just where you'd find them in a real human body. You then attatch the appropriate bits of the model to the correct bones.eg. the lower left leg of the model is attatched to the lower left leg bone.

From left to right:

1)The original model.

2) The model with a bones system (skeleton) setup for it.

3) Just the skeleton on it's own for easy animating.

1) [image] 2) [image] 3)

When you've setup your skeleton, you can manipulate the model using just the skeleton. You can bend an arm at the elbow and the hand will move as well, or make a leg kick from the hip, safe in the knowledge that you don't have to more the different bits of the model seperately.

This is because bones define a hierarchy. Remember the song? "The leg bones connected to the...thigh bone...etc". Bone can be linked together, so rotating one bone about it's start joint (eg. forearm about elbow) will rotate all child bones as well (and all bits of a model attatched to them).


RSDANIM LIBRARY

The RSDANIM Library is a small set of routines to allow playing of RsdANIM generated 3D animations on the Playstation. They are all for the most part very short, very simple functions which provide a slightly higher level interface to the Playstation's gteMIMefunc() call.

Although RsdANIM can generate two different formats of MIMe data, this is handled transparently by the library - you don't really need to know which format you are using. Type 2 is usually faster though...

Structures

MIME_MOVEMENT

MIME_HANDLE

MIME_SEGMENT

MIME_BLOCK

TMD Internals

Type2 MIMe File Format

Functions

LinkMIMe()

InitMIMe()

InitMIMeX()

ReleaseMIMe()

ResetMIMe()

DoMIMe()

Sample Code

Example 1


MIME_HANDLE
RSDANIM LIBRARY : MIME_HANDLE

The MIME_HANDLE is used to referance an animation sequence by the RSDANIM library.

typedef struct {

int type;

union movement_data {

MIME_MOVEMENT *movement;

MIME_SEGMENT *segments;

} md;

int frame,n_vert,step;

SVECTOR *vectors;

SVECTOR *base_vectors;

} MIME_HANDLE;

type	:	type of MIMe data that this handle is for (1 for old style, 2 for new block list style data)

md.movement:	pointer to a NULL terminated array of old style animation segment descriptions (valid if type==1)

md.segments:	pointer to an array of new style animation segment descriptions

frame	:	current keyframe/animation segment index (0 to N-1)

n_vert	:	number of vertices the MIMe applies to

step	:	current step in the current animation segment

vectors	:	pointer to the object (that the handle applies to)'s Vertex section

base_vectors :	pointer to a copy of the original vertex section before any animation has taken place. This is created by InitMIMe(), and used to restore the original model when ResetMIMe() is called.


MIME_MOVEMENT
RSDANIM LIBRARY : MIME_MOVEMENT

The MIME_MOVEMENT structure is generated by RsdANIM. It describes a single segment of an animation (from one keyframe to the next).

typedef struct {

SVECTOR *mime_data;

unsigned short frames;

unsigned short scaler;

} MIME_MOVEMENT;

mime_data	: pointer to the MIME block for this time segment

frames	: number of frames this segment is played for

scaler	: value of the p scaler used in the gteMIMefunc() call for this block.


LinkMIMe
RSDANIM LIBRARY : LinkMIMe

MIME_MOVEMENT *LinkMIMe(unsigned long *m);

The LinkMIMe() call is used to link a Binary MIMe file (*.mim) produced by RsdANIM. If you are using C language exported MIMe you will not require this call at all.

LinkMIMe() auto detects Type 2 MIMe files.

Parameters:

m	:	address of your binary MIMe file in memory

Returns:

Pointer to a NULL terminated array of MIME_MOVEMENT's ready for use with InitMIMe().

Usage:

MIME_MOVEMENT *my_movement;

my_movement=LinkMIMe((unsigned long*)address_of_my_binary_mime_file);


InitMIMe
RSDANIM LIBRARY : InitMIMe()

TMD_OBJECT *InitMIMe(GsDOBJ2 *obj, MIME_MOVEMENT *mime, MIME_HANDLE *mh);

The InitMIMe() call is used to link a 3D model  handler (GsDOBJ2) to a 3D animation sequence (MIME_MOVEMENT array), and initialise a MIME_HANDLE to control it with.

InitMIMe() auto detects Type 2 MIMe files.

Parameters:

obj	:	pointer to the object handler for the model

mime	:	pointer to the animation sequence description

mh	:	pointer to a MIME_HANDLE structure (which will be filled in be InitMIMe)

Returns:

Pointer to a TMD_OBJECT structure (you can probably just ignore the return value here).

Usage:

MIME_MOVEMENT *my_movement;

MIME_HANDLE my_handle;

my_movement=LinkMIMe((unsigned long*)address_of_my_binary_mime_file);

InitMIMe(&my_object, my_movement, &my_handle);


CREATING A SKELETON

To create a skeleton you use the Create Bone tool [image] .

When this is selected you can click and drag in a view pane to create a bone.

A bone looks like this:

The X is the start of the bone, the square is the end. The start and the end are both 'joints' or control/rotation points.

To create a skeleton, you chain bones together. To do this, you add a bone as before, but you start the bone by clicking on an existing start or end joint of a bone.

For example, here's a leg with a foot:

You can have as many bones as you like attatched to a joint, so the skeleton for a pair of legs joined at the hip would be:

You should draw the skeleton to be inside the model you want to animate with it, so for a model of a leg, you would want to draw the bone as follows:

Note how the joints are positioned where you  would want to bend the model (the same places you'd have joints on a real person - hip,knee,ankle).

Once you've drawn your bones from one angle, you'll want to rotate the view and adjust the positions of the bones. For example, if you draw the bones from the front, RsdANIM doesn't know where they should be positioned from the side, so it sticks them at zero. Usefully, if a joint has already been setup correctly, any bones attatched to it will always have the correct setup at that end.

You can move joints around using the Move Joint tool [image]. This simply lets you click and drag joints around in the current view to position them.

Front View of leg bones created from the side. Notice that the positioning is wrong from the front.

Front View of leg bones created from the side after correcting the positioning manually.


InitMIMeX
RSDANIM LIBRARY : InitMIMeX()

TMD_OBJECT *InitMIMe(GsDOBJ2 *obj, MIME_MOVEMENT *mime, MIME_HANDLE *mh, 	MIME_HANDLE *existing);

The InitMIMeX() call is used to link a 3D model  handler (GsDOBJ2) to a 3D animation sequence (MIME_MOVEMENT array), and initialise a MIME_HANDLE to control it with (just like the plain InitMIMe() call). However, you also specify an existing MIME_HANDLE, which must refer to an animation sequence for the same GsDOBJ2. This saves memory by sharing the model reset information between the two handles.

InitMIMeX() auto detects Type 2 MIMe files.

Parameters:

obj	:	pointer to the object handler for the model

mime	:	pointer to the animation sequence description

mh	:	pointer to a MIME_HANDLE structure (which will be filled in be InitMIMe)

existing:	pointer to an existing initialised MIME_HANDLE structure

Returns:

Pointer to a TMD_OBJECT structure (you can probably just ignore the return value here).

Usage:

MIME_MOVEMENT *my_movement1,*my_movement2;

MIME_HANDLE my_handle, my_otherhandle;

my_movement1=LinkMIMe((unsigned long*)address_of_my_binary_mime_file);

my_movement2=LinkMIMe((unsigned long*)address_of_my_other_binary_mime_file);

InitMIMe(&my_object, my_movement1, &my_handle);

InitMIMeX(&my_object, my_movement1, &my_otherhandle, &my_handle);


DoMIMe
RSDANIM LIBRARY : DoMIMe()

int DoMIMe(MIME_HANDLE *mh);

DoMIMe() actually steps an animation by a single frame.

Each time DoMIMe() is called, the model will step one frame through the animation sequence.

Simply call this once per frame in your display loop and GsSortObject4() the object as normal.

DoMIMe() auto detects Type 2 MIMe files.

Parameters:

mh 	: 	pointer to a valid MIME_HANDLE

Returns:

0 	: animation sequence finished

1 	: animation sequence still running

Usage:

MIME_HANDLE my_handle;

DoMIMe(&my_handle);


ResetMIMe
RSDANIM LIBRARY : DoMIMe()

void ResetMIMe(MIME_HANDLE *mh)

Reset Animation to baseframe

Parameters:

mh 	: 	pointer to a valid MIME_HANDLE

Returns:

nothing

Usage:

MIME_HANDLE my_handle;

// If animation sequence is finished, reset it to the

if(!DoMIMe(&my_handle))	baseframe

ResetMIMe(&my_handle);


ReleaseMIMe
RSDANIM LIBRARY : ReleaseMIMe()

void ResetMIMe(MIME_HANDLE *mh)

Release memory allocated to a MIME_HANDLE. You will not be able to use this handle again without calling InitMIMe() or InitMIMeX() for it.

NOTE: This call free's the copy used to restore the baseframe for this handle. If any other handles are sharing it (they were initialised with InitMIMeX()), then they will also become invalid.

Parameters:

mh 	: 	pointer to a valid MIME_HANDLE to release

Returns:

nothing

Usage:

MIME_HANDLE my_handle;

ReleaseMIMe(&my_handle);


Sample Code
RSDANIM LIBRARY : Sample Code

This won't compile, you don't have the extra functions it's calling here....but the bit's about RSDANIM animations are exact and you can probably just cut paste then intoyour own code....

#include <__rts_info_t__.h>

#include <ABS.h>

#include <memory.h>

#include <setjmp.h>

#include <sys/types.h>

#include <libps.h>

#include "rsdanim.h"

GsDOBJ2 player_object;

GsCOORDINATE2 player;

MIME_MOVEMENT *walk_move;

MIME_HANDLE animation_handle;

main()

{

unsigned long	lclHeapStart=(_end & 0xFFFFFFF0L)+0x10;

unsigned long lclHeapSize=

((_stack_addr-(_stack_size<<10))&0xFFFFFFF0L)-lclHeapStart;

MATRIX tmpmat;

GsRVIEW2	view;

// CodeWarrior style heap allocation

InitHeap((unsigned long *)lclHeapStart, lclHeapSize);

// PAL mode video

SetVideoMode(MODE_PAL);

InitWorldOT();

// Set the screen res

GsInitGraph(640,256,GsOFSGPU,1,0);

GsDefDispBuff(0,0,0,256);

GsDRAWENV.isbg = 1;

// 3D Initialisation

GsInit3D();

init_view();

view.vpx = 0; view.vpy = 0; view.vpz = -7000;

view.vrx = 0; view.vry = 0; view.vrz = 0;

view.rz  = 0;

view.super = WORLD;

GsSetRefView2(&view);

init_light();

GsSetLightMode(0);

FntLoad( 960, 256);

FntOpen( 20-(640/2), -256/2, 640-40, 256, 0, 512);

memset((unsigned char*)&player,0,sizeof(GsCOORDINATE2));

memset((unsigned char*) &player_direction,

0,

sizeof(GsCOORDINATE2));

GsInitCoordinate2(WORLD,&player);

activeBuff=0;

// Load a model in from a file

InitModelFile("\\PGame\\graphics\\gobeck.tmd",8200,&player_object);

player_object.coord2=&player;

// Load some MIMe from a binary MIMe file

h=open("cdrom:\\PGame\\graphics\\walk.mim",O_RDONLY);

l=lseek(h,0,SEEK_END);

lseek(h,0,SEEK_SET);

buf=(unsigned char*)malloc(l);

read(h,buf,l);

close(h);

// Link the binary MIMe file so we can use it

walk_move=LinkMIMe((unsigned long*)buf);

// Initialise the MIME_HANDLE to control the animation

InitMIMe(&player_object, walk_move, &animation_handle);

// Now sit in a loop displaying the animation forever....

while(1)

{

// Standard "sort the display" type of thing...

activeBuff=activeBuff^1;

GsSetWorkBase((PACKET*)GpuPacketArea[activeBuff]);

GsClearOt(0,0,&WorldOT[activeBuff]);

GsGetLs(player_object.coord2,&tmpmat);

GsSetLightMatrix(&tmpmat);

GsSetLsMatrix(&tmpmat);

GsSortObject4(&player_object,&WorldOT[activeBuff],4,getScratchAddr(0));

DrawSync(0);

fcnt=VSync(1);

VSync(0);

ResetGraph(1);

GsSwapDispBuff();

GsSortClear(0,0,0x0, &WorldOT[activeBuff]);

GsDrawOt(&WorldOT[activeBuff]);

FntPrint("Hsync=%d\n",fcnt);

FntFlush(-1);

// Actually do the animation bit

if(!DoMIMe(&animation_handle))

{

// if the animation had completed, reset it to the baseframe

ResetMIMe(&animation_handle);

}

}

}


UPDATES IN THIS DOCUMENT

Bit's of this Help File updated / new in this version:

Playstation Support Library:

Updated library (v3) with new structures and file support....

• Structures

- New section on RsdANIM's TMD packet data naming convention.

- New bits in the MIME_HANDLE.

- Type2 MIMe file support structures MIME_SEGMENT & MIME_BLOCK.

• File Format of the new Type 2 MIMe files.

RsdANIM New Features:

• Point lightsources

• R-Script scripting Language

• Editing Tools

• Axis Locks

• Type2 MIMe files (new animation data format)

• Triangle to Quad conversion

• Polygon Properties Editor

• Better TMD support

As Usual...

• Load's of bug fixes.....


TMD Internals
RSDANIM LIBRARY : TMD Internals

You're welcome to lookup the TMD format in the document on Sony's site.

As of RsdANIM v1.6 however, I'm publishing the naming convention that RsdANIM uses for polygon primitives inside the TMD file. This is just so that people know what I'm talking about if I mention a certain polygon type in the docs somewhere else....

TMD Format Structures

typedef struct {par	short	vx;

short	vy;

short	vz;

short	dummy;

} TMD_VERTEX;

typedef struct {

short nx;

short ny;

short nz;

short dummy;

} TMD_NORMAL;

typedef struct {

unsigned char olen;	// word length of 2d drawing primitives

unsigned char ilen;	// Length of packet data section

unsigned char flag;

unsigned char mode;

} TMD_PACKET_HEADER;

typedef struct {

unsiggned long id;	// file version id (always 0x00000041)

unsigned long flags;	// bit 0 is the only one used, to indicate pointer or offset for object sections.

unsigned long nobj;	// number of objects

} TMD_HEADER;

typedef struct {

TMD_VERTEX *vert_top;	// pointer to top of vertex array

unsigned long n_vert;	// number of vertices

TMD_NORMAL *normal_top;	// pointer to top of normal array

unsigned long n_normal;	// number of normals

TMD_PACKET_HEADER *primitive_top;	// pointer to primitives list

unsigned long n_primitive;	// number of primitives

long scale;

} TMD_OBJECT;

TMD Primitives Naming Convention

Example Name:

POLY_F3NT

     ^^^^

     ||||

     |||+- Texturing: optional, indicates that a texture is present

     |||

     ||+-- Colouring mode:

     ||      N=none (no rgb modifier entry in poly)

     ||      U=Uniform (1 rgb modifier entry for entire poly)

     ||      G=Gradation (1 rgb modifier for each vertex)

     ||

     |+---- Number of vertices: 3 or 4

     |

     +----- Lighting mode:

             S=static (light off, no normals)

             F=flat (light on, 1 normal for whole poly)

             G=Gourard (light on, 1 normal for each vertex)

List of all supported primitives

POLY_F3U

POLY_G3U

POLY_F3G

POLY_G3G

POLY_F3NT

POLY_G3NT

POLY_S3U

POLY_S3G

POLY_S3UT

POLY_S3GT

POLY_F4U

POLY_G4U

POLY_F4G

POLY_G4G

POLY_F4NT

POLY_G4NT

POLY_S4U

POLY_S4G

POLY_S4UT

POLY_S4GT

TMD Primitive Structures

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r,g,b,dummy0;

short vr0;

short vr1;

short vr2;

short dummy1;

} POLY_S3U;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r,g,b,dummy0;

short vr0;

short vr1;

short vr2;

short vr3;

} POLY_S4U;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r,g,b,dummy0;

unsigned short nr0;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

} POLY_F3U;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r0,g0,b0,dummy0;

unsigned char 	r1,g1,b1,dummy1;

unsigned char 	r2,g2,b2,dummy2;

unsigned short nr0;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

} POLY_F3G;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r,g,b,dummy0;

unsigned short nr0;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short vr3;

unsigned short dummy1;

} POLY_F4U;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r0,g0,b0,dummy0;

unsigned char 	r1,g1,b1,dummy1;

unsigned char 	r2,g2,b2,dummy2;

unsigned char 	r3,g3,b3,dummy3;

unsigned short nr0;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short vr3;

unsigned short dummy4;

} POLY_F4G;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r0,g0,b0,dummy0;

unsigned char 	r1,g1,b1,dummy1;

unsigned char 	r2,g2,b2,dummy2;

unsigned char 	r3,g3,b3,dummy3;

unsigned short nr0;

unsigned short vr0;

unsigned short nr1;

unsigned short vr1;

unsigned short nr2;

unsigned short vr2;

unsigned short nr3;

unsigned short vr3;

} POLY_G4G;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char 	r,g,b,dummy0;

unsigned short nr0;

unsigned short vr0;

unsigned short nr1;

unsigned short vr1;

unsigned short nr2;

unsigned short vr2;

unsigned short nr3;

unsigned short vr3;

} POLY_G4U;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char	r0,g0,b0,dummy0;

unsigned char	r1,g1,b1,dummy1;

unsigned char	r2,g2,b2,dummy2;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short dummy3;

} POLY_S3G;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char	r0,g0,b0,dummy0;

unsigned char	r1,g1,b1,dummy1;

unsigned char	r2,g2,b2,dummy2;

unsigned char	r3,g3,b3,dummy3;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short vr3;

} POLY_S4G;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char	r,g,b,dummy0;

unsigned short n0,vr0;

unsigned short n1,vr1;

unsigned short n2,vr2;

} POLY_G3U;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char	r0,g0,b0,dummy0;

unsigned char	r1,g1,b1,dummy1;

unsigned char	r2,g2,b2,dummy2;

unsigned short n0,vr0;

unsigned short n1,vr1;

unsigned short n2,vr2;

} POLY_G3G;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char r,g,b,dummy1;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short dummy2;

} POLY_S3UT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char r,g,b,dummy1;

unsigned short normal0,vr0;

unsigned short vr1,vr2;

} POLY_F3NT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char u3,v3;

unsigned short dummy1;

unsigned char r,g,b,dummy2;

unsigned short normal0,vr0;

unsigned short vr1,vr2;

unsigned short vr3;

unsigned short dummy3;

} POLY_F4NT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char	r0,g0,b0,dummy1;

unsigned char	r1,g1,b1,dummy2;

unsigned char	r2,g2,b2,dummy3;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short dummy;

} POLY_S3GT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned short n0,vr0;

unsigned short n1,vr1;

unsigned short n2,vr2;

} POLY_G3NT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char u3,v3;

unsigned short dummy1;

unsigned short n0,vr0;

unsigned short n1,vr1;

unsigned short n2,vr2;

unsigned short n3,vr3;

} POLY_G4NT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char u3,v3;

unsigned short dummy1;

unsigned char r,g,b,dummy2;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short vr3;

} POLY_S4UT;

typedef struct {

TMD_PACKET_HEADER head;

unsigned char u0,v0;

unsigned short cba;

unsigned char u1,v1;

unsigned short tsb;

unsigned char u2,v2;

unsigned short dummy0;

unsigned char u3,v3;

unsigned short dummy1;

unsigned char r0,g0,b0,dummy2;

unsigned char r1,g1,b1,dummy3;

unsigned char r2,g2,b2,dummy4;

unsigned char r3,g3,b3,dummy5;

unsigned short vr0;

unsigned short vr1;

unsigned short vr2;

unsigned short vr3;

} POLY_S4GT;


MIME_SEGMENT
RSDANIM LIBRARY : MIME_SEGMENT

The MIME_SEGMENT structure is generated by RsdANIM. It describes a single segment of an animation (from one keyframe to the next).

typedef struct { 	MIME_BLOCK *block_list;

int frames;

} MIME_SEGMENT;

block_list	: pointer to the list of MIME blocks for this time segment

frames	: number of frames this segment is played for


MIME_BLOCK
+RSDANIM LIBRARY : MIME_BLOCK

The MIME_BLOCK structure is generated by RsdANIM. A list of these structures is used to describe the actual motions required to produce a single segment of an animation (from one keyframe to the next).

typedef struct mime_block {

struct mime_block *next;

unsigned short start_v;

unsigned short num_v;

unsigned short scaler;

unsigned short dummy;	// Pad value for 32bit word alignment of structures

SVECTOR mime_data[1];

} MIME_BLOCK;

next	: pointer to the next block in the list for this animation segment, or NULL if this is the last block in the list.

start_v	: index of first vertex that this block applies to

num_v	: number of vertices that this block contains MIMe for

scaler	: p scaler for this block

mime_data	: an array of MIMe vectors. Althought this is declared as a 1 element array, there will in fact be num_v entries in the mime_data[] array.


Type2 MIMe File Format
RSDANIM LIBRARY: Type 2 MIMe File Format

Here's the format of the Type 2 binary MIMe File that RsdANIM generates:

You don't really have to know anything about it, just load it in and call LinkMIMe() for it....but if you really have to know, LinkMIMe takes the file in memory and links it to produce the following:

Good eh? Each MIME_BLOCK contains a chunk of MIMe data that effects a group of consecutive vertices.


What Is Point Lighting
WHAT IS POINT LIGHTING?

The standard way of getting a realistic look to a scene on a Yaroze is to use the 3 flat lightsources provided by GsSetFlatLight(). That's fine as far as it goes, but it's no good for stuff like street lights, head lamps, fires, torches, etc.

What these lights have in common is that (unlike sunlight which is pretty much uniform and comming from one direction) they are coming from a point, and you can see the point, and they only reach a certain distance.

Enter RsdANIM's point lighting function. This allows you to light a model from one or more point lightsources (any colour, any number).  So, if you want a courtyard lit by torches round the walls, put a point light where each torche should be and you'll get the right effect......

For example, here's a scene with some lamps on the wall.....looks a bit flat & dull doesn't it?

Here's the same scene with a couple of point light sources set into some of the lamps on the wall (one really bright, the other a little dimmer)....

Once applied, the lighting is embedded into the RSD/TMD structure by changing the polygon types - so you don't have to do anything special in your code to get the effect, just display the TMD as usual.....


USING THE POINT LIGHTING TOOL

This is probably the easiest tool in RsdANIM.

1) Enable "Show Vertices" from the View menu (so you can see which vertex you pick).

2) Simply use the Pick Tool to select one vertex.

The Point Lighting option in the Tools menu will then be enabled. The vertex you select will be the centre/focus of point lightsource you are going to add.

3) Select "Tools->Point Lighting". You'll get this dialog:

4) Pick a colour for the lightsource, and the radius of the sphere it will illuminate.

NOTES:

a) The "Allow POLY type modification" check box allows RsdANIM to change the type of polygons in your model where the light falls on them. This is good because you can only simulate a point source with some types of polygon (those with a gradation colour). So, if you un-check this option then only Polygons of the right type will actually get lit. Leave it checked and RsdANIM will convert flat shaded polys to gradation shaded polys for you to get the lighting effect.

b) Once a point light has been applied it is embedded into the colour and shading information of the individual polygons of the model, so you cann't turn it off again.


DIALOGS

As this is a work in progress document, here's a summary of all the dialogs I've not described anywhere else:

The polygon properties dialog allows you to set the properties of all selected polygons explicitly. Some of these properties won't show up in certain versions of DirectX (eg. transparency) but they will show up on the playstation.


INTRODUCTION TO R-SCRIPT

R-Script is a scripting language derived from JavaScript, which allows you to write extra functions for RsdANIM.

Example:

// A simple script to provide  a button which when

// clicked will display the About dialog.

// Construct a new RsdANIM control object

var app=new RSrsdanim();

// Provide a function that uses the RsdANIM control object to display the

// About dialog.

function DisplayTheAboutDialog()

{

// Invoke the About() method to display the dialog

app.About();

}

Here's a few basics.....

1) The language syntax is exactly like JavaScript. Find a referance guide to JavaScript to learn it.

2) Each function defined will be assigned to a button in the R-Script Functions pane of the project manager window.

The class reference here only covers the RsdANIM specific classes I've added to the JavaScript language.

The JavaScript interpreter core used here is my own, and doesn't rely on any external DLL's being installed (you don't need IE or Netscape to use it).

AS R-Script is a work in progress, documentation is not available at the present. I'll be documenting the completed item in the future releases.


RSrsdanim
R-Script CLASS : RSrsdanim

The RSrsdanim class is used to control the interface of the main RsdANIM program from within an R-Script program.

Construction

var app=new RSrsdanim();

Methods

About()

AboutRS()


RSvertex
R-Script CLASS : RSvertex

The RSvertex class is represents a single vertex (vector, 3D coordinate) in a 3D model

Construction

var v=new RSvertex(2.0f,1.0f,3.0f);

Methods

void Add(RSvertex);

void Subtract(RSvertex);

void Scale(float);

float Distance();

RSvertex CrossProduct(RSvertex);

void Unify();

void UnifyPSX();

float AngleX();

float AngleY();

float AngleZ();

string toString();

Attributes

float x

float y

float z

int flags


THE STARTUP SCRIPT

On startup, RsdANIM will load the script 'default.rs' from it's current directory (if the file exists).

You can put any script that you want to be loaded every time you run RsdANIM into this file.

Initially it contains the following code:

/*

 * Default R-Script Program

 */

var app=new RSrsdanim();

function AboutR_Script()

{

app.AboutRS();

}

All this does is put one button in the R-Script panel which when pressed, will popup the "About R-Script" dialog.

You could actually get the same effect using:

function AboutR_Script()

{

RSrsdanim.AboutRS();

}

as AboutRS() is a static member function of the RSrsdanim class.


ATTATCHING YOUR MODEL

Attatching your model to the skeleton is easy.

1) Setup one of the view panes so that you can only see the skeleton in it (turn off the model & vertex display). This isn't essential, but it makes selecting bit's of the skeleton easier.

2) Select a bone by clicking on it's end joint using the pick tool [image] .If you hold down shift whilst clicking it will select the bone whose start you are clicking on instead. The selected bone will highlight in red.

3) Select some vertices that you wish to be attatched to this bone.

4) Click the Attatch To Bone icon [image].

That's it.

An alternative way to do it is to follow steps 1 & 2 to select a bone, then right click on a group in the project manager and select "Attatch To Bone" from the popup menu.


MANIPULATING THE MODEL

There are several tools for manipulating a model via a skeleton.

You should attatch create a skeleton and attatch your model to it before trying this bit....

NOTE: Both these descriptions are for rotating a bone around it's start point. If you hold the shift key down whilst performing these actions, the tool will operate in reverse (click on the start joint to rotate around the end joint).

 THE ROTATE JOINT TOOL

Once you select Rotate Joint you can click on a joint and have the skeleton move to follow wishes pretty much as you would expect. This tool rotates a bone around it's start joint when you click on it's end joint.

Before:  After:

The above pictures show a the highlighted (red) bone being rotated around it's start point.

 THE LOCKED ROTATE TOOL

This is a bit trickier to describe......inverse kinematics mean anything to anyone?

Let's try and describe how it works.....

The Locked Rotate Tool attempts to restrict any change in orientation for the skeleton to the bone it's working on. Think of it like walking up steps - your thigh bone rotates around the hip joint, and the knee joint rotates to keep your lower leg upright and you foot level relative to the ground.

Before:  After:

This tool makes walking animations a simple business.


THE MOVE TOOL

 The Move Tool lets you directly move bits of you model. It works on vertices (not polygons) so if you want to move a polygon you must select all it's vertices first.


The Size Tool
THE RESIZE TOOL

 The Resize Tool will uniformly re-size any selected bits of your model. It will grow (or shrink) centred on the centre of the area selected.


THE STRETCH TOOL

 The Stretch Tool will stretch the selected part of your model along a single axis.

To use, select some bits of the model then select one of the axis locks (X, Y or Z only).

Now select the stretch tool and you can 'stretch' the selected polys along the axis you locked.

The model will shrink along the non-selected axes in proportion to the amount it grows along the one selected.

You can also use this tool to squash a model.


THE MAGNET TOOL

 The Magnet Tool let's you sort of pull an object in different directions. It works a bit like the rubber-Mario face on the title screen of Nintendo's Mario 64.


THE ROTATE TOOL

 The Rotate Tool does pretty much what it's name suggests. It rotate's stuff around a point.

The point in question will be wherever you click the mouse (click and drag to rotate). The Axis locks work a little differently for this tool - they actually say which axis the tool is allowed to rotate around. So, if you set the X Axis lock, the tool will only rotate around the X axis.


THE BEND TOOL

 The Bend Tool is a lot like the Rotate Tool, in that it rotates about a point and uses the axis locks in the same way. The Bend tool is a little trickier though, as it bends instead of just rotating. Ie. rotation is proportional to the distance from the rotation centre. The furthest away point rotates  by the largest amount, the closer the point is to the rotation centre the less it rotates by (giving an impression of bending).


Axis Locks
THE AXIS LOCKS

The axis locks are found in the Vertex Edit toolbar:

They allow you to restrict movement to a certain axis (or pair of axis). By default (and sometimes by accident unfortunatly) they are set to XYZ as shown above (ie. allow movement in all the axes).