Two small questions

Started by PaldxD, August 07, 2010, 03:16:24 AM

Previous topic - Next topic

PaldxD

1st question: I have a small problem related to memory, because I have an md2 file with motion capture to 20000 (20k), to be aware of how much it weighs? Then, this file is a simple ballerina with motion captured by motion capture.
The question here is, to save space there is some other export format that I can use to minimize this problem?

2nd Question: Is there any way to move (move) the vertices of an md2 file (make a kind of customization)?


desculpe meu inglês, usei muito o google para traduzir meu texto

paulscode

LOL, google sucks at translating Portuguese.  It took me a while to figure out the meaning of your first question.  Is this correct?

Is there a format other than md2 which can save animations, but is smaller?

EgonOlsen

Where exactly is the problem with the size of the md2? Storage space or main memory usage? For a keyframe file format, MD2 is already pretty good for storing the files. In main memory, size will be the same no matter which file format you are using. If it's too large, maybe reducing the number of keyframes is an option?

Do you want to manipulate the vertices after loading? If so, you can do this by implementing an IVertexController. However, this is pretty low level and you have to know want you are doing or otherwise you'll screw up the model. In addition, it actually meant to manipulate Object3Ds' meshes, not those from animations. To make the animation meshes accessible, you somehow have to feed mesh after mesh in a kind of dummy Object3D. So yes, it is possible but pretty awkward.

PaldxD

The problem is the large file md2 with 20000 frames, using 800MB+ ram.
And this file is necessary, because I'm going to use in a presentation


See it http://www.youtube.com/user/paldxd#p/a/u/0/qQjEd8P-Rbg



(it is best to be silent than to speak with any questions!)

:)

I promise to do an English course in the future, hehe!

EgonOlsen

Well...as long as you are using keyframed animations, there's not much room for improvement memory wise unless you reduce the number of keyframes. You can try to call strip() on the animation. That will reduce memory usage to some degree, but i don't expect it to work a miracle.

Another option would be to switch to skeletal animation using raft's Bones: http://www.jpct.net/forum2/index.php/topic,1503.0.html
However, i can't tell you if this is feasible for your application and what to do exactly to use it...raft has to jump in here... ;)

zammbi

Isn't it possible to do some kind of streaming animation?

EgonOlsen

I already thought of that during today's running session... ;) It should be possible to add support for that, but it will take some time to do it and i'm not sure if PaldxD can wait that long, if he has to do a presentation. In addition, it somehow feels like a solution for a problem that should better be solved in another way to me, so i consider streaming animations as the last option of all...

PaldxD

for now the solution is to reduce the frames?
do not see having a headache with that, the presentation is next month.
Noob mode...
What advantage of using "build" and "buildallobjects"?
and what better time to use compile?

zammbi

QuoteI already thought of that during today's running session...
Ah :)

QuoteIn addition, it somehow feels like a solution for a problem that should better be solved in another way to me, so i consider streaming animations as the last option of all...
The video didn't show that many animations which I wouldn't of thought it would be 800 megs in memory. But yeah no one else has asked for this feature, I wouldn't suggest wasting your time if its not going to be used.

PaldxD

Quote from: zammbi on August 08, 2010, 02:01:47 PM
The video didn't show that many animations which I wouldn't of thought it would be 800 megs in memory.
In this video showing just an animation of 2500 frames, consuming 200mb.

raft

Quote from: EgonOlsen on August 08, 2010, 10:57:39 AM
Another option would be to switch to skeletal animation using raft's Bones: http://www.jpct.net/forum2/index.php/topic,1503.0.html
However, i can't tell you if this is feasible for your application and what to do exactly to use it...raft has to jump in here... ;)

well, if PaldxD can export to a format whch Bones can read, Bones is feasible. exact amount depends on vertex count of model, but i can say memory usage will be much less. Bones stores only keyframes of joints (as opposed to md2 stores vertex keyframes) so the higher the vertex count the bigger the memory gain.

PaldxD

Is to extract this format with the blender?

raft

Bones can import from Collada and OgreXML files.
http://www.aptalkarga.com/bones/#formats

I don't have experience with Blender but I suppose there is an exporter for at least one of these formats. if exists, I suggest OgreXML

even if you can't find an exporter for Blender, try 3dsmax. OgreMax is quite a good exporter for OgreXML

PaldxD

Raft, I managed to export the mesh and skeleton file...more than .bones
How do?

raft

google translate really sucks :o

you can use the scripts in scripts folder to convert mesh and skeleton files to bones format. assuming you are a windows user, you should use scripts/jmeOgre2Bones.bat file.