Game Development Community

Using milkshape instead of max for player model

by Bill Fisher · in General Discussion · 03/09/2004 (2:50 pm) · 10 replies

Ive just purchased torque and do not have 3d studio max - im using milkshape.

I've created a model (with animations) and it seems to export correctly - however - I wanted to place it into the torque example starter.fps program - just to see how easy it would be to substitue existing player.dts.

But the example program uses a MAX exported dts model with dsq files for animation. (I guess milkshape stores all animation in the exported dts file? and doesnt use dsq files?)

Does anyone know what i should alter to get my milkshape created dts player model to work in the starter.fps program? (changes necessary in player.cs, etc.)

the player.cs file references a bunch of dsq files - that are not used in an exported milkshape dts file - so im guessing i need to change this file... but how? and anything else?

Thanks - any help is much appreciated.
Bill

#1
03/09/2004 (3:02 pm)
This link shows how to export animations.
Then you can goto player.cs and replace the playerbody(orc) model path, with the path to your model.
www.garagegames.com/docs/torque.sdk/tools/milkshape.html
#2
03/09/2004 (3:13 pm)
Thanks for the quick reply - but i think im exporting fine.

What I need help with is replacing the existing player.dts and dsq files (created with max) with my new player.dts made with milkshape.

I know where to put the new dts file - i just dont know how to update the player.cs file.

right now player.cs shows...

datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
sequence0 = "./player_root.dsq root";
sequence1 = "./player_forward.dsq run";
sequence2 = "./player_back.dsq back";
etc, etc, etc...


this obviously needs to be changed since im using milkshape to export and it doesnt use dsq animation files, right?


Im guessing player.cs needs to be changed to...

datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
sequence0 = "root";
sequence1 = "run";
sequence2 = "back";
etc, etc, etc...


would this be right?????

Thanks
Bill
#3
03/09/2004 (8:37 pm)
You can actually get rid of the TSShapeConstructor in this situation afaik
#4
03/10/2004 (4:33 am)
Ben is right, when you make a model in Milkshape you don't need the player.cs file in ~/data/shapes/player/. You'll need to name the sequences in the material list correctly, for example:

root
run
back
side
look
head
[...]

That is it, I think. It works for me. ;)

Also, Jason Farmer's MS Animation Helper may be useful to you when working with Milkshape.
#5
03/10/2004 (11:44 am)
Thanks for the replies Ben and Matt.

One more thing though - I got rid of player.cs file and works fine (if I DON'T put a material in my milkshape created player.dts)

I put a material in and I get this error...

"TSMaterialList::Getflags:index out of range"

My material is named MATERIAL01 in milkshape - is this ok?

The actual materialfile is named oak1.jpg and is placed in the same directory as the player.dts file - is this ok?

Is it important that the materials are listed BEFORE the animation sequences in milkshape's material listbox?

ALSO:Do I need to change to the PLAYER.CFG file? (since im using milkshape to create my model instead of MAX)

Thanks
Bill
#6
03/11/2004 (6:56 am)
Bill, I really don't know what might be wrong.

As far as I know the material name for textures and the actual texture names do not need to be the same. If so I would be in real trouble. ;)

Also it might be helpful to know that you cannot do blend animations with MS. For example "look".

MAX uses the .CFG file when it exports to .DTS. It is used to ensure that all of the needed nodes are exported for the .DSQ files. The MS exporter doesn't require a .CFG file.

Matt
#7
03/12/2004 (2:43 am)
I know this might sound stupid, but is your texture pixel
in powers of 2? eg. 128x128?
#8
03/12/2004 (2:55 am)
Burning is right the textures do need to be in the power of 2. Also maybe your texture is too big, larger than 512x512? Another thing that it could be is that you do not have an eye node, a joint named "eye".

Matt
#9
03/12/2004 (9:55 am)
Thanks "burning" and "matt" for the replies - however i am using the same player.png file that came with the starter.fps (so that should be fine)

I also added the "eye" joint.(ive also heard something about cam, mount0, mount1, etc - are those a must too?)

could it be some sort of path issue - it cant find the texture? the player.png file is in the same directory as the player.dts file.

do i need to touch the player.cfg and/or player.cs files at all - should i delete? should i not touch at all? is it ok to leave them as is? do they make any difference getting milkshape version to work?

Ive tried so many different combinations of things - i was wondering if anyone could email me a simple model with texture they made in milkshape and know it works with the starter fps

bill@lasthalfofdarkness.com

Thanks
#10
03/12/2004 (10:59 am)
I dont fricken believe it!!!! After 5 days I figured it out!!!!

I started entirely from scratch without adding any of the animation sequences to the material list box.

for some reason it couldnt find the "Material01" at the bottom of the long list of animations sequences in the version that didnt work (im still probably going to have to play around with that)

I made sure that the material01 was the only thing in the material list box.

I thought forsure you needed to have all the same animations listed or it would crash... ITS JUST THE OPPOSITE!!!! the program is not picky at all - you dont absolutely have to have joints named correctly or even touch the player.cs or player cfg files all all.

Very interesting!

Thanks
Bill