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

Cal3d, New Character Animation Format

Recommended Posts

I assume you need to export all the files again and can not mix files from different exports together.

 

In case you don't already know this, I found this small site about the blender2cal3d exporter. It has a small overview for rules on how to build the models and a list of bugs and unsupported features. http://home.gna.org/oomadness/en/blender2cal3d/index.html

Share this post


Link to post
Share on other sites

Well, since I can export the individual parts (animation, mesh, skeleton), I can mix stuff from different exports as long as the parts are separate from each other. Like, if I add a new bone, I would probably only have to export the mesh objects that are influenced by that bone. Or if I add a new animation, I only have to export the animations again.

 

Thanks for that site, although I did know those points from other sites, that looks like a new plugin so i'm going to try that one out :D

Share this post


Link to post
Share on other sites

Questions:

1.Are the mesh piece saved with coordinates relative to the skeleton? Or relative to 3d space, or a bounding box or something? I need to know because for some different skeleton sizes I'd like to be able to still use the same weapons. Will this be possible? Or do I have to export new meshes for them?

 

2.I can put the same animations on 2 different skeletons as long as those skeletons have the same # and names of the bones, correct? This for the same reason as above basically. Will I have to have more than 1 set of animations for different sized skeletons?

 

 

Anyway, get that new exe file to me asap, because I don't want to continue without first fixing any animation problems :D

Share this post


Link to post
Share on other sites

Ok, here it is:

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

 

It contains two files, the client(el_skeleton.exe) and a small utility I made to configure the model(ModelConfig.exe).

 

Use ModelConfig.exe as follows:

 

1)Run modelconfig.exe

2)Load the skeleton file

3)Load the mesh files(s)

4)Load the animation file(s)

Here, you will be also asked to give the corresponding MD2 animation(intosit,outsit,walk,idlesit...) and the type of the anim(action or cycle).

5)Choose "Save As..." and save it as an .elm file anywhere you want. Currently, the client reads from the file at "Eternal Lands/Cal3d/HumanMale.elm", so that's where you should save it to see it in action.

Share this post


Link to post
Share on other sites

Ok I tried the new program and it works :D Thanks :)

 

Can you answer my questions in the above post? I'm pretty sure that they will be ok, but I need to know for sure. I'm mainly concerned about the shorter & taller skeletons(I will just scale them in blender), I hope they will work all using the same animations.

Share this post


Link to post
Share on other sites

I think it will be ok, I'm not 100% sure myself though, because I can't really test it, you've only given me one skeleton to play with. Why don't you test it with 2 different sized skeletons and see for yourself?

 

Btw, this is a slightly better utility:

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

 

It has some more options, like you can use the "del" key to remove meshes and animations, or you can open an .elm file to edit it. You can also have Windows to associate the .elm files with the utility, so it opens them with just double-click on the elm file.

 

Also, I was wondering what textures the model you've given me uses. Are they already present in the game or they're new?

Edited by mikeman

Share this post


Link to post
Share on other sites

Ah great. It needed a del function and also an open function..but I didnt' want to bother you with it.

 

Ok, I'll try it out with a different sized skeleton when I get home from work. Let's keep our fingers crossed! :D

 

As for my progress on the models, assuming that the answers to my questions above are positive ones :D ....I will certainly be done with all this by the end of the week.

Share this post


Link to post
Share on other sites

The idle animations will look very stupid with this type of perspective unless I made a ton of them and they are completely random. So, that's why there's only 1 and it's static.

Share this post


Link to post
Share on other sites
The idle animations will look very stupid with this type of perspective unless I made a ton of them and they are completely random. So, that's why there's only 1 and it's static.

:blink:

Share this post


Link to post
Share on other sites

Damn... it doesn't work as I hoped it would.

 

We need to have at least 2, if not 3, types of skeletons for the player models:

tall

medium

short

 

The way cal3d is setup, from what I see it, I will have to make new skeletons, new animatinos, and new meshes for EACH set. That adds up to a ton of files and a ton of work which I was hoping to avoid by switching over to cal3d.

 

The animation translation and rotation coordinates of the bones are saved relative to the bones. So that means if i have a tall skeleton and save the animations for it, then try to use those same animations on a short or medium skeleton, the translations & rotations will be way off, because they will be scaled much higher.

 

The mesh positions seemed to be saved relative to just the 3d space? Which is even worse because it doesn't matter one bit the size of the skeleton, the mesh is always in the same place :(

 

 

So, is there a way to scale up & down the translation & rotation of the bones in the skeleton and animations by programming it? and also possibly the mesh relative to it's center point?

If not then there isn't much of a point in using cal3d...which really sucks :(

Share this post


Link to post
Share on other sites

Can you give me one additional skeleton(short), so I can work with it? I have only one skeleton, I can't solve the problem without being able to experiment...

Share this post


Link to post
Share on other sites

Yes I can...but I was thinking you'd scale the skeleton down too? It doens't matter to what size atm...just make it smaller or bigger. The skeleton remains exactly the same, it is just, literally SCALED, nothing else is done to it.

But if not I will scale one down for you when I get home..just have to wait until tomorrow I guess :D

Share this post


Link to post
Share on other sites

I've posted in their forums about this and got the response that in fact this is a "known missing feature" in Cal3D, and indeed has to do with how translations and rotations are stored. Here's the thread:

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

 

The problem is, I could easily scale the model using OpenGL, but that would mean the whole model would be scaled, including the weapons he's holding. I don't know, I guess I'll have to find a way to get around it, even if this means "correcting" the skeleton and doing the skinning myself. But I have found some new Cal3D functions that scale skeletons,animations and meshes, so it might be easier, as long as they work the way I hope. If all goes well, you would need to supply a scale factor for the skeleton, and flag the meshes scaleable/unscaleable. For instance, the torso needs to be scaled along with the skeleton, but the sword doesn't.

 

Anyway, I suppose you better stop working on the models until I figure it out, so that you don't work for nothing, but I'm pretty sure I will solve the problem, one way or the other.

Edited by mikeman

Share this post


Link to post
Share on other sites

Actually, I wasn't even thinking of scaling any meshes. The body parts will be slightly different meshes, like dwarves are stockier than humans, so in addition to being smaller, they'd also be wider and such. They're not simply miniture human models.

 

However, I'm sure for a few things allowing the mesh to be scaled too won't be a bad thing. I'm just saying it's not 100% necessary(unless i'm missing something).

 

The main problem is with the weapons and also how the "positional" vertex coordinates are saved in the mesh. I think they need to be saved in relation to the skeleton itself, so that if you resize the skeleton and try to use the same meshes, the mesh's positional vertex coords are also scaled down in relation to the new skeleton. When I say positional I mean their location in space, not their size in relation to each other.

The weapon mesh itself is not supposted to be scaled, what is scaled is only the placement of the mesh in relation to the bones. Does that make sense?

 

For instance when I tried the shorter skeleton, I also attached the sword mesh to it(that was used for the taller skeleton). The sword mesh was still in the same place as it needed to be for the taller skeleton. What it needs to do is "snap" in place to the small skeleton.

 

And of course, the animation translation/rotation also needs to be scaled in relation to the skeleton.

 

 

I'm sorry if what i'm saying is wrong, i'm obviously not a programmer so i'm just going by what I think I see happening here.

Share this post


Link to post
Share on other sites

Ok, I think I did it. First, I used Cal3D to scale down the skeleton, all the meshes(I have to since I don't have any other meshes for short models), and the animations. I works perfectly, except the whole model is scaled, including the sword.

 

So, before rendering, I get the position of the tip of the bone where the sword is attached(I found out which bone is that by experimenting a little). I use that to move the sword to (0,0,0). Then, I scale it up again in its normal size, and finally reposition it in its right place. All that of course through a single GL matrix. It looks fine, I can't see anything wrong.

 

So, correct me if I'm wrong:

 

I assume we have the skeleton, all the meshes, and all the anims for the "tall"(human) model. Now, for the "short"(dwarf) model we need:

 

a)The same skeleton just scaled down.

b)The same animations

c)Dwarf body meshes that are "rigged" to the "scaled down" skeleton. Weapon meshes are reused.

Share this post


Link to post
Share on other sites

Great! :P

 

I will have the short skeleton & meshes ready for you for tomorrow, although they might just be test objects and not the real thing, depending on how much time I have.

 

Thanks a lot!

Share this post


Link to post
Share on other sites

Ok, well I think it is approx. 60% of the original size...you'll have to wait until tomorrow for the exact percentage, so if you want try around there.

Share this post


Link to post
Share on other sites

mikeman, is it working all ok? No rush on your part, but I just need to know so I can continue with the models, or not.

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.

×