md5 texture/model problem

Hi,



I have created the following folder with 3ds max 9.



Pic: http://www.htw-dresden.de/~s52377/files/folder/maxpic.JPG

Max + Texture File: http://www.htw-dresden.de/~s52377/files/folder/folder.zip



I exported it with der ton’s exporter.



Now I tried to import it in jme. But my model is destroyed and the

texture does not show correctly.



Pic: http://www.htw-dresden.de/~s52377/files/folder/jmepic.JPG

md5Mesh: http://www.htw-dresden.de/~s52377/files/folder/akte.md5mesh

md5Anim: http://www.htw-dresden.de/~s52377/files/folder/akte.md5anim



I use the FishTest as test class.

But I have no idea where the problem is, any idea?

If I well understand, comparing the two images, I see that all the object parts attached to a bone, are resized when you import to jME.



First of all, you should assure that everything is ok with bones, axis transformations, rotations, deformations, ecc…

I think that there is some unwanted transformation/deformation in the original Max file, not visible in Max but exported by der_ton plugin.

I do not know Max enough, so I can not help you very much. Some guidelines shuold be included in der_ton's plugin documentation; or code comments, if it is a Max script.



Though, just to explain you, in Blender there is a command to apply transformations. Generally, in 3D editors, each object, when created, has its own transformation. If you rotate or scale it, the 3D editor creates a new transformation and multiplys the starting object transformation by it to obtain the resultig orientation/scale. The 3D editor, anyway, still memorizes the original transformation (consider it as a rest position) and consider the resulting transformation only as new. Blender and many other 3D Tools offer the possibility to store ther resulting transformation as the original one to avoid several problems related to this issue.



I hope I explained well.



About the texture, I do not understand, watching those images, why you say it does not show correctly.



Ah! And remember that you have probably to triangulate the model because I do not know if der_ton's exporter does it for you.

uhm

i think you shader name is not good



with the md5 importer



in your  md5 mesh:



shader "models/fish/textures/"

replace by

shader "models/fish/textures/nameoftexture"





with the fish -> 



shader "models/fish/textures/Fish_a"



the texture format is tga but the line is not

shader  "models/fish/textures/Fish_a.tga"



for a model destruction …

all vertex MUST be associated with A node

else the vertex are not drawn corectly

You are wellcome.



Though, about the texture, aznur is right. Try to rename the Targa texture file using a different name then texture. Maybe Java is confused by the presence of 2 files (the directory and the Targa file) with the same name in its search path.



For the bone/scaling problem Max (as like as any other 3D tool) should have a command to apply the transformation, so that der_ton’s exporter stores it as the base transformation and MD5 Reader 2 does not interprets it as a subsequent transformation, that influences also vertex.

Ok,



another question, same thread.

It is possible to play an animation backwards?



€: I get it:

animAnimator.setSpeed(-1.0f);

animAnimator.setTime(animAnimator.getMax());

Mewel said:
It is possible to play an animation backwards?


I do not know. You should try it.

If the code you posted will not work, you can try to create an instance of the object that stores the bones keyframes, invert the order of keyframes (Array or List) and using them to play the animation.

The class responsible to store bones keyframes is model.SkeletalKeyFrame.

I do not know if you move your little animation in reverse hand you can
Change your vector skeletalkeyframe given to the inverse
aznur said:
I do not know if you move your little animation in reverse hand you can
Change your vector skeletalkeyframe given to the inverse


Sorry but I don't understand well what you wrote. Is it not the same I said?