How to read different animation frame from '.x' file?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
_Neo
Posts: 30
Joined: Thu May 24, 2012 7:47 pm
Location: SiChuan, China

How to read different animation frame from '.x' file?

Post by _Neo »

Currently, I use the '.x'(dx)format for my model.
The models are exported by the Panda DirectX Max Exporter plugin(for 3ds max), and I noticed that for the animation frames, the plugin can divided them into several parts, such as you can choose the first 15 frames for part 1 with a tag 'walk', and 15`30 frames for part 2 with a tag 'run' .etc.
But my problem is, how to read them in irrlicht? How to read animation by tag?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to read different animation frame from '.x' file?

Post by CuteAlien »

I don't think we have that so far. So the only solution is writing down the numbers.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: How to read different animation frame from '.x' file?

Post by Mel »

Export all the animations as a single large animation and change the frameloops from within the application.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
_Neo
Posts: 30
Joined: Thu May 24, 2012 7:47 pm
Location: SiChuan, China

Re: How to read different animation frame from '.x' file?

Post by _Neo »

OK, export the whole animation and set the frameloops is what I did so far. However there are many models which have same animation parts with different length. For instance, I have 4 models for 'charactor', they all have four animation part: run, walk, idle and jump, but for each model, the length of every frameloop is different. So I have to write a xml file to discribe it.
Just a little tedious..I think...
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: How to read different animation frame from '.x' file?

Post by hendu »

Then don't write XML ;)
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: How to read different animation frame from '.x' file?

Post by Mel »

In the end it is much more useful to have an XML, you can store other stuff, besides the frame loops :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply