Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Roja

Cal3d, New Character Animation Format

Recommended Posts

Yes but, I need to know the proper speed for the walk animation. I just made a walk animation with 16 frames. Now, let's say i'm in the game and I only move ONE tile forward for a walk. Is it going to play that full 16 frames? Or will it stop before that keeping in time with the fps?

Share this post


Link to post
Share on other sites

I don't really understand what fps has to do with that. The speed of the animation will be the same regardless if the character walks 1 or 100 tiles, isn't it? When the player starts moving, I just start the animation sequence, the animation plays at the defined speed, and when it reaches the target tile, I stop it. Whether this animation sequence will last for 100 frames(make several loops) or for 8 frames(stop the sequence halfway) is irrelevent. The fps will be the same.

 

Just to clarify, when we say frames per second, we mean animation keyframes per second, right? As in, 8 fps means that the animation will "cover" 8 keyframes in one second. It has nothing to do with the game fps.

Edited by mikeman

Share this post


Link to post
Share on other sites

yes, I mean animation frames per second. I will say afps to clarify that from now on :)

 

Well I guess it's more a matter of what will look good in the game, and I won't know that until I see the models actually there and testing it out. So I'll just base things off the old animations frames. I'll slow down the fight animations..and walk..i dnot know how it'll look with 16 afps so i'll keep it like that now then wait and see. It's easy enough to resize the animations in blender.

 

I'll send you another file later on today with more animations and also more mesh pieces.

 

 

....but that Jump, you said it's still there? that is a big problem and needs to be solved. I dont see how ti's blender's fault, It should loop smoothly.

Share this post


Link to post
Share on other sites

Sorry, but again I don't understand the problem. Why you have to see the models in-game? What's the difference? Blender has a preview so you can see the animations playing, right? If you set the anim speed to 16 afps, it will play it in 16 afps. The game will play it in 16 afps too. We're not talking about "virtual" seconds that differ between Blender and the game, this is actual time. If the animation looks "natural" on Blender, it will look exactly the same in-game.

 

As for the "jump", I only saw that in miniviewer. I'm testing the model in-game as we speak, so I don't know how it looks yet. I'll let you know.

 

-EDIT: Ok, I loaded the model in the game and I can't see anything wrong with the animation. Maybe it was my idea or something with miniviewer.

Edited by mikeman

Share this post


Link to post
Share on other sites

Oh ok, that's great then :)

I'm having a small problem in blender, it's not givng me a smooth loop and there's nothing wrong with the actual animatino key frames to make it pause in blender...which is why i was worried about the jump you talked about. So I'm assuming it's just some settings in blender that i dont have right.

 

I will start to really work on the animations now, and hopefully get the 1 human model completely done today.

Share this post


Link to post
Share on other sites

oh, and another question :(

 

For some animations, such as Into_fightstance and Out_fightstance, the animation can be exactly the same, just reveresed. So, is it possible for me to give you just one animation(into fightstance), and you take that animation and tell it to play backwards for out of fightstance? If not it's no biggie..btu it would just save having another file :(

Share this post


Link to post
Share on other sites

Yes, I can do that.

 

-EDIT: Hm. I worked on this a little, and eventually Cal3D don't seem to handle it very well,unless there is something I'm missing. I'll look at it again and I've posted in their forums, but I think it's better to include the inverse animations too.

Edited by mikeman

Share this post


Link to post
Share on other sites

Ok I ran into a few problems, which i'll solve today, so i didnt' get to finish it yesterday. But nearly all the animations that we have now in the game are done...so I'm hoping that if all goes smoothly to have all the player-characters up to date by the end of this week or next week ;)

Less work than I thought.

Share this post


Link to post
Share on other sites

I guess by next week I could finish the client code, but maybe we should wait a little before we release an update, because there are 2 very important things I want to add after I'm done with the basics:

 

1)Dynamic LOD(which is supported by Cal3d). That way, when the view is zoomed-out, the models will use less polygons. Since in zoomed-out views there can be more characters on screen, it will speed things up.

 

2)Vertex shaders support, so the bone animation can be executed in the GPU. It will greatly imrove the performance. This may take a few more days.

Share this post


Link to post
Share on other sites

Mikeman, how soon will it be possible to give me a client so I can see the characters for myself in the game? I've never had the pleasure of working with WYSIWYG software, and I don't want to make all the models and then find problems in the animations that I need to go back and fix..Unfortunetly exporting from blender doesn't mean i can just press export ;) I have to change all the names of the IPO curves, bake each animation, etc...pain in the ass.

I'll get you the 1 model with all the in-game animations by the end of today. I just need to see that one model walking around and doing all of his stuff.

Share this post


Link to post
Share on other sites

ah figures.. time to go to bed and i get errors when trying to export..dammit...i'll hopefully get it for tomorrow then. problem is is taht i've got a ton of animations and they make you do a whole bunch of bullshit to export the damn thing correctly..so i'ts going to take a while. This is also why i'll need to see the models in the game asap, I dont want to have to go through the whole export process over and over.

Share this post


Link to post
Share on other sites

Ok, I've almost made a first version of this. For a real update, I'm probably have to sit down and design a new system(with new structures for animation,defs, message handling...) but for now I'm just mapping the new animations to the old ones. Only the player's model is rendered with Cal3D. For the mapping, I'm using a text file that is organized in triplets and looks like this:

 

Cal3dModels/testwalk.caf

walk

cycle

Cal3dModels/testsit.caf

intosit

action

 

The first line is the name of the animation file, the second is the name of the MD2 animation that will be replaced, and the third is indicating whether the anim is a cycle or an action(just executed once).

 

I'll upload it today, probably in a few hours.

Edited by mikeman

Share this post


Link to post
Share on other sites

Ok, here it is:

http://www.angelfire.com/games5/mikeman/el_skeleton.zip

 

I've included all the .dll files(like libxml2,iconv,zlib1...) it needs to run. Just extract it to your Eternal Lands root dir, run el_skeleton.exe and hopefully it will work. Right now it just has 2 animations, walking and sitting. If an animation doesn't exist, it just shows the model in its original position. If you want to add an animation, open AnimMapping.txt with Notepad and edit it.

Edited by mikeman

Share this post


Link to post
Share on other sites

Ok I'm having more export problems...it seems to complain that there's vertices selected???? I thought these vertices might be unweighted, so i checked them out but they are all weighed fine.

Here's the errors from the console:

 

In mesh: hat1, Vertex 16 is selected

In mesh: hat1, Vertex 17 is selected

In mesh: hat1, Vertex 1 is selected

In mesh: hat1, Vertex 2 is selected

In mesh: hat1, Vertex 7 is selected

In mesh: hat1, Vertex 4 is selected

In mesh: hat1, Vertex 13 is selected

In mesh: hat1, Vertex 14 is selected

In mesh: hat1, Vertex 5 is selected

In mesh: hat1, Vertex 12 is selected

In mesh: hat1, Vertex 3 is selected

In mesh: hat1, Vertex 11 is selected

In mesh: hat1, Vertex 21 is selected

In mesh: hat1, Vertex 15 is selected

In mesh: hat1, Vertex 6 is selected

In mesh: hat1, Vertex 0 is selected

In mesh: hat1, Vertex 18 is selected

In mesh: hat1, Vertex 8 is selected

In mesh: hat1, Vertex 19 is selected

In mesh: hat1, Vertex 9 is selected

In mesh: hat1, Vertex 20 is selected

In mesh: hat1, Vertex 10 is selected

In mesh: hat1, Vertex 22 is selected

In mesh: hat1, Vertex 31 is selected

In mesh: hat1, Vertex 23 is selected

In mesh: hat1, Vertex 24 is selected

In mesh: hat1, Vertex 25 is selected

In mesh: hat1, Vertex 26 is selected

In mesh: hat1, Vertex 27 is selected

In mesh: hat1, Vertex 28 is selected

In mesh: hat1, Vertex 29 is selected

In mesh: hat1, Vertex 30 is selected

In mesh: hat1, Vertex 32 is selected

In mesh: head1_humanm, Vertex 50 is selected

In mesh: head1_humanm, Vertex 52 is selected

In mesh: head1_humanm, Vertex 54 is selected

In mesh: head1_humanm, Vertex 56 is selected

In mesh: head1_humanm, Vertex 55 is selected

In mesh: head1_humanm, Vertex 58 is selected

In mesh: head2_humanm, Vertex 0 is selected

In mesh: head2_humanm, Vertex 1 is selected

In mesh: head2_humanm, Vertex 6 is selected

In mesh: head2_humanm, Vertex 5 is selected

In mesh: head2_humanm, Vertex 2 is selected

In mesh: head2_humanm, Vertex 7 is selected

In mesh: head2_humanm, Vertex 3 is selected

In mesh: head2_humanm, Vertex 8 is selected

In mesh: head2_humanm, Vertex 4 is selected

In mesh: head2_humanm, Vertex 9 is selected

In mesh: head2_humanm, Vertex 10 is selected

In mesh: head2_humanm, Vertex 11 is selected

In mesh: head2_humanm, Vertex 15 is selected

In mesh: head2_humanm, Vertex 18 is selected

In mesh: head2_humanm, Vertex 13 is selected

In mesh: head2_humanm, Vertex 25 is selected

In mesh: head2_humanm, Vertex 12 is selected

In mesh: head2_humanm, Vertex 21 is selected

In mesh: head2_humanm, Vertex 20 is selected

In mesh: head2_humanm, Vertex 17 is selected

In mesh: head2_humanm, Vertex 23 is selected

In mesh: head2_humanm, Vertex 22 is selected

In mesh: head2_humanm, Vertex 14 is selected

Traceback (most recent call last):

  File "<string>", line 1650, in bevent

  File "<string>", line 1234, in export

  File "<string>", line 410, in vector_normalize

ZeroDivisionError: float division

 

So, then I deleted hat & head2 & head1...just to see if it'd work...and this is what I get:

 

 

Traceback (most recent call last):

  File "<string>", line 1650, in bevent

  File "<string>", line 1234, in export

  File "<string>", line 410, in vector_normalize

ZeroDivisionError: float division

 

I hate exporting :D

Share this post


Link to post
Share on other sites

Ok I tried again... same stuff. I dont know what else to do, this is ONLY happening when exporting the mesh. The skeleton and animations export just fine.

 

blender2cal3d.py V0.7 I get this error:

Traceback (most recent call last):

  File "<string>", line 1497, in bevent

  File "<string>", line 1097, in export

  File "<string>", line 405, in vector_normalize

ZeroDivisionError: float division

 

 

And I also found a newer exporter here:

http://home.netspeed.com.au/mcginnes/blend...nder2cal3d_2.py

Here's the thread on Sourceforge I found it on:

http://sourceforge.net/forum/forum.php?thr...&forum_id=82531

Traceback (most recent call last):

  File "<string>", line 1650, in bevent

  File "<string>", line 1234, in export

  File "<string>", line 410, in vector_normalize

ZeroDivisionError: float division

 

At any rate, I looked at the python code and the errors occur in the same places. I coudln't find any hints in there to help me find the problem..but i'm not a programmer so maybe someone else could.

Share this post


Link to post
Share on other sites

Ok I tried that exe file you made, first i was missing the cal3d.dll and msvcrtd.dll. So i got those and it started to load, the window came up, then it crashed.

 

I made a folder Cal3dModels to put all themodels and animations in..and I made that text file...just put it in the root dir, and in the cal3d folder cause im' not sure where else to put it.

Share this post


Link to post
Share on other sites

yayyy! I found the bug :)

 

ok well it's way past my bedtime now, so for sure tomorrow I will export the stuff that it finally works :(

Share this post


Link to post
Share on other sites
Ok I tried that exe file you made, first i was missing the cal3d.dll and msvcrtd.dll. So i got those and it started to load, the window came up, then it crashed.

 

I made a folder Cal3dModels to put all themodels and animations in..and I made that text file...just put it in the root dir, and in the cal3d folder cause im' not sure where else to put it.

Ehm, you were supposed to extract the whole zip into the folder "Eternal Lands", not just the exe. It will extract there all the files it needs to run(including cal3d.dll), as well as a folder named "Cal3D", which has the model and "AnimMapping.txt", which is also necessary. As for msvcrtd.dll, my bad, I accidentaly builded a debug version. I'll upload the correct one right now.

 

-EDIT: Ok, here is the correct exe:

http://www.angelfire.com/games5/mikeman/el_executable.zip

 

It's just the .exe. Don't forget to extract the whole el_skeleton.zip to "Eternal Lands", and then extract the new .exe in there.

Edited by mikeman

Share this post


Link to post
Share on other sites

hm..wehn i looked in that other zip file the only files there were the .exe and libxml2.dll. Ok well i'll try again with the new one when i get home.

Share this post


Link to post
Share on other sites

oh no, those were on my end...animation "bugs". sorry to confuse you :ph34r:

 

However, the new walk animation I made has 16 frames, instead of 13. When I try to replace the old walk anim. with the new one(using the same name as the old one), the .exe will load, i can log in, but as soon as i try to move it crashes.

Share this post


Link to post
Share on other sites
However, the new walk animation I made has 16 frames, instead of 13. When I try to replace the old walk anim. with the new one(using the same name as the old one), the .exe will load, i can log in, but as soon as i try to move it crashes.

The same thing happened to me, when I tried to mix old and new files. Probably inconsistencies between the old skeleton file and the new anim files. When I used only the new files, it worked. I'll work on parsing a .cfg file so you can define skeletons,meshes and animations yourself.

Share this post


Link to post
Share on other sites

Alright, thankyou :ph34r:

 

And yes the new skeleton is different from the old one. I added another bone-and probably a few more will be added as well. Not sure on that though.,

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×