sprockets A:M Decaling Screen frosted donut medals buildings Rubik's Cube Nidaros Cathedral Tongue Sandwich
sprockets
Recent Posts | Unread Content | Previous Banner Topics
Jump to content
Hash, Inc. - Animation:Master

Recommended Posts

Posted

Hi,

 

I am having some animation export/import issues with AMXtex to 3d game studio.

 

I have tried these tests with a TSM1 and TSM2 rig and the rig in the thom model on the A:M cd.

 

First issue is that any bone that I do not move manually in the A:M action does not move when I import it into 3d game studio. So if I move the head, the jaw bone should follow as it is a child of the head. But if I do not move the jaw bone manually it does not show up in the project workspace under action. So when I import it into 3d game studio the jaw remains stationary. I have tried action/bake (remove constraints) with the action but it didnt make a difference. I tried selecting the shortcut to the model in the action in the project workspace and select bake all actions but it crashed A:M every time so I don't know if it would make a difference. I'm not even sure what that does.

 

The second issue I am having is the character moving the opposite direction after I import it into 3d game studio. If I move the torso and head to the left in A:M, it moves to the right in 3d game studio. I tried switching between exporting left handed and right handed but that did not make a difference.

 

Anybody have any Ideas about this? Is it just the rigs and their constraints messing things up? What's the proper way to set up animation for export?

 

Thanks ;)

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

Posted

I know nothing about the export options but...

 

For the bone keying issue...

 

You could set AM to key every bone, or key that bone and all its children...

So... when you move the head... it would put in a key for the jaw automatically...

This can be a bit overkill though, but it might help.

 

Baking wouldn't actually add keys unless they were there to begin with? Right?

 

Don't know anything about the direction change. Might have to do with initial bone orientation in AM being "different" or "incorrect"... total uninformed guess.

 

Vernon "!" Zehr

Posted
I am having some animation export/import issues with AMXtex to 3d game studio.

Import Xfiles to AM? Is it?:blink:

First issue is that any bone that I do not move manually in the A:M action does not move when I import it into 3d game studio.

i tested Tom with simple rig - yes, in GStudio are visible and move only those bones which animated, others why that is not present. Why, dont know.

Used demo plugin AMXtex

 

Clipboard02.png

Posted

Rigs do not work with the export. The skeletons for Direct X format must be simple like the Half life skeleton, I have also had problems with RK and found that FK is the best solution. Also realize that A6 will not except muscle motion yet. ALthough in the future they plan on supporting both bone and vertex weights, and muscle action. The most bones I've ever used is like 65 and like I said it was all FK aniamtion wich can be tedious sometimes depending on the motion your making, but there will be no errors in it, once you import into MED.

Posted

While rigs are not recommended due to the number of bones they create (just as triath5147 described), they can still work fine. If you can avoid them though, that's definitely preferable for the speed of your model in your game.

 

As for the Thom issue, I really want to help with this, but I can't figure out what the problem is. I can export the Thom model from the 2005 CD and have the animations work perfectly (there are some issues with hooks and normals, but the animation works). I just picked out the Run action (also from the 2005 CD), exported Thom and then the action, and the exported .X file showed up great in the Microsoft Mesh Viewer. I also created a basic action where the only bone I animated was the "Back2" bone. After exporting to .X, it animates perfectly in MeshViewer.

 

I'm not sure if this is just a 3DGS issue or not. For anyone having this problem in 3DGS, can you please confirm whether or not the exported .X file works in the MeshViewer utility? If I can get the model and animation that don't work, I would be happy to take a look at it.

 

Thanks everyone,

Posted

I got the tsm rig and the thom rig to work in the model editor. I exported the model left hand. Then before starting the action I keyframe all bones in all filtered channels. Then just animate as normal, you dont have to keyframe all bones every time. Just the once so game studio knows they are there. The models go in the right direction now and all the bones move.

 

The only thing is that the first frame of the animation in game studio med is the model faced backwards, then the second frame is the model facing the right way in his first position. I would imagine you can get rid of this first frame in gamestudio somehow, i just dont know how.

 

I dont know how to get the animation to the character in the game editor or the engine yet, will have to figure that out now.

Posted

oh well, I thought I had it.

 

The animation looked fine on initial import into the game studio med, but when i saved it as a game studio model then re-opened it the model was all over the place.

 

I am not familiar with a half life skeleton. I guess I have to figure out a simple rig. Triath, do you have an example of a simple biped rig i could look at? The problems I seem to have with just a simple straight forward rig are the hips moving whe I move the spine bones, and the spine does not bend smoothly, it stays straight. Can I keep the feet in place with a simple fk rig? I am use to the set up machine, I have not been very successful building my own rigs in the past unfortunately.

 

I can't seem to get my animation into the WED, it is in the model file, but I don't see anything under actions when I open it in the WED or anything. What's the way to get it into the game engine?

Posted

Let me start with the first problem I remember. The first frame in ur animation is backwards.

 

The first frame displayed in MED in the animaiton sequence is the construct, or default frame, it is or should be the model in it's T pose, or default position. Do not get rid of this frame, because when you script your actions, you will have reset to null or 0,0,0 instructions, this wipes the slate clean during animations, so that bone data doesnt keep adding up, till ur legs and arms are roatated all over the place. When you build models in AM for Game Studio you need to have the right view as the front view, this is because Med uses a different Z axis then the rest of the modern world. There was supposed to be a fix in an update for this, so that when you import Direct X format into MED you could change the "Z" to 90 deg or whatever to align your actor to the A6 world. Although they havnt fixed it yet to my knowledge, So just rotate Thom in AM to 90 deg to the right and don't forget to rotate the skeleton as well and line it up again.

 

The animation looked fine till you saved it.

 

This was an error in my wording. Not that Chris's exporter can't handle rigs, but Game Studio can't handle rigs.Once you save into A6's format it can't handle all the bone information. Bone animation is new to Game Studio as A6 is the first year for bone animation. Before it was all vertex aniamtion.

 

The half life skeleton was just an example. All you need to do is start with a pelvis bone, and add on, like 2 to 3 spine bones a neck and head and jaw if your character talks, than make shoulders, bicepts, forearms and hands, fingers if u need em. thighs, calfs, feet and toes. I think my Bipeds have a total of maybe 30 bones. Like I said no locking of feet to ground or anything is used. ALso for the collision detection to work properly your model should have the world axis at the pelvis, not at the feet. In your animations just place a marker at the feet, so you have a visual of where the ground plane will be. Do this by clicking on the rulers at the side of the action window. And the less the bones the better, Bones tie up memory. Remember even a main charcter in motion and depending on the camera view will only be about 6" tall at the most on a large monitor, there is alot of detail that can be avoided. So don't over do it. Also depending on the cameraa angle, for instance a 3rd person cam that follows you. The camera will be behind the character 90% of the time. SO making alot of detail in the face and so on is a waste of memory. Theres no reason to make a face with 800 polies, if you never see it except in cut scenes. You'd be surprised what careful placement of splines and creative texturing can do. Most of my main characters are 1500 polies or less.

That means about 600-900 Hash patches.

 

Oh one last thing. When you make your skeleton also open the properties for each bone, and where it says connected to parent, change that to no. That will keep your whole skeleton from twisting out of control when you move one bone. AT first it is tedious, but after you get used to it, you'll be animating in no time. Also remember that you dont need in-between frames in A6. The program will fill in between your keyframes and allow you to control how fast and slow the animations play, by adding more in-betweeners. I have seen alot of people starting out in bone animation in A6 using like 30 frames to make a walk sequence, till its all said and done, when you have all your animations made, their characters were in the mega bytes!!! keep the animations to key frames only. You only need 8-10 frames to make a great looking walk.

Posted

Hey, Triath! Great help in here.

 

I also have been playing with AMXtex and gamestudio today. So far I managed to export a woman model into MED and use it to replace the CBABE.MDL model in the techdemo, just to test.

 

I do use a complex rig, and the model is unnecessarily complex too, but I already had that and just wanted to try the engine.

 

It's annoying the fact that the models are rotated 90 degrees, so they walk on their sides. Useless, unless you are making a crab game.

I didnt' understand very well your suggestion of turning the model in AM. Is there a simple way to correct this, or you mean that I have to model to the RIGHT view, then animate a walk to the right view direction and so on? kinda twisty minded huh... Will work this way?

 

Other than that, i partially succeded in importing and animating. I renamed the frames on my model as the CBabe.mdl file (stand1, stand2, stand3, stand4, walk1, walk2, walk3, walk4 and so on). Strangely the stand loop works but not the walk loop.

 

Well, these are preliminar tests, not very methodic, before I get more into gamestudio coding and such. Thanks for your very good explanation!

 

Cheers.

Posted

Yes the models need to face the right view, so the front of the model. SO when you hit the "6" key you should see the front of the model, ( instead of the "2" key) <this all assuming you have the keyboard shortcuts at their default>

Tell ya the truth I never took an animation not facing the correct way to begin with, So I dont know how it would react. But After you rotate your model, go to sketal mode, grab ur pelvis bone, or which ever bone is your parent to the rest, and rotate the whole skeleton and line it up with the model. When your in Action mode, if you open an animation it should play using the bone's rotation informaiton, I don't think it will rotate the actor, but like I said I never tried.

Posted

I am having another issue, for some reason on my construct frame in game studio all the faces are turned inside out so i see the inside of the model. The rest of the frames they are fine. My model is left handed, so it goes in the right direction. I tried with and without exporting mesh normals.

 

I have skeleton and model facing right. On the first keyframe of the action i make a keyframe in all filtered channels. then i animate and export the animation to my .x file.

 

Any ideas?

 

Triath, did you come across anything like this?

 

Oh, and also I cant merge vertices anymore, the button is grayed out.

Posted

I think this may help:

 

Left-Handed: this option is only to correct importing in applications that use a slightly different coordinate system, which causes the model to be 'mirrored' left to right, but not in gamestudio. The problem is that this option (export as left-handed) also flips all the normals inside out. We should ask Chris for a way to correct this in AMXtex, but it's not necessary for gamestudio.

 

Welding vertices: the button is grayed out when you are in animation mode. Turn animation mode off.

 

 

 

----------------------------------------

Also these are some hints I collected from my little experience and several other guys' vast experience :)

(triath among them of course!)

 

 

1) Use right view as front.

The easiest way is, in bone mode, select the main bone, hit ROTATE, and CTRL-rotate the bone around Y (the bone will rotate along with the geometry). To do this faster and by numbers, you can activate the Manipulator Dialog, select the main bone, hit ®otate, then type '90' in the green Y rotate field, and then, hit CTRL-ENTER. (this works if the main bone is in the default orientation used in Hash).

 

2) exporting animation with AMXtex

You can use any rig, but the most important issue here is that the bones that ACTUALLY drive the geometry have keyframe information at the first frame. You don't need to bake anything, and to avoid getting your action all messed up, the easiest way is: turn OFF all keyframing options from the bottom bar, leaving only the first button on ('key skeletal translates'). Use the 'key whole model' mode, and shift-click on the key button to keyframe 'all filtered channels'. This way you don't create unnecessary channels and also you avoid scrambling it all by mixing up bone rotation with constrains. Probably you are not using any bone translate in your animation, but that's all AMXtex needs to know that 'there is a bone here'.

 

And the good news are, you don't have to worry so much about big or complex rigs and skeletons, because:

 

3) importing animation in gamestudio

The most efficient method in gamestudio is actually vertex animation. Bone animation is slower and it's actually a new feature, and also it is only available in commercial and pro versions of the engine. But don't worry!

When importing, there will be a dialog with a series of checkboxes:

(checked) MESH

(checked) MATERIAL

(checked) BONE

(unchecked) POINTS ANIMATION

You should uncheck BONE (since it is not supported in std/extra) and check POINTS animation instead. To my surprise, this converts all bones keyframes to vertex keyframes!

Also, by unchecking BONES, you are ignoring huge unnecessary content. The importing time will be reduced dramatically. (from 15 seconds to half a second, on my 5000 patch test model!)

 

It worked like magic so far. It's good to know that you can use A:M best animation tools the way you like, and you will obtain an equally efficient animation as with simple FK animation!

 

I know I have repeated some tips that have been said already, but I thought it was a good idea to put them together. IF you have any other tips to add here, we can build ourselves some kind of quick manual for A:M / AMXtex / Gamestudio :)

 

Good luck

Posted

Now, a new problem to solve:

 

.X files with more than 1 animation can't be imported in MED. The program freezes before the importing dialog. Any clue on why this is happening?

 

I found no other way to have a model with all animations that the ridiculous task of making a single action with all character animations in a sequence! i.e. walk, run, crawl...

Posted

Ok, I kinda found a solution for this...

 

 

Appending animations in gamestudio

Importing .X files with several appended animations (As in appended in AMXtex) doesn't work in GameStudio. The best way i found so far is as follows:

 

1. Export the model using AMXtex i.e. "Goblin.x"

 

2. Export each animation appended to a new copy of the file. i.e. "Goblin - walk.x" "Goblin - run.x" "Goblin - jump.x"

 

3. in Gamestudio, for every animation

- import the file, i.e. "goblin - walk.x"

- rename the frames i.e. 'walk 1, walk 2, walk 3...' . There's a command for that.

- file - export - export model to ASC and tell the exporter to create frame named files only. It will then create one file for each frame, i.e. "walk1.asc, walk2.asc".

 

4. Once you have exported all animations you want to append, open your .X model, save as MDL file, and then

- file - import - import append frames. A dialog will open. Go to the location you saved the named frames into, and then select them and click OK.

I suggest that you select frames from ONE animation at a time, so you append the animations in the order you want. Otherwise they will be appended in alphabetical order.

 

Remember that gamestudio uses a frame names convention for default behaviors, like 'stand, walk, run..." . see the manual.

 

-

Posted

Emilio AKA Mosca,

 

I don't know what you are doing different but my model IS mirrored left to right. When I move the model left in a:m and export it right handed it moves right in game studio. As far as I can tell we are doing the same thing.

Posted

Emilio made some great points in the last few posts, and he has some interesting work arounds.

All I can really add is, it is actually much more efficient to make all of your animations in one file in AM. For instance the Action Bird main character had like 40 different animaitons, and over 1000 frames. Although it is easier for animating and watching your animations to look for flaws in AM making each animation in a different action, You should cut and paste them all into one file.

For instance you make a walk animation. Say you keep your keyframed bone movemants to frame 0 frame 5 frame 10 frame 15 and frame 20. SO every 5 frames you key frame a change, and the other 4 are inbetweeners. Just like AM interpolates, and calculates to blend between those 5 keyframes. SO does Game Studio. it is actually only the 0,5,10,15,and 20th frame you need for your export.

WHat I would do is. start an animation file called game. and than I would create my walk and run and so on in other action windows. Once I got the action to look like I wanted. I would copy and paste my keyframes to the game action. This way the game action only had keyframes, and no unneccassary frames.

Now you call your actions in the game script by name, SO once you export to Direct X format (right handed) Since AM also uses a right handed system as well. Now I would always import my model with animation into Ultimate unwrap for my skinning. It is possible to skin in AM, and I do for a few models, but for more complex unwrapping the dedicated unwrap program is much easier and quicker.

I would than export from Unwrap to game studio, and all was fine. If you import directly from AM into Gamestudio, I have found that everything is mirrored as dborruso is stating. But checking left handed is not the answer. Frankly I don't know what the answer would be.

ANyway once in MED, you go to animation mode, click edit, frame names, and you select a group of frames and type walk, run etc. and MED will number them properly.

Hope that helps, and I'm not just rehashing stuff.

Posted

Oh, one last thing I forgot. When you animate for cycling animations like walk and run. If you last frame is the same as your first frame. Make sure you delete the last frame. Or in game you will get a glich, as it cycles.

Posted
Emilio AKA Mosca,

 

I don't know what you are doing different but my model IS mirrored left to right. When I move the model left in a:m and export it right handed it moves right in game studio. As far as I can tell we are doing the same thing.

Yes, you are right - i was wrong. Thanks for noticing this.

 

Models must be exported as left-handed indeed, and this opens a new bunch of problems.

 

For some reason, left-handed models have all its normals flipped inwards. But animation keyframes are right.

 

If you go to the 'construct' frame in MED and flip all normals back, then the animation keyframes will be flipped bad.

 

I guess it has something to do with the mirrored bones animation - the same way it happens if you scale a bone -100 in some direction. I feel it would not be hard to fix this somehow in the exporter, but that's a task for Chris :)

 

 

triath: your tips are more than welcome, as we are trying to figure out every task. Ultimate unwrap may be an easy solution if you are decided to invest a little more money, but it would also be great if there was an easy way to go from AM to gamestudio.

 

Later!

Posted

Ultimate unwrap is like $25 US dollars when I bought it maybe 4 to 5 years ago. I dont think it's changed much since than. Yes it would be great if it was a cut and dry export. For my main character I did skin him in unwrap and export which is why i didnt think anything of it.

But when Dbrorruso said about it being flipped that reminded me that it does get backwards in MED. This never really mattered for me, becuase things like wood crates and other props I exported directly from AM, didn't make a difference if they were reversed or not. And since my characters I exported from AM to Unwrap, I never really thought much about it.

I will email Chris and see if there is anything he can do about it. If not When you export from AM to Unwrap, and than save again as Direct X in Unwrap, there are no issues.

Every model and prop in Action Bird was made and animated in AM, and I really have no complaints. It all worked well.

Posted

First of all, I wanted to say, the phrase I used 'your tips are more than welcome' doesn't make enough justice. Indeed, you are the one who has any experience on these matters. I'm just putting some things together. So, I should have rather said "you're KEY" :)

 

I think your method of pasting all animated key frames in a single animation action is the safest. What I was doing is, creating my animation, say, with keyframes every 5 frames, and before exporting, COMPRESS the keyframes so they only use frames 1-4 or so. But be aware, there's a little bug in AMXtex that makes it crash when you have keyframes at fractional times i.e. not snapped to whole frame numbers.

 

I was thinking about: what if we include a simple pose, like a 'construct' pose, as the first pose of the animation sequence? It would be flipped all right.

 

 

Hmmm... wait a minute.. i'm having a thought...

 

A-HA ! I knew it!

 

I think i found the ONLY problem here...

 

The 'bare model' , i.e. the construct frame with no animation, is NOT actually being exported left-handed. Want a test? Make a horn at Thom's head, only at right side. Export as left-handed and voilá! The horn is NOT at left side.

 

The faces normals would be correct IF the model had been mirrored, but since the model wasn't mirrored, the faces are flipped!

 

Now, the animation keyframes ARE exported left handed - that's why the flipped, unanimated object flips: because the 'construct' left hand becomes the right hand in all other frames!

 

I guess the only workaround by now is to create a construct keyframe manually - or then just ignore the normal flip in the construct?

 

-Emilio

Posted

Now I feel like a complete idiot :) That only doesn't make me feel sad because all my problems were suddendly solved.

 

 

In the manual:

 

New features...

MED .X import

  The .X import dialogue now has a [Transform] button that allows

  swapping or mirroring arbitrary axes. By default the Y and Z axes

  are swapped on importing a .X model.

 

 

In MED:

 

xdialog.gif

 

 

I highlighted the settings you should check. I only don't know what 'shift Y to 1' does. It was checked by default.

 

This imports the model, corrects the axii, corrects the normals, transform bones animation in vertex animations, and you don't need to rotate your model to the RIGHT view nor export as Left-handed.

 

Duh...

Posted

Good, the transform must be in the latest update, 6.31 or whatever, because it didn't work before. Which is why I just made all of my models facing right to solve the problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...