MilkShape to NeoAxis 





This tutorial was written to show how to get meshes with animations to NeoAxis. You will learn how to export meshes with multiple animations from MilkShape to NeoAxis. Version of NeoAxis used was 0.52.

First download and install MilkShape from

Chumbalum

When installing select the 30 day trial version, if you don’t have a license for this program.

Download the Milkshape3D Exporter from

OGRE3D plugins

When installing the plugin it asks for a location. Installer suggested D:\MilkShape for me even MilkShape was installed to another location. So use browse to find your own MilkShape installation folder.

After finishing the plugin installation we need to find some meshes with animations.

Download demo monster from www.3drt.com or use some other 3D model. Just make sure the file format is supported by MilkShape and can hold animations.

I’m using one of the Marine Troopers from 3drt.com.

Extract model’s files to a folder you can easily find later.

Open up the file model.ms3d from the folder you just extracted the archive to.

You should see MilkShape opening up and the monster showing up with it’s skeleton.



Now this monster has few animations and you can see the list in file animations-list.txt which came with model's archive.

MilkShape is able to export these properly, if you give MilkShape the same list slightly altered.

MilkShape needs animation information in the form of

1,20,Walk

which means animations starts at frame 1, ends in frame 20 and you want it to be named Walk.

Copy the original animations-list.txt and make your alterations to your new copy. This is the sample of my modified copy Copy of animations-list.txt:

0,30,runforward
40,70,runbackward
80,110,walk
120,150,walkback
160,190,strafeleft
190,220,straferight
230,260,jump
260,270,bullethit
270,290,rockethit
300,370,liftgun
380,430,die1
440,500,die2
510,650,idle
265,270,bullethit2
680,720,lowwalk
730,770,lowwalkback

You can of course use what names you want, but you can’t use same name twice!!!

Now when our new list is ready go back to MilkShape and select everything with ctrl+a or from the menu Edit / Select All.

Then start exporting from the menu File / Export / OGRE Mesh / Skeleton…

If you can’t see this option you installed your exporter to a wrong directory. You can install exporter again if you are missing this option.

If you paid attention to the instructions you should see a picture like the one below.



Select the options I have selected or you can change them if you know what you are doing. I can tell you I don’t… Just remember to check the “Split keyframe sequence…” checkbox so we can separate the animations.

Press OK and select the name and location of your new OGRE mesh. You can use marine.mesh and marine.skeleton.

After those the exporter asks about splitting the animation. Press OK and select the modified Copy of animations-list.txt you made earlier.

At least my MilkShape didn’t say ok or finished, but now there is a mesh and a skeleton file in my folder!! Whee!!

Shutdown MilkShape and proceed transferring the files o NeoAxis.

Open up NeoAxis Resource Editor. Create a new folder and add a new Entity type called Soldier.type. Select GameCharacter as the base class of your new type. Copy the marine.mesh, marine.skeleton, m_head.png and marine.png (textures from the models archive) to this directory. You can see the assets from the picture below.



(If viewing the mesh crashes Resource Editor with System.AccessViolation or similar you probably have a problem with your skeleton’s bones)

Create a new Resource in your folder and select Material as the type. Give it a name Soldier and select ShaderBaseMaterial as it’s material type.



Doubleclick your new material and add marine.png as the diffuse map.



My model has a different texture for the head, so I will add a new highMaterial for the head and add a texture to that also. Second material is in the picture below.



Now the rest is just adjusting things.

Doubleclick on your mesh and add your materials to it. Now it’s not just a grey mesh anymore, but looks like a person. Also you can see the animations pulldown menu containing all animations.



Next doubleclick on your Soldier.type and rightclick on the middle of the screen. Then attach marine.mesh to your type.



Atleast in my case the .mesh was in the wrong rotation, so I adjusted it a bit. Also it was too big for me so I had to scale it too.

GameCharacter-class creates a basic physics shape for this model, so check “Show Physics” checkbox and make sure your model fits in the blue borders.



Check that you have AllowEditorCreate set to True.

Model is all done! Close Resource Editor and open Map Editor. Drop you model in to a map and start simulation. If your model had an “idle” animation you should see GameCharacter-class using that animation in simulation.

Here is an avi file (11MB xvid encoded) to show you the results in action.

marine.avi