.B3D ANIMATION
Blitz3D Forums/Blitz3D Beginners Area/.B3D ANIMATION
| ||
I'm having a problem animating meshes saved in .b3d format. I use LoadAnimMesh and if I load each sequencs one at a time they all work perfectly. However when I use LoadAnimSeq to put the whole animation together I have a problem changing sequences. I seem to end up with half of sequence 0 and half of sequence 1. I dont have this problem if I load the animation in .x format it all works ok. Problem is I've just completed a boned animation and need the .b3d format to load into Blitz Can anybody help >Carpman |
| ||
I think somebody reported this Problem before, you might use a search in the Bug report Forum, maybe you find the Person and maybe that guy found a solution. What app did you use to save the animated Mesh? |
| ||
Thanks, I've been through the Bug reports but can't find anything relevant. I used 3DCanvas to create the models exported in .x format and used Stickmans' DX8 to B3D to convert the file. The only way I can think of to work round the problem would be to load each animation into a seperate player entity ie. one for walking,one for running etc. Seems crazy. thanks anyway >Carpman |
| ||
If you want the .b3d animations to work use this into it: Graphics3D 640,480,0,2 Cam= CreateCamera() MoveEntity cam,0,20,-50 Man=LoadAnimMesh ("jart dant.b3d") Animate man Repeat UpdateWorld RenderWorld Flip Until KeyHit(1) End i got this from the creators of blitz. |
| ||
Thanks but the animations do work. It's changing the sequence thats the problem. If KeyDown(200) ; move forward If AnimSeq(player)=0 Animate player,1,.7,1,5 ;Change anim sequence MoveEntity player,0,0,-.7 ;move the player PositionEntity campivot,px,py+14,pz+15 ;move the camera Else If AnimSeq(player)=1 Animate player,1,.3,0;change anim sequence EndIf Sequence 0 player in idle mode legs not moving but torso rotates as if looking around. Sequence 1 player walking When you leave go of the forward arrow key the player returns to sequence 0, which it does but the legs are still in a walking position, which is part of sequence 1. Hope this makes sense. HELP ANYBODY >Thanks Carpman |
| ||
Could you post the model? Or should I send you a mail, so yo can return it to me? |
| ||
How do I post the model? If you send a mail I'll return the model and skin Thanks Carpman |
| ||
sent. expect my answer (no bugfix-guaranty given) not before tomorrow evening - lots of work... |
| ||
your code looks wrong, your telling it to animate the player if the animseq = 0 but then when it does = 1 your telling it to animate 0. try if keydown(200) if not animseq(player) = 1 Animate player,1,.7,1,5 ;Change anim sequence endif elseif not keydown(200) if not animseq(player) = 0 Animate player,1,.3,0;change anim sequence endif endif if animseq(player)=1 MoveEntity player,0,0,-.7 ;move the player PositionEntity campivot,px,py+14,pz+15 ;move the camera endif |
| ||
Thanks Sinu, I tried your code but get the same results. I'm sure this is a problem with the .b3d file format. As a test loaded an old jointed model with seperate arms,legs etc. It worked perfectly in .x format but not with the .b3d format. Thanks anyway >Carpman |
| ||
send me the model and i'll see what i can do, i do alot of complex animation stuff with my blitz3d project. zen27149"at"zen.co.uk |
| ||
Sinu Thanks, it's on its way >carpman |
| ||
carpman - I tried it, it shows the same behaviour here, legs "don't find initial position". Q: Did you set any keys for the legs bones in the idle animation? Because I think even when there is no animaton in the legs it needs some keys which have been set right on the first frame. I usually do this: select all bones/joints and set the first frame as a global keyframe (in CharacterFX). All following keys can be set individually for each joint (per Sequence). |
| ||
jfk-Thanks you seem to have found the answer.I re-animated the idle animation but now get the opposite with sequence 1. The legs from the walking anim. and torso from the idle anim!!!! but at least I now know what the problem is so need to work on it. This is my first attempt at a boned animation.It's taken me ages to get this far but it seems I still have a lot to learn. Thanks again >Carpman |
| ||
Here is one more Tip: First I select all joints and set a keyframe for all of them on the first frame. Then I decide the number of frames of the sequence, eg. 30. Then I set a keyframe on the last frame for all joints as well. Now I can set individual keys between start and end and I have a fully working inverse kineamtic that will loop pretty good. If I have finished the animation work I set the second-last Frame as a Keframe for all Bones as well, then I cut the very last frame off, simply by reducing the animation lengt by 1 frame. At least in CharacterFX this can be done. Cutting off the last frame will make the looping smoother since the last frame was the same as the first... Hope you'll be successful with this. |
| ||
I've done it! I've done it! I've done it! After weeks of work everything now works ok. Thanks to everyone for thier response especially jfk who finally solved the problem. I would never have thought of putting key frames on parts of the model that don't move. I was about to give up, three cheers for Blitz Forums >Carpman |
| ||
Congratulation! :) |