Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Mon Aug 19, 2019 4:25 am

All times are UTC




Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Animation format file
PostPosted: Mon Nov 13, 2006 1:46 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I already started with the animation work, but i need a list of desired features to implement the new animation format file.
Currently i'm working over Milkshape3D format file, but i have seen a lot of optimizations that could be directly apply to our own animation format file. Should this be a page in the wiki?

Here the list of features, that will be updated as needed:

Usability features:
    The format file will have 2 version: ASCII and Binary. ASCII will be used during development and could be changed manually, binary will be used for releases, cause its huge speed improvement loading.
    In short this format file will allow to load ms3d animated files but more importer/exporters are needed.
Technical Features:
    The file will have just 1 model
    Each model can have more than 1 object
    Each object will have a list of vertices, a list of triangles and a list of joints(bones)
    Each vertex will have info about its position, color, normal, and we can add more data as needed. Improvements in this structure will make newer following version incompatible betwen them.
    Each triangle will have a list of 3 vertices, its applied material, a face normal.
    Each bone will have a list of affected vertices, an initial position, and initial rotation, and a list of position and rotation keyframes.
    Each keyframe will have position, rotation, and time.


Till now i see problems with the materials. Multitexturing is not allowed at all. Ideas to improve it?
I see one improvement: each keyframe should have a flag for the "interpolation type". Since only important keyframes of the animation will be keyframed, the rest will be interpolated. So i suposse that is a must to allow different types of interpollation (linear, smooth, spherical, etc).
Phorem, what do you need to implement your game? Xfennec how do you see all this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 8:19 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Ok, this subject is large, but interesting. IMHO, we need :
- a real skeletal animation support, and not a morph system like the current MD2 code
- a system with vertex weight support
- our own file format, but based on the current TRI format (build another file format now, and only for animations is the wrong path !). It will automatically allows multitexturing, env.maps, shaders, and so on ...
- something compatible with Blender
- a RayODE compatible system (skeletals must be able to control RayODE elements, for example, fall back to a regular ragdoll if needed, ...)
- a plugin for BVH motion capture files ! (thru Blender, why not)
- inverse kinematic ?

This subject is described by many developpers (free, commercial, games, engines) as a real nightmare, so being helped by libs like Cal3D shouldn't be excluded, I think.

All this is debatable :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 10:11 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Xfennec wrote:
- a real skeletal animation support, and not a morph system like the current MD2 code

Which is the difference?
Xfennec wrote:
- a system with vertex weight support

Ok
Xfennec wrote:
- our own file format, but based on the current TRI format (build another file format now, and only for animations is the wrong path !). It will automatically allows multitexturing, env.maps, shaders, and so on ...

Ok, but i'm afraid that the current tri format file is not compatible with vertices animation... If each line is 1 triangle (i'm not sure about this) then we can not perform vertex movement, vertex weighting, and so.
Xfennec wrote:
- something compatible with Blender
Ok, thenk i should start with a simple blender animation exporter.
Xfennec wrote:
- a RayODE compatible system (skeletals must be able to control RayODE elements, for example, fall back to a regular ragdoll if needed, ...)

Hmmm, here i will need a lot of help, i'm not so comfortable with ODE as you ;)
Xfennec wrote:
- a plugin for BVH motion capture files ! (thru Blender, why not)

BVH... i have to learn about it. I never heard about it.
Xfennec wrote:
- inverse kinematic ?
Hard... but it's a pretty feature :)
Xfennec wrote:
This subject is described by many developpers (free, commercial, games, engines) as a real nightmare, so being helped by libs like Cal3D shouldn't be excluded, I think.
Yep. But a few years ago i succes making an directx ms3d importer. That was a real pain, but now i have some experience, and the real hard part is the matrices management (inverses, transposed and so kind of...). Anyway using Cal3d would quit us a loooot of work...Even we could embed cal3d in the code of Raydium, so it won't be a dependency. However, cause cal3d is c++ and is object oriented, i preffer that raydium would not based in cal3d.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 7:10 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
ok, i have seen that tri format file has 1 vertex per line and not 1 triangle per line ;P


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 9:33 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Some explanations about morph and skeletal animations :

Morph animations (some use the term "key frame"), as used in MDL, MD2 and MD3 file formats, for example, stores reference frames (the basic idea is to save many and make a linear interpolation between differents frames :

Two frames (say T and T+1) :
http://ftp.cqfd-corp.org/raycap-anim1.jpg

and the interpolated T+0.5 model :
http://ftp.cqfd-corp.org/raycap-anim2.jpg

This is quiet easy to read and to deal with, but it use a lot of memory (disk and RAM).

Skeletal animation is based on bones (MD5, bvh, milkshape), and then the bones are attached to vertices (ideally with a "weight") :

A bone, readed with a BVH player ("mocap") :
http://ftp.cqfd-corp.org/raycap-anim3.jpg

Setting a weight for vertice in Blender :
http://mediawiki.blender.org/uploads/6/ ... h-tail.png

Hopes it makes things clear on this subject ;) (It was not specially for you vicente, I thought you probably know most of all this)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 4:11 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Ok, all set to begin my tests... i'll keep you all informed.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 6:48 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
One more thing, which is the latest version of the tri exporter? triEXP-B2-36.py?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 15, 2006 8:37 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Yep. But your message is probably related to the post in the "Graphism" forum, so we'll try to update ASAP the exporter.

If you start working on this, please remember that this script have a young brother, triEXP-MD2-36.py (the one responsible of MD2 exportation) which should be then updated too. Perhaps it's possible to factorize things and merge these scripts, why not.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 29, 2007 1:56 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I'm here again (well, at least for a couple of days).
I have decided to base this work in BVH format cause this summer it will be available the BVH exporter according a note about Google Summer of code.
http://wiki.blender.org/index.php/Blend ... 2007_Ideas
In fact the exporter will be:
Quote:
BVH importer/exporter improvements (Python/C)

* Note, a BVH importer is alredy included with Blender, an exporter was also written once but is not included anymore because it only worked with a hierarchy of animated Empty's rather then an Armature
* Write a BVH exporter that works with armatures.
* Write an IPO curve fitting function to make imported BVH animations files easier to edit.
* Write a tool to clean up jitter in an IPO curve (filter to improve a BVH from a motion capture device).
* Test how well Blender is able to re-target an animation (apply the animation from 1 BVH to an existing armature) - Improve blenders animation tools for this process since BVH's are ofter used for this.


Until then, I'll begin gathering a few BVH files to do an BVH importer in raydium. Then i will have to mix the Raydium exporter with the Blender BVH exporter. And finally one more mix will be needed: BVH importer + raydium importer. Easy to say...

For reference: http://www.centralsource.com/blender/bvh/what.htm

And this could be our goal in a future:
http://www.naturalmotion.com/files/dyna ... studio.avi
http://www.naturalmotion.com/files/Sig_ ... _Large.avi


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 29, 2007 9:34 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Hi vicente !
I'm also sure that BVH support for Raydium is a nice idea, whatever is a native support or a BVH-to-internal-format script. I could look very great !

Btw, impressive videos !


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 11:35 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Just a simple update.
I have found a good base code to make the import. I have translated it to english and also i have made a few modifications to allow it work in Raydium (but i have respected the copyright and the license is gpl).
Currently the Bvh file is loaded in memory and even the structure can be write into a debuging file (maybe this could be usefull to use with raydium_ode_capture_3d).
The next step is to play the animation and then show it on the screen.
As soon as it becomes visible i'll post an screenshot.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 05, 2007 9:30 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
And here is the first screenshot of a moving bvh structure in raydium :D
Image
But still there is a lot of work to do...


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 05, 2007 11:19 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Amazing ! Keep going, please ! ;)


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 05, 2007 12:13 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
8)
And one more update.
http://www.masguadalinex.net/files/bvhanimcrop.avi
Position corrected, debug mode (showing origin of bones and a guide axis por each one), removed scenario.

I have try a few bvh files from different sources and (except one) all they work fine.. or i think so.
Still left optimizations (a lot), raydium'ify the code, translate a few lines... and then mix it with the object system... or before i could study about ragdolling ... I'm not sure.

Sadly i have to stop until the friday (job). :(


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 06, 2007 3:44 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
Nice, really nice, vicente !
What is "position correction" ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group