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....

Click here to run RsdANIM:

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.

* 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.


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.

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.

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

11 Victory Mews

The Strand

Brighton Marina Village

Brighton

BN2 5XA

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).

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).

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

+/-	Change view scale

Numeric Keypad 4/6/2/8	Rotate view

Selection

CTRL+A	Select All

CTRL+N	Select None

Edit mode shortcuts

Space Bar	Select (picker / drag box select)

W	Magic Wand Select

M	Move Selected

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 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.

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.

• 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.

• Face 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.

• Configuable view lighting.

• Fast Direct3D display.

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

  (Windows 95 only).


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 (an 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.

Structures

MIME_MOVEMENT

MIME_HANDLE

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 {

MIME_MOVEMENT *movement;

int frame,n_vert,step;

SVECTOR *vectors;

SVECTOR *base_vectors;

} MIME_HANDLE;

movement	:	pointer to the NULL terminated array of 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.

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.

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.

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.

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);

}

}

}