Sign in to follow this  
primalbeans

X file problem

Recommended Posts

Last night i made good progress on creating a usable animated .x creation from blender. I found a script, (though a bit tempermental) that i could actually get a animated creature intact with texture... one problem though... the animation plays at super speed and adjusting the blender fps doesnt change squat. Another script i tried played the animations fine, but mangled the crap out of my mesh. My thought was to see if i couldn't manually set the speed by editing the .x file in notepad... but im lost as to were i should look. The file format seems pretty self explanitory but i dont see were animation speed is set if it is at all. So the question is, is there something i can do to the .x file to correct this or am i missing a setting in blender that can correct this. The script im using is here: http://talraarchive.webng.com/Blender_2.49_DirectX_Exporter_5-24-2010.zip
I just went back there and decided to look and see if they have any docs and they do.... maybe ill find an answer there, if any one else has any suggestions let me know.

Share this post


Link to post
Share on other sites
Ieee... the docs for 2.49 are minimal.... hes more concerned about the script for 2.5... I emailed the author maybe he will be able to help me. Anyway im still open to ideas.Thanks.

Share this post


Link to post
Share on other sites
The author got back with me and through his exporter i was actually able to accomplish what i needed. I actually inserted an extra couple lines of code to add a set speed to the .x file. And it works! yay. I sent the code back to him so maybe he might do something for those of us how havnt made the jump to blender 2.5X anyway. His exporter works great except for the speed problem i had so those of you who were having problems with other exporters should give his a try... above post should have a link.

-Ben

[Edited by - primalbeans on October 4, 2010 5:42:09 PM]

Share this post


Link to post
Share on other sites
Like other exporters though you have to keep in mind these things to get usable models with animations and textures:
1.The image file needs to be in the same directory as the mesh in order to display with texture.

2.Ive had best results converting my mesh completely to triangles. In some instances leaving the mesh in quads will still export but you end up with triangles anyway coming out on the other side. Complex meshes dont seem to display right if you dont convert to triangle mesh. (In blender its Ctrl 't')

3.Also bones must be a modifier and not just parented to mesh. And the modifier must be set as real. (In your modifier stack go to the armature modifier and select the button make real, but you dont want to apply.)

4.My origional problem i was getting with the exporter was speed. The animation would play at full speed and it looked as though the character was having a spasm. What I did is add a variable to the top of the program called
Ticks = [insert speed here] (i set mine at like 100 to begin with then played with it)

Then I added this to the top of

def WriteAnimationSet(self):
added this---> self.File.write("\nAnimTicksPerSecond {\n %i;\n}\n" % Ticks)

anyway hopefully chris will implement a gui feature to adjust this because right now on my computer I have to open the script in python and change the variable every time I need to adjust the speed. Hopefully this will help those of you who have had trouble getting a useful .x file out of blender and get some of you up and running. Anyway The author, Kira Vakaan,(Chris Foster) was very helpful and you can find his script at the address in the first post and information about his script at blender.org.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this