.x animation
Blitz3D Forums/Blitz3D Beginners Area/.x animation
| ||
I have a .x file made with Pacemaker and I would like to know how to put it into a program with animation, But I can't figure out how to actually animate it in the program. Can someone please explain this to me or give me an example code? |
| ||
Maybe I'm not being clear enough, lets say I have a little guy I want to animate to walk and I export it as a directX file (.x) So how do I accually load/animate that model in an actual program? |
| ||
Your question is clear enough. Trouble is that its so open-ended most people will shy away from answering. First off I'd recommend you get Milkshape. Its not free but it doesn't cost much. The general process is 1. Load the model into milkshape 2. Add bones 3. Assign vertices to each bone 4. Create the animation by moving bones and keyframing 5. Export the model/animation to .B3D format 6. Load it into Blitz with "LoadAnimMesh()" You can find various tutorials on the subject here. |
| ||
You can use the LoadAnimMesh() command. In the help, there is an example. Type LoadAnimMesh in the BB editor, move the typing cursor on the command and press F1 twice. Then, above the example, click the 'example' link. I use that example a lot for quickly testing properties of animated objects. Remember to save the example first using a different name. |
| ||
Thanks for the help Gfk- I've tried milkshape before, it was to confusing for me. b32- that's my problem, I load it into an example like that and it STILL doesn't animate.... |
| ||
But it does load the mesh itself ? Then the data is lost somewhere in the process. Either you didn't export/save it from the editor, or the editor can't save animation data, or it exports the data in an unsupported format. Well, it is probably best to find an .B3D exporter. The B3D format is much better for Blitz. However, if you can open the .x file in notepad, you can see if it is a binary .x (unreadable garbage) or a ascii .x (readable, codelike structure). If it is an ascii file, try a search for "Anim", and if it finds something, the animation data is in the file. You could install a .X viewer, they usually give much better feedback. If you still have trouble loading the file, try exporting it to another format. It is then probably the editor that can't export .x file animation. Then, find a convertor from that format to .x. |
| ||
Thanks for the b3d tip it works now :) |
| ||
It is then probably the editor that can't export .x file animation. Doesn't really matter if it can or can't. Blitz can't import .x file animation using bones anyway. You have to use .b3d if you're using bones. |
| ||
Yes, that is right. The .x format can not use bone data like b3d. However, .x can use a child-parent type animation. |
| ||
Well there are lots of versions of the .x format. Most can use it, but Blitz can't load it. |
| ||
Not sure if it was said: The X Export in Pacemaker was added for Darkbasic Pro users (and similar). It's kind of a DirectX 8.1 X format, where blitz supports the DirectX 7 X Format only. yes, use the B3D Export in Pacemaker, that is the original main Export format of Pacemaker anyway. |